From 6a2e46dcc006e2974cbb70b5931ea9c995df4180 Mon Sep 17 00:00:00 2001 From: Timo Ley Date: Thu, 9 Feb 2023 21:20:56 +0100 Subject: [PATCH] fix: class cast exception --- build.gradle | 2 +- .../classiccasting/items/wands/ItemWandExcavation.java | 4 ++-- .../anvilcraft/classiccasting/items/wands/ItemWandFire.java | 3 +-- .../classiccasting/items/wands/ItemWandLightning.java | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 990e6a3..6e7a15f 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ apply plugin: 'maven-publish' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 -version = "1.3.0" +version = "1.3.1" group = "net.anvilcraft" archivesBaseName = "classic-casting" diff --git a/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandExcavation.java b/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandExcavation.java index 10aea84..08c5e14 100644 --- a/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandExcavation.java +++ b/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandExcavation.java @@ -10,7 +10,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.EnumAction; @@ -68,7 +68,7 @@ public class ItemWandExcavation extends ItemWandBasic { } if (!w.isRemote && e.ticksExisted % 50 == 0 && is.getItemDamage() > 0 && AuraManager.decreaseClosestAura(w, e.posX, e.posY, e.posZ, 1)) { - is.damageItem(-5, (EntityLiving) e); + is.damageItem(-5, (EntityLivingBase) e); if (is.getItemDamage() < 0) { is.setItemDamage(0); } diff --git a/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandFire.java b/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandFire.java index ff64b94..f4d9ce9 100644 --- a/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandFire.java +++ b/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandFire.java @@ -7,7 +7,6 @@ import cpw.mods.fml.relauncher.SideOnly; import dev.tilera.auracore.aura.AuraManager; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; @@ -66,7 +65,7 @@ public class ItemWandFire extends ItemWandBasic { } if (!w.isRemote && e.ticksExisted % 50 == 0 && is.getItemDamage() > 0 && AuraManager.decreaseClosestAura(w, e.posX, e.posY, e.posZ, 1)) { - is.damageItem(-5, (EntityLiving) e); + is.damageItem(-5, (EntityLivingBase) e); if (is.getItemDamage() < 0) { is.setItemDamage(0); } diff --git a/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandLightning.java b/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandLightning.java index f94e657..10c5ab2 100644 --- a/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandLightning.java +++ b/src/main/java/net/anvilcraft/classiccasting/items/wands/ItemWandLightning.java @@ -7,7 +7,6 @@ import net.anvilcraft.classiccasting.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; @@ -61,7 +60,7 @@ public class ItemWandLightning extends ItemWandBasic { } if (!w.isRemote && e.ticksExisted % 50 == 0 && is.getItemDamage() > 0 && AuraManager.decreaseClosestAura(w, e.posX, e.posY, e.posZ, 1)) { - is.damageItem(-5, (EntityLiving) e); + is.damageItem(-5, (EntityLivingBase) e); if (is.getItemDamage() < 0) { is.setItemDamage(0); }