mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
Fix #2822
This commit is contained in:
1 parent
f7eb9422e6
commit
01d1e9df4b
1 file changed
+5
-8
@@ -24,6 +24,7 @@ import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
public class TileCraftCrate extends TileOpenCrate {
|
||||
|
||||
@@ -128,7 +129,7 @@ public class TileCraftCrate extends TileOpenCrate {
|
||||
return false;
|
||||
}
|
||||
}, 3, 3);
|
||||
for(int i = 0; i < 9; i++) {
|
||||
for(int i = 0; i < craft.getSizeInventory(); i++) {
|
||||
ItemStack stack = itemHandler.getStackInSlot(i);
|
||||
|
||||
if(stack.isEmpty() || isLocked(i) || stack.getItem() == ModItems.manaResource && stack.getItemDamage() == 11)
|
||||
@@ -141,13 +142,9 @@ public class TileCraftCrate extends TileOpenCrate {
|
||||
if(recipe.matches(craft, world)) {
|
||||
itemHandler.setStackInSlot(9, recipe.getCraftingResult(craft));
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
ItemStack stack = itemHandler.getStackInSlot(i);
|
||||
if(stack.isEmpty())
|
||||
continue;
|
||||
|
||||
ItemStack container = stack.getItem().getContainerItem(stack);
|
||||
itemHandler.setStackInSlot(i, container);
|
||||
List<ItemStack> remainders = recipe.getRemainingItems(craft);
|
||||
for(int i = 0; i < craft.getSizeInventory(); i++) {
|
||||
itemHandler.setStackInSlot(i, remainders.get(i));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user