Fix compilation issues (#1509)

This commit is contained in:
Krakenied
2024-04-28 22:23:25 +02:00
committed by GitHub
parent 9d2dae3c9c
commit dc9993f4d1
36 changed files with 207 additions and 258 deletions

View File

@@ -8,7 +8,7 @@ Shears can now defuse TNT. Each world can have a configured chance for the TNT t
By default the option is disabled to avoid breaking any possible vanilla mechanics.
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
index f1f352ec0e51f5db59254841a06c176c5a876fc9..ded6bacd7baf7e7c8aa225825c345aefd8d42aa9 100644
index f1f352ec0e51f5db59254841a06c176c5a876fc9..dff0e7b08b973a1b29f916e63d3e4778d6c56cdc 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -193,4 +193,29 @@ public class PrimedTnt extends Entity implements TraceableEntity {
@@ -28,7 +28,7 @@ index f1f352ec0e51f5db59254841a06c176c5a876fc9..ded6bacd7baf7e7c8aa225825c345aef
+ new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.TNT));
+ tntItem.setPickUpDelay(10);
+
+ inHand.hurtAndBreak(1, player, entity -> entity.broadcastBreakEvent(hand));
+ inHand.hurtAndBreak(1, player, LivingEntity.getSlotForHand(hand));
+ level().addFreshEntity(tntItem, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CUSTOM);
+
+ this.playSound(net.minecraft.sounds.SoundEvents.SHEEP_SHEAR);