1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2024-12-28 23:38:25 +01:00
PaperMC/patches/api/0225-Add-API-to-get-Material-from-Boats-and-Minecarts.patch
Jake Potrebic c6aa61ee18
Updated Upstream (Bukkit/CraftBukkit/Spigot) ()
Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
b9df8e9f SPIGOT-7933: Improve custom Minecart max speed
fc496179 Fix InstrumentTest
7c0ec598 PR-1075: Make Art an interface
c389f5a4 PR-1074: Make Sound an interface

CraftBukkit Changes:
df1efc0bb SPIGOT-7945: `Bukkit#dispatchCommand` throws `UnsupportedOperationException`
285df6e85 SPIGOT-7933: Improve custom Minecart max speed
a0f3d4e50 SPIGOT-7940: Recipe book errors after reload
9e0618ec2 SPIGOT-7937: Cannot spawn minecart during world generation with minecart_improvements enabled
1eb4d28da SPIGOT-7941: Fix resistance over 4 amplify causing issues in damage
52b99158a PR-1504: Make Art an interface
e18ae35f1 PR-1502: Make Sound an interface

Spigot Changes:
e65d67a7 SPIGOT-7934: Item entities start "bouncing" under certain conditions
2024-11-04 18:42:38 +01:00

52 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Madeline Miller <mnmiller1@me.com>
Date: Thu, 31 Dec 2020 12:48:38 +1000
Subject: [PATCH] Add API to get Material from Boats and Minecarts
diff --git a/src/main/java/org/bukkit/entity/Boat.java b/src/main/java/org/bukkit/entity/Boat.java
index dbdd2c1ad74a4d56e282736cd06d6937701f2e5c..a0fb3c44405f6362f8a1613661d507e448f7ba6b 100644
--- a/src/main/java/org/bukkit/entity/Boat.java
+++ b/src/main/java/org/bukkit/entity/Boat.java
@@ -181,4 +181,14 @@ public interface Boat extends Vehicle {
ON_LAND,
IN_AIR;
}
+
+ // Paper start
+ /**
+ * Gets the {@link Material} that represents this Boat type.
+ *
+ * @return the boat material.
+ */
+ @NotNull
+ public Material getBoatMaterial();
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Minecart.java b/src/main/java/org/bukkit/entity/Minecart.java
index d9ad5fd48eec569eb4aef2aaf527ba24d2db3254..c3c94a5694f1e8d79e5acc45af1cd2e0fa6a621f 100644
--- a/src/main/java/org/bukkit/entity/Minecart.java
+++ b/src/main/java/org/bukkit/entity/Minecart.java
@@ -1,6 +1,7 @@
package org.bukkit.entity;
import org.bukkit.GameRule;
+import org.bukkit.Material;
import org.bukkit.block.data.BlockData;
import org.bukkit.material.MaterialData;
import org.bukkit.util.Vector;
@@ -148,4 +149,14 @@ public interface Minecart extends Vehicle {
* @return the current block offset for this minecart.
*/
public int getDisplayBlockOffset();
+
+ // Paper start
+ /**
+ * Gets the {@link Material} that represents this Minecart type.
+ *
+ * @return the minecart material.
+ */
+ @NotNull
+ public Material getMinecartMaterial();
+ // Paper end
}