Fix incorrect usage of item stack checking

I have no idea how they worked without issue for this long :D
This commit is contained in:
modmuss50 2018-06-25 12:34:13 +01:00
parent 96d78c11a8
commit d4a43d24a1
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
10 changed files with 21 additions and 21 deletions
src/main/java/techreborn/client

View file

@ -37,7 +37,7 @@ public class ClientEventHandler {
@SubscribeEvent
public static void renderPlayer(RenderPlayerEvent.Pre event) {
EntityPlayer player = event.getEntityPlayer();
Item chestslot = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) != ItemStack.EMPTY
Item chestslot = !player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).isEmpty()
? player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem() : null;
if (chestslot != null && chestslot == ModItems.CLOAKING_DEVICE) {
event.setCanceled(true);