mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Fix patternchest -> slab not keeping the inventory #1172
This commit is contained in:
1 parent
df64bc8197
commit
2d6c7f7367
1 file changed
+16
@@ -44,6 +44,22 @@ public class TinkerToolEvents
|
||||
AbilityHelper.spawnItemAtPlayer(event.player, new ItemStack(TinkerTools.manualBook, 1, 1));
|
||||
}
|
||||
}
|
||||
|
||||
// slab pattern chest
|
||||
if(item == Item.getItemFromBlock(TinkerTools.craftingSlabWood) && event.crafting.getItemDamage() == 4) {
|
||||
// copy over NBT
|
||||
for(int i = 0; i < event.craftMatrix.getSizeInventory(); i++) {
|
||||
ItemStack stack = event.craftMatrix.getStackInSlot(i);
|
||||
if(stack == null)
|
||||
continue;
|
||||
// regular pattern chest
|
||||
if(stack.getItem() == Item.getItemFromBlock(TinkerTools.toolStationWood) && stack.getItemDamage() == 5)
|
||||
{
|
||||
event.crafting.setTagCompound(stack.getTagCompound());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user