mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-01 01:47:02 +01:00
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:
parent
52eca118ad
commit
393cc55e71
3 changed files with 13 additions and 4 deletions
|
@ -344,7 +344,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<ResourceLocation> RECIPE_DENY_LIST =
|
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) {
|
public static <C extends IInventory> boolean canCompress(IRecipe<C> recipe) {
|
||||||
NonNullList<Ingredient> ingredients = recipe.getIngredients();
|
NonNullList<Ingredient> ingredients = recipe.getIngredients();
|
||||||
|
|
|
@ -209,6 +209,8 @@ public class FluidNetwork {
|
||||||
|
|
||||||
if (transfer.isEmpty())
|
if (transfer.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
if (simulate)
|
||||||
|
flowSpeed = transfer.getAmount();
|
||||||
|
|
||||||
List<Pair<BlockFace, LazyOptional<IFluidHandler>>> availableOutputs = new ArrayList<>(targets);
|
List<Pair<BlockFace, LazyOptional<IFluidHandler>>> availableOutputs = new ArrayList<>(targets);
|
||||||
while (!availableOutputs.isEmpty() && transfer.getAmount() > 0) {
|
while (!availableOutputs.isEmpty() && transfer.getAmount() > 0) {
|
||||||
|
|
|
@ -115,11 +115,12 @@ public class BeltInventory {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't move if other items are waiting in front
|
// Don't move if other items are waiting in front
|
||||||
|
boolean noMovement = false;
|
||||||
float currentPos = currentItem.beltPosition;
|
float currentPos = currentItem.beltPosition;
|
||||||
if (stackInFront != null) {
|
if (stackInFront != null) {
|
||||||
float diff = stackInFront.beltPosition - currentPos;
|
float diff = stackInFront.beltPosition - currentPos;
|
||||||
if (Math.abs(diff) <= spacing)
|
if (Math.abs(diff) <= spacing)
|
||||||
continue;
|
noMovement = true;
|
||||||
movement =
|
movement =
|
||||||
beltMovementPositive ? Math.min(movement, diff - spacing) : Math.max(movement, diff + spacing);
|
beltMovementPositive ? Math.min(movement, diff - spacing) : Math.max(movement, diff + spacing);
|
||||||
}
|
}
|
||||||
|
@ -138,7 +139,7 @@ public class BeltInventory {
|
||||||
// Belt item processing
|
// Belt item processing
|
||||||
if (!onClient && horizontal) {
|
if (!onClient && horizontal) {
|
||||||
ItemStack item = currentItem.stack;
|
ItemStack item = currentItem.stack;
|
||||||
if (handleBeltProcessingAndCheckIfRemoved(currentItem, nextOffset)) {
|
if (handleBeltProcessingAndCheckIfRemoved(currentItem, nextOffset, noMovement)) {
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
belt.sendData();
|
belt.sendData();
|
||||||
continue;
|
continue;
|
||||||
|
@ -149,6 +150,9 @@ public class BeltInventory {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (noMovement)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Belt Tunnels
|
// Belt Tunnels
|
||||||
if (BeltTunnelInteractionHandler.flapTunnelsAndCheckIfStuck(this, currentItem, nextOffset))
|
if (BeltTunnelInteractionHandler.flapTunnelsAndCheckIfStuck(this, currentItem, nextOffset))
|
||||||
continue;
|
continue;
|
||||||
|
@ -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;
|
int currentSegment = (int) currentItem.beltPosition;
|
||||||
|
|
||||||
// Continue processing if held
|
// Continue processing if held
|
||||||
|
@ -240,6 +244,9 @@ public class BeltInventory {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (noMovement)
|
||||||
|
return false;
|
||||||
|
|
||||||
// See if any new belt processing catches the item
|
// See if any new belt processing catches the item
|
||||||
if (currentItem.beltPosition > .5f || beltMovementPositive) {
|
if (currentItem.beltPosition > .5f || beltMovementPositive) {
|
||||||
int firstUpcomingSegment = (int) (currentItem.beltPosition + (beltMovementPositive ? .5f : -.5f));
|
int firstUpcomingSegment = (int) (currentItem.beltPosition + (beltMovementPositive ? .5f : -.5f));
|
||||||
|
|
Loading…
Reference in a new issue