Only allow sensible items in Socket and Teleposer

This commit is contained in:
ljfa-ag 2015-03-04 14:29:17 +01:00
parent 252555cb3e
commit f7de2ddef5
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,6 @@
package WayofTime.alchemicalWizardry.common.tileEntity;
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
@ -132,6 +133,6 @@ public class TESocket extends TEInventory
@Override
public boolean isItemValidForSlot(int slot, ItemStack itemstack)
{
return slot == 0;
return itemstack.getItem() instanceof ArmourUpgrade;
}
}

View file

@ -246,7 +246,7 @@ public class TETeleposer extends TEInventory
@Override
public boolean isItemValidForSlot(int slot, ItemStack itemstack)
{
return slot == 0;
return itemstack.getItem() instanceof TelepositionFocus;
}
}