diff --git a/src/main/java/HxCKDMS/HxCBlocks/Events/EventBlockInteract.java b/src/main/java/HxCKDMS/HxCBlocks/Events/EventBlockInteract.java index 9cd4414..f7c370b 100644 --- a/src/main/java/HxCKDMS/HxCBlocks/Events/EventBlockInteract.java +++ b/src/main/java/HxCKDMS/HxCBlocks/Events/EventBlockInteract.java @@ -27,7 +27,7 @@ public class EventBlockInteract implements EventListener { Random rand = new Random(); int randInt = rand.nextInt(50); - float randfloat = (randInt*.01f); + float randfloat = (randInt/10); @SubscribeEvent public void onPlayerInteract(PlayerInteractEvent event) { Block block = event.world.getBlock(event.x, event.y, event.z); diff --git a/src/main/java/HxCKDMS/HxCBlocks/Events/EventEntityUpdate.java b/src/main/java/HxCKDMS/HxCBlocks/Events/EventEntityUpdate.java index 8e58382..8dd1ae0 100644 --- a/src/main/java/HxCKDMS/HxCBlocks/Events/EventEntityUpdate.java +++ b/src/main/java/HxCKDMS/HxCBlocks/Events/EventEntityUpdate.java @@ -3,9 +3,7 @@ import HxCKDMS.HxCCore.Handlers.NBTFileIO; import HxCKDMS.HxCCore.HxCCore; import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.event.entity.living.LivingEvent; @@ -14,16 +12,15 @@ @SuppressWarnings("unused") public class EventEntityUpdate { @SubscribeEvent - @SideOnly(Side.SERVER) public void LivingUpdateEvent(LivingEvent.LivingUpdateEvent event){ - if (event.entityLiving instanceof EntityPlayer){ - EntityPlayer player = (EntityPlayer)event.entityLiving; + if (event.entityLiving instanceof EntityPlayerMP){ + EntityPlayerMP player = (EntityPlayerMP)event.entityLiving; String UUID = player.getUniqueID().toString(); File CustomPlayerData = new File(HxCCore.HxCCoreDir, "HxC-" + UUID + ".dat"); NBTTagCompound nbt = NBTFileIO.getData(CustomPlayerData); float soul = nbt.getFloat("Soul"); int SoulTimer = nbt.getInteger("SoulTimer"); - if (soul != 1f) { + if (soul < 1.0f) { SoulTimer--; NBTFileIO.setInteger(CustomPlayerData, "SoulTimer", SoulTimer); if (SoulTimer <= 0){