--- a/net/minecraft/world/entity/projectile/ThrownTrident.java
+++ b/net/minecraft/world/entity/projectile/ThrownTrident.java
@@ -24,28 +24,33 @@
 import net.minecraft.world.phys.Vec3;
 
 public class ThrownTrident extends AbstractArrow {
+
     private static final EntityDataAccessor<Byte> ID_LOYALTY = SynchedEntityData.defineId(ThrownTrident.class, EntityDataSerializers.BYTE);
     private static final EntityDataAccessor<Boolean> ID_FOIL = SynchedEntityData.defineId(ThrownTrident.class, EntityDataSerializers.BOOLEAN);
-    public ItemStack tridentItem = new ItemStack(Items.TRIDENT);
+    public ItemStack tridentItem;
     public boolean dealtDamage;
     public int clientSideReturnTridentTickCount;
 
     public ThrownTrident(EntityType<? extends ThrownTrident> type, Level world) {
         super(type, world);
+        this.baseDamage = net.minecraft.world.item.TridentItem.BASE_DAMAGE; // Paper
+        this.tridentItem = new ItemStack(Items.TRIDENT);
     }
 
     public ThrownTrident(Level world, LivingEntity owner, ItemStack stack) {
         super(EntityType.TRIDENT, owner, world);
+        this.baseDamage = net.minecraft.world.item.TridentItem.BASE_DAMAGE; // Paper
+        this.tridentItem = new ItemStack(Items.TRIDENT);
         this.tridentItem = stack.copy();
-        this.entityData.set(ID_LOYALTY, (byte)EnchantmentHelper.getLoyalty(stack));
-        this.entityData.set(ID_FOIL, stack.hasFoil());
+        this.entityData.set(ThrownTrident.ID_LOYALTY, (byte) EnchantmentHelper.getLoyalty(stack));
+        this.entityData.set(ThrownTrident.ID_FOIL, stack.hasFoil());
     }
 
     @Override
     protected void defineSynchedData() {
         super.defineSynchedData();
-        this.entityData.define(ID_LOYALTY, (byte)0);
-        this.entityData.define(ID_FOIL, false);
+        this.entityData.define(ThrownTrident.ID_LOYALTY, (byte) 0);
+        this.entityData.define(ThrownTrident.ID_FOIL, false);
     }
 
     @Override
@@ -55,8 +60,9 @@
         }
 
         Entity entity = this.getOwner();
