Stealthy Evaporation

- Fixed fluid networks losing fluids when extracted amount is lower than a pumps transfer speed
- Fixed JEI plugin claiming that some occultism's ritual recipes work in a compacter
- Fixed press/deployer/spout failing to process a belt item when another item is processed simultaneously further down the belt
This commit is contained in:
simibubi 2021-11-24 14:06:10 +01:00
parent 52eca118ad
commit 393cc55e71
3 changed files with 13 additions and 4 deletions

View file

@ -344,7 +344,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
}
private static final List<ResourceLocation> RECIPE_DENY_LIST =
ImmutableList.of(new ResourceLocation("occultism", "spirit_trade"));
ImmutableList.of(new ResourceLocation("occultism", "spirit_trade"), new ResourceLocation("occultism", "ritual"));
public static <C extends IInventory> boolean canCompress(IRecipe<C> recipe) {
NonNullList<Ingredient> ingredients = recipe.getIngredients();

View file

@ -209,6 +209,8 @@ public class FluidNetwork {
if (transfer.isEmpty())
return;
if (simulate)
flowSpeed = transfer.getAmount();
List<Pair<BlockFace, LazyOptional<IFluidHandler>>> availableOutputs = new ArrayList<>(targets);
while (!availableOutputs.isEmpty() && transfer.getAmount() > 0) {

View file

@ -115,11 +115,12 @@ public class BeltInventory {
}
// Don't move if other items are waiting in front
boolean noMovement = false;
float currentPos = currentItem.beltPosition;
if (stackInFront != null) {
float diff = stackInFront.beltPosition - currentPos;
if (Math.abs(diff) <= spacing)
continue;
noMovement = true;
movement =
beltMovementPositive ? Math.min(movement, diff - spacing) : Math.max(movement, diff + spacing);
}
@ -138,7 +139,7 @@ public class BeltInventory {
// Belt item processing
if (!onClient && horizontal) {
ItemStack item = currentItem.stack;
if (handleBeltProcessingAndCheckIfRemoved(currentItem, nextOffset)) {
if (handleBeltProcessingAndCheckIfRemoved(currentItem, nextOffset, noMovement)) {
iterator.remove();
belt.sendData();
continue;
@ -148,6 +149,9 @@ public class BeltInventory {
if (currentItem.locked)
continue;
}
if (noMovement)
continue;
// Belt Tunnels
if (BeltTunnelInteractionHandler.flapTunnelsAndCheckIfStuck(this, currentItem, nextOffset))
@ -212,7 +216,7 @@ public class BeltInventory {
}
}
protected boolean handleBeltProcessingAndCheckIfRemoved(TransportedItemStack currentItem, float nextOffset) {
protected boolean handleBeltProcessingAndCheckIfRemoved(TransportedItemStack currentItem, float nextOffset, boolean noMovement) {
int currentSegment = (int) currentItem.beltPosition;
// Continue processing if held
@ -239,6 +243,9 @@ public class BeltInventory {
belt.sendData();
return false;
}
if (noMovement)
return false;
// See if any new belt processing catches the item
if (currentItem.beltPosition > .5f || beltMovementPositive) {