mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-09 19:25:37 +00:00
faster chemplant ejector
This commit is contained in:
parent
b548b90bb3
commit
6b34f06324
@ -19,3 +19,4 @@
|
||||
* Fixed PWR fuel rods not having any radiation value assigned to them
|
||||
* Fixed trenchmaster helmet not having gas mask protection
|
||||
* Fixed large thermobaric artillery rocket still using the wrong slag block
|
||||
* Fixed some of the assembly templates having broken names due to using the wrong way of translating the output
|
||||
|
||||
@ -106,7 +106,7 @@ public class ItemAssemblyTemplate extends Item {
|
||||
return EnumChatFormatting.RED + "Broken Template" + EnumChatFormatting.RESET;
|
||||
}
|
||||
|
||||
String s1 = ("" + StatCollector.translateToLocal(out.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = out.getDisplayName().trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
|
||||
@ -428,6 +428,11 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null;
|
||||
int[] access = sided != null ? sided.getAccessibleSlotsFromSide(dir.ordinal()) : null;
|
||||
|
||||
boolean shouldOutput = true;
|
||||
|
||||
while(shouldOutput) {
|
||||
shouldOutput = false;
|
||||
outer:
|
||||
for(int i = 5; i <= 8; i++) {
|
||||
|
||||
ItemStack out = slots[i];
|
||||
@ -443,10 +448,12 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
|
||||
ItemStack target = inv.getStackInSlot(slot);
|
||||
|
||||
if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize()) {
|
||||
this.decrStackSize(i, 1);
|
||||
target.stackSize++;
|
||||
return;
|
||||
if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < Math.min(target.getMaxStackSize(), inv.getInventoryStackLimit())) {
|
||||
int toDec = Math.min(out.stackSize, Math.min(target.getMaxStackSize(), inv.getInventoryStackLimit()) - target.stackSize);
|
||||
this.decrStackSize(i, toDec);
|
||||
target.stackSize += toDec;
|
||||
shouldOutput = true;
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -462,7 +469,9 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
copy.stackSize = 1;
|
||||
inv.setInventorySlotContents(slot, copy);
|
||||
this.decrStackSize(i, 1);
|
||||
return;
|
||||
shouldOutput = true;
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,6 +272,10 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa
|
||||
ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null;
|
||||
int[] access = sided != null ? sided.getAccessibleSlotsFromSide(coord.getDir().ordinal()) : null;
|
||||
|
||||
boolean shouldOutput = true;
|
||||
while(shouldOutput) {
|
||||
shouldOutput = false;
|
||||
outer:
|
||||
for(int i = indices[2]; i <= indices[3]; i++) {
|
||||
|
||||
ItemStack out = slots[i];
|
||||
@ -288,9 +292,11 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa
|
||||
ItemStack target = inv.getStackInSlot(slot);
|
||||
|
||||
if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize() && target.stackSize < inv.getInventoryStackLimit()) {
|
||||
this.decrStackSize(i, 1);
|
||||
target.stackSize++;
|
||||
return;
|
||||
int toDec = Math.min(out.stackSize, Math.min(target.getMaxStackSize(), inv.getInventoryStackLimit()) - target.stackSize);
|
||||
this.decrStackSize(i, toDec);
|
||||
target.stackSize += toDec;
|
||||
shouldOutput = true;
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,7 +312,9 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa
|
||||
copy.stackSize = 1;
|
||||
inv.setInventorySlotContents(slot, copy);
|
||||
this.decrStackSize(i, 1);
|
||||
return;
|
||||
shouldOutput = true;
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user