mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 01:54:59 +00:00
fix wrong bytes display when ingrentent isn't enough and a possible dupe from fluid packet decoder
This commit is contained in:
1 parent
b6b9f71677
commit
ab4acbe5eb
7 files changed
+56
-33
No files matched your search
@@ -32,19 +32,22 @@ public class ItemFluidEncodedPattern extends ItemEncodedPattern {
|
||||
GameRegistry.registerItem(this, NameConst.ITEM_FLUID_ENCODED_PATTERN, FluidCraft.MODID);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCheckedInformation(final ItemStack stack, final EntityPlayer player, final List<String> lines, final boolean displayMoreInfo )
|
||||
{
|
||||
NBTTagCompound data = stack.getTagCompound();
|
||||
final boolean combine = data.getBoolean("combine");
|
||||
final boolean prio = data.getBoolean("prioritize");
|
||||
super.addCheckedInformation(stack,player,lines,displayMoreInfo);
|
||||
super.addCheckedInformation(stack, player, lines, displayMoreInfo);
|
||||
// lines.add(String.format("%s: %s",combine ? StatCollector.translateToLocal(NameConst.TT_KEY+"combine"):StatCollector.translateToLocal(NameConst.TT_KEY+"not_combine"),combine ? GuiText.Yes.getLocal() : GuiText.No.getLocal()));
|
||||
// lines.add(String.format("%s: %s",prio ? StatCollector.translateToLocal(NameConst.TT_KEY+"prio"):StatCollector.translateToLocal(NameConst.TT_KEY+"not_prio"),prio ? GuiText.Yes.getLocal() : GuiText.No.getLocal()));
|
||||
}
|
||||
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
public ItemStack stack(int size) {
|
||||
return new ItemStack(this, size);
|
||||
}
|
||||
|
||||
@@ -64,12 +64,13 @@ public class TileFluidPacketDecoder extends AENetworkTile implements IGridTickab
|
||||
inventory.setInventorySlotContents(0, null);
|
||||
return TickRateModulation.SLEEP;
|
||||
}
|
||||
IAEFluidStack aeFluid = AEFluidStack.create(fluid);
|
||||
IAEFluidStack aeFluid = AEFluidStack.create(fluid.copy());
|
||||
IEnergyGrid energyGrid = node.getGrid().getCache(IEnergyGrid.class);
|
||||
IMEMonitor<IAEFluidStack> fluidGrid = node.getGrid().<IStorageGrid>getCache(IStorageGrid.class).getFluidInventory();
|
||||
IAEFluidStack remaining = Platform.poweredInsert(energyGrid, fluidGrid, aeFluid, ownActionSource);
|
||||
if (remaining != null) {
|
||||
if (remaining.getStackSize() == aeFluid.getStackSize()) {
|
||||
inventory.setInventorySlotContents(0, ItemFluidPacket.newStack(remaining.getFluidStack()));
|
||||
return TickRateModulation.SLOWER;
|
||||
}
|
||||
inventory.setInventorySlotContents(0, ItemFluidPacket.newStack(remaining.getFluidStack()));
|
||||
|
||||
Reference in new issue
Block a user