fix: class cast exception

This commit is contained in:
Timo Ley 2023-02-09 21:20:56 +01:00
parent 9ab5bd1406
commit 6a2e46dcc0
4 changed files with 5 additions and 7 deletions

View file

@ -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"

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}