Compare commits

..
Author SHA1 Message Date
Martin Robertz 273c91b816 Merge remote-tracking branch 'origin/cell_workbench' into dev 2023-04-30 11:47:33 +02:00
Martin Robertz acfdd9087c Merge remote-tracking branch 'origin/export_fix_a' into dev 2023-04-30 11:47:14 +02:00
Firenoo 54bdeabd99 Allow all 63 partition items to be used for fluid cells
Previously, only one partition item was allowed. This fix will have
the cell consider all 63 slots. If you configure more than 1 or 5
cell slots, it works as expected - up to 1 or 5 of the whitelisted
fluids can be stored at a time.

This will degrade performance slightly.

Signed-off-by: Firenoo <[email protected]>
2023-04-29 20:46:52 -07:00
Firenoo df045ec1a8 Fix fluid export bus voiding fluids on crafting only mode
The Fluid Export Bus was voiding fluids on craft only mode because it
tried to craft it, and decided to continue with the normal export logic:
Extract fluid from ME system and fill the tank.

Unfortunately, there was a condition that prevented the extracted fluid
from going anywhere depending on craft only mode, so it got voided.

Commit fixes this by skipping the normal extract logic if set to craft
only. It also removes fluid simulation (we will see if they were actually
needed. Initial tests indicate no), which should improve performance by
a little bit.

Signed-off-by: Firenoo <[email protected]>
2023-04-29 19:59:03 -07:00
Martin Robertz 4e1983b87f Merge remote-tracking branch 'origin/byebyeEC2' into dev 2023-04-29 20:14:07 +02:00
Firenoo 50c4015d54 apply spotless
too lazy to rebase
2023-04-28 10:01:34 -07:00
Firenoo b7b68515f1 Add more tooltip help and cell handler for void cell 2023-04-28 10:01:34 -07:00
Firenoo 3245de6ba1 Add handlers for deprecated item cells
Now the placeholder should work automatically in a drive.

The void cell is still a WIP.
2023-04-28 10:01:33 -07:00
Firenoo 3e2a0482e9 Fixed some storage cell conversion issues
The placeholders did not transfer NBT data properly
2023-04-28 10:01:33 -07:00
Firenoo 6b9e500655 Finish basic item replacement code
- parts work
- items are remapped properly, and converted when they enter the player inventory
2023-04-28 10:01:32 -07:00
Firenoo 709805b4c6 API changes to make room for Extra Cells fluid placeholder 2023-04-28 10:01:32 -07:00
Firenoo bfaec12011 set config "replaceEC2" to default true 2023-04-28 10:01:32 -07:00
Firenoo 7ad5b9d297 EC2 Deprecation: Part 3 - Parts
Parts are deprecated.
2023-04-28 10:01:31 -07:00
Firenoo 68c0abba95 EC2 deprecation: Part 2 - Blocks 2023-04-28 10:01:31 -07:00
Firenoo 682489de18 EC2 deprecation: Part 1 - Items
Laying the groundwork for absorbing EC2 mappings.
2023-04-28 10:01:28 -07:00
2 changed files with 5 additions and 17 deletions

No files matched your search

@@ -131,19 +131,12 @@ public class BlockCertusQuartzTank extends BaseBlockContainer implements IRegist
if (liquid != null) {
int amountFilled = tank.fill(ForgeDirection.UNKNOWN, liquid, true);
if (amountFilled != 0 && !entityplayer.capabilities.isCreativeMode && current.getItem() != null) {
ItemStack empty;
if (FluidContainerRegistry.isContainer(current)) {
empty = FluidContainerRegistry.drainFluidContainer(current);
} else {
// Try this as a fallback.
entityplayer.inventory.addItemStackToInventory(current.getItem().getContainerItem(current));
empty = current.getItem().getContainerItem(current);
}
if (current.stackSize > 1) {
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem].stackSize -= 1;
entityplayer.inventory.addItemStackToInventory(empty);
entityplayer.inventory.addItemStackToInventory(current.getItem().getContainerItem(current));
} else {
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = empty;
entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = current.getItem()
.getContainerItem(current);
}
}
return true;
@@ -132,17 +132,12 @@ public class PartFluidExportBus extends FCSharedFluidBus implements ICraftingReq
this.source);
continue;
}
// Find out how much to push
final IAEFluidStack toPush = fluid.copy();
final int amtToInsert = fh.fill(this.getSide().getOpposite(), toPush.getFluidStack(), false);
toPush.setStackSize(amtToInsert);
// Extract from the ME system. This might not be the same amount we actually send...
final IAEFluidStack real = inv.extractItems(toPush, Actionable.MODULATE, this.source);
// Extract from the ME system.
final IAEFluidStack real = inv.extractItems(fluid, Actionable.MODULATE, this.source);
if (real != null) {
int realInserted = fh.fill(this.getSide().getOpposite(), real.getFluidStack(), true);
if (realInserted < real.getStackSize()) {
// Could not use the entirety of the amount we extracted, so put it back.
// This can result in voiding fluids if there's nowhere for the fluids to go.
fluid.setStackSize(real.getStackSize() - realInserted);
inv.injectItems(fluid, Actionable.MODULATE, this.source);
}