PaperMC/paper-server/nms-patches/EntityThrownTrident.patch
CraftBukkit/Spigot 78841baf49 SPIGOT-4511: Trident doesn't lose durability
By: md_5 <git@md-5.net>
2018-12-01 08:18:09 +11:00

20 lines
1 KiB
Diff

--- a/net/minecraft/server/EntityThrownTrident.java
+++ b/net/minecraft/server/EntityThrownTrident.java
@@ -5,7 +5,7 @@
public class EntityThrownTrident extends EntityArrow {
private static final DataWatcherObject<Byte> h = DataWatcher.a(EntityThrownTrident.class, DataWatcherRegistry.a);
- private ItemStack aw;
+ public ItemStack aw; // PAIL
private boolean ax;
public int g;
@@ -122,7 +122,7 @@
EntityLightning entitylightning = new EntityLightning(this.world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, false);
entitylightning.d(entity1 instanceof EntityPlayer ? (EntityPlayer) entity1 : null);
- this.world.strikeLightning(entitylightning);
+ ((WorldServer) this.world).strikeLightning(entitylightning, org.bukkit.event.weather.LightningStrikeEvent.Cause.TRIDENT); // CraftBukkit
soundeffect = SoundEffects.ITEM_TRIDENT_THUNDER;
f1 = 5.0F;
}