mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-23 21:39:51 +00:00
Fix #1112 Improve IItemHandler Integration and Backpack
This commit is contained in:
1 parent
a312afedd3
commit
0ae2e36e90
33 files changed
+312
-1157
No files matched your search
@@ -18,6 +18,10 @@ import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.wrapper.InvWrapper;
|
||||
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.core.PluginCore;
|
||||
import forestry.core.config.Constants;
|
||||
@@ -223,8 +227,10 @@ public class TileEnginePeat extends TileEngine implements ISidedInventory {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!InventoryUtil.moveOneItemToPipe(wasteInventory, getTileCache())) {
|
||||
InventoryUtil.moveItemStack(wasteInventory, inventoryCache.getAdjacentInventories());
|
||||
IItemHandler wasteItemHandler = new InvWrapper(wasteInventory);
|
||||
|
||||
if (!InventoryUtil.moveOneItemToPipe(wasteItemHandler, getTileCache())) {
|
||||
InventoryUtil.moveItemStack(wasteItemHandler, inventoryCache.getAdjacentInventories());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user