mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
Interaction hooks need to be re-added but compiles {Doesn't run}
This commit is contained in:
1 parent
846910b8c8
commit
7b7156e87f
11 files changed
+136
-74
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package net.minecraftforge.items.wrapper;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class PlayerArmorInvWrapper extends InvWrapper
|
||||
@@ -31,8 +32,17 @@ public class PlayerArmorInvWrapper extends InvWrapper
|
||||
@Override
|
||||
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate)
|
||||
{
|
||||
EntityEquipmentSlot equ = null;
|
||||
for (EntityEquipmentSlot s : EntityEquipmentSlot.values())
|
||||
{
|
||||
if (s.func_188453_a() == EntityEquipmentSlot.Type.ARMOR && s.func_188454_b() == slot)
|
||||
{
|
||||
equ = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// check if it's valid for the armor slot
|
||||
if (slot < 4 && stack != null && stack.getItem().isValidArmor(stack, 3 - slot, inventoryPlayer.player))
|
||||
if (slot < 4 && stack != null && stack.getItem().isValidArmor(stack, equ, inventoryPlayer.player))
|
||||
{
|
||||
return super.insertItem(slot + offset, stack, simulate);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user