From 2c6b2dae77930d6db8e35a0c239821932e6b15be Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 8 May 2016 11:07:19 +0200 Subject: [PATCH] Just in case --- .../mod/items/ItemSpawnerChanger.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSpawnerChanger.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSpawnerChanger.java index 42f775947..31cdb9117 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSpawnerChanger.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSpawnerChanger.java @@ -5,7 +5,6 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -77,12 +76,12 @@ public class ItemSpawnerChanger extends ItemBase{ return false; } - private boolean storeClickedEntity(ItemStack stack, Entity entity){ - if(!entity.worldObj.isRemote){ - if(!stack.hasTagCompound()){ - stack.setTagCompound(new NBTTagCompound()); - } + private boolean storeClickedEntity(ItemStack stack, EntityLivingBase entity){ + if(!stack.hasTagCompound()){ + stack.setTagCompound(new NBTTagCompound()); + } + if(!(entity instanceof EntityPlayer)){ String entityName = EntityList.getEntityString(entity); if(entityName != null && !entityName.isEmpty()){ for(String name : ConfigValues.spawnerChangerBlacklist){