mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
que?
This commit is contained in:
parent
fc967e8878
commit
879d9d1f8a
@ -127,9 +127,9 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
|
|||||||
ItemStack stack = entity.getItemStack();
|
ItemStack stack = entity.getItemStack();
|
||||||
ItemStack remainder = null;
|
ItemStack remainder = null;
|
||||||
if(CrystallizerRecipes.getAmount(stack) > 0) {
|
if(CrystallizerRecipes.getAmount(stack) > 0) {
|
||||||
remainder = InventoryUtil.tryAddItemToInventory(partitioner, 0, 8, stack);
|
remainder = InventoryUtil.tryAddItemToInventory(partitioner, 0, TileEntityCranePartitioner.SLOT_COUNT - 1, stack);
|
||||||
} else {
|
} else {
|
||||||
remainder = InventoryUtil.tryAddItemToInventory(partitioner, 9, 17, stack);
|
remainder = InventoryUtil.tryAddItemToInventory(partitioner, TileEntityCranePartitioner.SLOT_COUNT, TileEntityCranePartitioner.SLOT_COUNT * 2 - 1, stack);
|
||||||
}
|
}
|
||||||
if(remainder != null) {
|
if(remainder != null) {
|
||||||
EntityItem item = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, remainder.copy());
|
EntityItem item = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, remainder.copy());
|
||||||
@ -159,6 +159,8 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
|
|||||||
|
|
||||||
for(ItemStack stack : stacks) {
|
for(ItemStack stack : stacks) {
|
||||||
int amount = CrystallizerRecipes.getAmount(stack);
|
int amount = CrystallizerRecipes.getAmount(stack);
|
||||||
|
if(amount == 0) amount = stack.stackSize; // eject full stack if invalid type somehow ended up in the queue
|
||||||
|
|
||||||
while(stack.stackSize >= amount) {
|
while(stack.stackSize >= amount) {
|
||||||
ItemStack entityStack = stack.copy();
|
ItemStack entityStack = stack.copy();
|
||||||
entityStack.stackSize = amount;
|
entityStack.stackSize = amount;
|
||||||
@ -185,7 +187,7 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canExtractItem(int slot, ItemStack stack, int side) {
|
public boolean canExtractItem(int slot, ItemStack stack, int side) {
|
||||||
return slot >= SLOT_COUNT;
|
return slot >= SLOT_COUNT; // declog
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user