2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/entity/projectile/EntityThrownTrident.java
|
|
|
|
+++ b/net/minecraft/world/entity/projectile/EntityThrownTrident.java
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -23,6 +23,10 @@
|
2024-02-21 10:55:34 +01:00
|
|
|
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);
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -68,7 +72,7 @@
|
2024-02-21 10:55:34 +01:00
|
|
|
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());
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -152,7 +156,7 @@
|
2022-12-07 17:00:00 +01:00
|
|
|
if (entitylightning != null) {
|
|
|
|
entitylightning.moveTo(Vec3D.atBottomCenterOf(blockposition));
|
|
|
|
entitylightning.setCause(entity1 instanceof EntityPlayer ? (EntityPlayer) entity1 : null);
|
2023-06-07 17:30:00 +02:00
|
|
|
- this.level().addFreshEntity(entitylightning);
|
|
|
|
+ ((WorldServer) this.level()).strikeLightning(entitylightning, org.bukkit.event.weather.LightningStrikeEvent.Cause.TRIDENT); // CraftBukkit
|
2022-12-07 17:00:00 +01:00
|
|
|
soundeffect = SoundEffects.TRIDENT_THUNDER;
|
|
|
|
f1 = 5.0F;
|
|
|
|
}
|