mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
65bc2541a3
By: md_5 <git@md-5.net>
31 lines
1.5 KiB
Diff
31 lines
1.5 KiB
Diff
--- a/net/minecraft/world/entity/projectile/EntityThrownTrident.java
|
|
+++ b/net/minecraft/world/entity/projectile/EntityThrownTrident.java
|
|
@@ -23,6 +23,10 @@
|
|
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
|
import net.minecraft.world.phys.Vec3D;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.event.entity.EntityRemoveEvent;
|
|
+// CraftBukkit end
|
|
+
|
|
public class EntityThrownTrident extends EntityArrow {
|
|
|
|
private static final DataWatcherObject<Byte> ID_LOYALTY = DataWatcher.defineId(EntityThrownTrident.class, DataWatcherRegistry.BYTE);
|
|
@@ -68,7 +72,7 @@
|
|
this.spawnAtLocation(this.getPickupItem(), 0.1F);
|
|
}
|
|
|
|
- this.discard();
|
|
+ this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
|
|
} else {
|
|
this.setNoPhysics(true);
|
|
Vec3D vec3d = entity.getEyePosition().subtract(this.position());
|
|
@@ -152,7 +156,7 @@
|
|
if (entitylightning != null) {
|
|
entitylightning.moveTo(Vec3D.atBottomCenterOf(blockposition));
|
|
entitylightning.setCause(entity1 instanceof EntityPlayer ? (EntityPlayer) entity1 : null);
|
|
- this.level().addFreshEntity(entitylightning);
|
|
+ ((WorldServer) this.level()).strikeLightning(entitylightning, org.bukkit.event.weather.LightningStrikeEvent.Cause.TRIDENT); // CraftBukkit
|
|
soundeffect = SoundEffects.TRIDENT_THUNDER;
|
|
f1 = 5.0F;
|
|
}
|