--- a/net/minecraft/world/item/enchantment/DamageEnchantment.java
+++ b/net/minecraft/world/item/enchantment/DamageEnchantment.java
@@ -10,6 +10,7 @@
 import net.minecraft.world.item.ItemStack;
 
 public class DamageEnchantment extends Enchantment {
+
     public static final int ALL = 0;
     public static final int UNDEAD = 1;
     public static final int ARTHROPODS = 2;
@@ -26,12 +27,12 @@
 
     @Override
     public int getMinCost(int level) {
-        return MIN_COST[this.type] + (level - 1) * LEVEL_COST[this.type];
+        return DamageEnchantment.MIN_COST[this.type] + (level - 1) * DamageEnchantment.LEVEL_COST[this.type];
     }
 
     @Override
     public int getMaxCost(int level) {
-        return this.getMinCost(level) + LEVEL_COST_SPAN[this.type];
+        return this.getMinCost(level) + DamageEnchantment.LEVEL_COST_SPAN[this.type];
     }
 
     @Override
@@ -41,13 +42,7 @@
 
     @Override
     public float getDamageBonus(int level, MobType group) {
-        if (this.type == 0) {
-            return 1.0F + (float)Math.max(0, level - 1) * 0.5F;
-        } else if (this.type == 1 && group == MobType.UNDEAD) {
-            return (float)level * 2.5F;
-        } else {
-            return this.type == 2 && group == MobType.ARTHROPOD ? (float)level * 2.5F : 0.0F;
-        }
+        return this.type == 0 ? 1.0F + (float) Math.max(0, level - 1) * 0.5F : (this.type == 1 && group == MobType.UNDEAD ? (float) level * 2.5F : (this.type == 2 && group == MobType.ARTHROPOD ? (float) level * 2.5F : 0.0F));
     }
 
     @Override
@@ -62,10 +57,13 @@
 
     @Override
     public void doPostAttack(LivingEntity user, Entity target, int level) {
-        if (target instanceof LivingEntity livingEntity) {
-            if (this.type == 2 && level > 0 && livingEntity.getMobType() == MobType.ARTHROPOD) {
-                int i = 20 + user.getRandom().nextInt(10 * level);
-                livingEntity.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, i, 3));
+        if (target instanceof LivingEntity) {
+            LivingEntity entityliving1 = (LivingEntity) target;
+
+            if (this.type == 2 && level > 0 && entityliving1.getMobType() == MobType.ARTHROPOD) {
+                int j = 20 + user.getRandom().nextInt(10 * level);
+
+                entityliving1.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, j, 3), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
             }
         }
 