-        int i = this.entityData.get(ID_LOYALTY);
-        if (i > 0 && (this.dealtDamage || this.isNoPhysics()) && entity != null) {
+        byte b0 = (Byte) this.entityData.get(ThrownTrident.ID_LOYALTY);
+
+        if (b0 > 0 && (this.dealtDamage || this.isNoPhysics()) && entity != null) {
             if (!this.isAcceptibleReturnOwner()) {
                 if (!this.level().isClientSide && this.pickup == AbstractArrow.Pickup.ALLOWED) {
                     this.spawnAtLocation(this.getPickupItem(), 0.1F);
@@ -65,14 +71,16 @@
                 this.discard();
             } else {
                 this.setNoPhysics(true);
-                Vec3 vec3 = entity.getEyePosition().subtract(this.position());
-                this.setPosRaw(this.getX(), this.getY() + vec3.y * 0.015D * (double)i, this.getZ());
+                Vec3 vec3d = entity.getEyePosition().subtract(this.position());
+
+                this.setPosRaw(this.getX(), this.getY() + vec3d.y * 0.015D * (double) b0, this.getZ());
                 if (this.level().isClientSide) {
                     this.yOld = this.getY();
                 }
 
-                double d = 0.05D * (double)i;
-                this.setDeltaMovement(this.getDeltaMovement().scale(0.95D).add(vec3.normalize().scale(d)));
+                double d0 = 0.05D * (double) b0;
+
+                this.setDeltaMovement(this.getDeltaMovement().scale(0.95D).add(vec3d.normalize().scale(d0)));
                 if (this.clientSideReturnTridentTickCount == 0) {
                     this.playSound(SoundEvents.TRIDENT_RETURN, 10.0F, 1.0F);
                 }
@@ -86,11 +94,8 @@
 
     private boolean isAcceptibleReturnOwner() {
         Entity entity = this.getOwner();
-        if (entity != null && entity.isAlive()) {
-            return !(entity instanceof ServerPlayer) || !entity.isSpectator();
-        } else {
-            return false;
-        }
+
+        return entity != null && entity.isAlive() ? !(entity instanceof ServerPlayer) || !entity.isSpectator() : false;
     }
 
     @Override
@@ -99,9 +104,23 @@
     }
 
     public boolean isFoil() {
-        return this.entityData.get(ID_FOIL);
+        return (Boolean) this.entityData.get(ThrownTrident.ID_FOIL);
+    }
+
+    // Paper start
+    public void setFoil(boolean foil) {
+        this.entityData.set(ThrownTrident.ID_FOIL, foil);
     }
 
+    public int getLoyalty() {
+        return this.entityData.get(ThrownTrident.ID_LOYALTY);
+    }
+
+    public void setLoyalty(byte loyalty) {
+        this.entityData.set(ThrownTrident.ID_LOYALTY, loyalty);
+    }
+    // Paper end
+
     @Nullable
     @Override
     protected EntityHitResult findHitEntity(Vec3 currentPosition, Vec3 nextPosition) {
@@ -111,48 +130,57 @@
     @Override
     protected void onHitEntity(EntityHitResult entityHitResult) {
         Entity entity = entityHitResult.getEntity();
-        float f = 8.0F;
-        if (entity instanceof LivingEntity livingEntity) {
-            f += EnchantmentHelper.getDamageBonus(this.tridentItem, livingEntity.getMobType());
+        float f = (float) this.baseDamage; // Paper
+
+        if (entity instanceof LivingEntity) {
+            LivingEntity entityliving = (LivingEntity) entity;
+
+            f += EnchantmentHelper.getDamageBonus(this.tridentItem, entityliving.getMobType());
         }
 
-        Entity entity2 = this.getOwner();
-        DamageSource damageSource = this.damageSources().trident(this, (Entity)(entity2 == null ? this : entity2));
+        Entity entity1 = this.getOwner();
+        DamageSource damagesource = this.damageSources().trident(this, (Entity) (entity1 == null ? this : entity1));
+
         this.dealtDamage = true;
-        SoundEvent soundEvent = SoundEvents.TRIDENT_HIT;
-        if (entity.hurt(damageSource, f)) {
+        SoundEvent soundeffect = SoundEvents.TRIDENT_HIT;
+
+        if (entity.hurt(damagesource, f)) {
             if (entity.getType() == EntityType.ENDERMAN) {
                 return;
             }
 
             if (entity instanceof LivingEntity) {
-                LivingEntity livingEntity2 = (LivingEntity)entity;
-                if (entity2 instanceof LivingEntity) {
-                    EnchantmentHelper.doPostHurtEffects(livingEntity2, entity2);
-                    EnchantmentHelper.doPostDamageEffects((LivingEntity)entity2, livingEntity2);
+                LivingEntity entityliving1 = (LivingEntity) entity;
+
+                if (entity1 instanceof LivingEntity) {
+                    EnchantmentHelper.doPostHurtEffects(entityliving1, entity1);
+                    EnchantmentHelper.doPostDamageEffects((LivingEntity) entity1, entityliving1);
                 }
 
-                this.doPostHurtEffects(livingEntity2);
+                this.doPostHurtEffects(entityliving1);
             }
         }
 
         this.setDeltaMovement(this.getDeltaMovement().multiply(-0.01D, -0.1D, -0.01D));
-        float g = 1.0F;
+        float f1 = 1.0F;
+
         if (this.level() instanceof ServerLevel && this.level().isThundering() && this.isChanneling()) {
-            BlockPos blockPos = entity.blockPosition();
-            if (this.level().canSeeSky(blockPos)) {
-                LightningBolt lightningBolt = EntityType.LIGHTNING_BOLT.create(this.level());
-                if (lightningBolt != null) {
-                    lightningBolt.moveTo(Vec3.atBottomCenterOf(blockPos));
-                    lightningBolt.setCause(entity2 instanceof ServerPlayer ? (ServerPlayer)entity2 : null);
-                    this.level().addFreshEntity(lightningBolt);
-                    soundEvent = SoundEvents.TRIDENT_THUNDER;
-                    g = 5.0F;
+            BlockPos blockposition = entity.blockPosition();
+
+            if (this.level().canSeeSky(blockposition)) {
+                LightningBolt entitylightning = (LightningBolt) EntityType.LIGHTNING_BOLT.create(this.level());
+
+                if (entitylightning != null) {
+                    entitylightning.moveTo(Vec3.atBottomCenterOf(blockposition));
+                    entitylightning.setCause(entity1 instanceof ServerPlayer ? (ServerPlayer) entity1 : null);
+                    ((ServerLevel) this.level()).strikeLightning(entitylightning, org.bukkit.event.weather.LightningStrikeEvent.Cause.TRIDENT); // CraftBukkit
+                    soundeffect = SoundEvents.TRIDENT_THUNDER;
+                    f1 = 5.0F;
                 }
             }
         }
 
-        this.playSound(soundEvent, g, 1.0F);
+        this.playSound(soundeffect, f1, 1.0F);
     }
 
     public boolean isChanneling() {
@@ -185,7 +213,7 @@
         }
 
         this.dealtDamage = nbt.getBoolean("DealtDamage");
-        this.entityData.set(ID_LOYALTY, (byte)EnchantmentHelper.getLoyalty(this.tridentItem));
+        this.entityData.set(ThrownTrident.ID_LOYALTY, (byte) EnchantmentHelper.getLoyalty(this.tridentItem));
     }
 
     @Override
@@ -197,8 +225,9 @@
 
     @Override
     public void tickDespawn() {
-        int i = this.entityData.get(ID_LOYALTY);
-        if (this.pickup != AbstractArrow.Pickup.ALLOWED || i <= 0) {
+        byte b0 = (Byte) this.entityData.get(ThrownTrident.ID_LOYALTY);
+
+        if (this.pickup != AbstractArrow.Pickup.ALLOWED || b0 <= 0) {
             super.tickDespawn();
         }
 
