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:
parent
96d78c11a8
commit
d4a43d24a1
10 changed files with 21 additions and 21 deletions
|
@ -41,7 +41,7 @@ public class TRTickHandler {
|
|||
@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
|
||||
public void onPlayerTick(TickEvent.PlayerTickEvent e) {
|
||||
EntityPlayer player = e.player;
|
||||
Item chestslot = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) != ItemStack.EMPTY
|
||||
Item chestslot = !player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).isEmpty()
|
||||
? player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem() : null;
|
||||
|
||||
if (previouslyWearing != chestslot && previouslyWearing == ModItems.CLOAKING_DEVICE && player.isInvisible()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue