2021-06-11 12:02:28 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2021-09-20 09:30:04 +00:00
|
|
|
From: Madeline Miller <mnmiller1@me.com>
|
2021-06-11 12:02:28 +00:00
|
|
|
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
|
2022-08-01 13:02:23 +00:00
|
|
|
index e5d5d2c944df1e9a81b38d3854fbe70c166588d1..3e458b96d5c15a78d3d411d5b88a716213588a94 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/org/bukkit/entity/Boat.java
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/Boat.java
|
2022-08-01 13:02:23 +00:00
|
|
|
@@ -173,4 +173,14 @@ public interface Boat extends Vehicle {
|
2022-07-12 17:16:05 +00:00
|
|
|
ON_LAND,
|
|
|
|
IN_AIR;
|
|
|
|
}
|
2021-06-11 12:02:28 +00:00
|
|
|
+
|
|
|
|
+ // 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
|
2022-05-16 02:33:03 +00:00
|
|
|
index 7f9c4d4b430a3f0276461346ff2621bacf864075..bc1e62759c995a1463ebcd10d73c7d502c9acc45 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/org/bukkit/entity/Minecart.java
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/Minecart.java
|
|
|
|
@@ -1,5 +1,6 @@
|
|
|
|
package org.bukkit.entity;
|
|
|
|
|
|
|
|
+import org.bukkit.Material;
|
|
|
|
import org.bukkit.block.data.BlockData;
|
|
|
|
import org.bukkit.material.MaterialData;
|
|
|
|
import org.bukkit.util.Vector;
|
2022-05-16 02:33:03 +00:00
|
|
|
@@ -147,4 +148,14 @@ public interface Minecart extends Vehicle {
|
2021-06-11 12:02:28 +00:00
|
|
|
* @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
|
|
|
|
}
|