mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Fix nullability on Block#breakNaturally (#6651)
This commit is contained in:
@@ -14,8 +14,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ /**
|
+ /**
|
||||||
+ * Breaks the block and spawns items as if a player had digged it with a
|
+ * Breaks the block and spawns item drops as if a player had broken it
|
||||||
+ * specific tool
|
+ *
|
||||||
|
+ * @param triggerEffect Play the block break particle effect and sound
|
||||||
|
+ * @return true if the block was destroyed
|
||||||
|
+ */
|
||||||
|
+ boolean breakNaturally(boolean triggerEffect);
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Breaks the block and spawns item drops as if a player had broken it
|
||||||
|
+ * with a specific tool
|
||||||
+ *
|
+ *
|
||||||
+ * @param tool The tool or item in hand used for digging
|
+ * @param tool The tool or item in hand used for digging
|
||||||
+ * @param triggerEffect Play the block break particle effect and sound
|
+ * @param triggerEffect Play the block break particle effect and sound
|
||||||
|
@@ -17,6 +17,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
+ public boolean breakNaturally(boolean triggerEffect) {
|
||||||
|
+ return breakNaturally(null, triggerEffect);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
+ public boolean breakNaturally(ItemStack item, boolean triggerEffect) {
|
+ public boolean breakNaturally(ItemStack item, boolean triggerEffect) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
// Order matters here, need to drop before setting to air so skulls can get their data
|
// Order matters here, need to drop before setting to air so skulls can get their data
|
||||||
|
Reference in New Issue
Block a user