Patch the Patch

- Bugfixes to recently added/changed functionality
This commit is contained in:
simibubi 2022-03-12 22:27:33 +01:00
parent 0b17aab01e
commit 939b276c56
3 changed files with 9 additions and 10 deletions

View file

@ -51,13 +51,13 @@ public class ItemDrainCategory extends CreateRecipeCategory<EmptyingRecipe> {
.withFluidOutputs(fluidFromPotionItem)
.withSingleItemOutput(new ItemStack(Items.GLASS_BOTTLE))
.build());
return;
continue;
}
LazyOptional<IFluidHandlerItem> capability =
stack.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY);
if (!capability.isPresent())
return;
continue;
ItemStack copy = stack.copy();
capability = copy.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY);
@ -65,9 +65,9 @@ public class ItemDrainCategory extends CreateRecipeCategory<EmptyingRecipe> {
FluidStack extracted = handler.drain(1000, FluidAction.EXECUTE);
ItemStack result = handler.getContainer();
if (extracted.isEmpty())
return;
continue;
if (result.isEmpty())
return;
continue;
Ingredient ingredient = Ingredient.of(stack);
ResourceLocation itemName = stack.getItem()

View file

@ -56,13 +56,13 @@ public class SpoutCategory extends CreateRecipeCategory<FillingRecipe> {
.withFluidIngredients(FluidIngredient.fromFluidStack(fluidFromPotionItem))
.withSingleItemOutput(stack)
.build());
return;
continue;
}
LazyOptional<IFluidHandlerItem> capability =
stack.getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY);
if (!capability.isPresent())
return;
continue;
for (FluidStack fluidStack : fluidStacks) {
ItemStack copy = stack.copy();

View file

@ -179,11 +179,8 @@ public class OpenEndedPipe extends FlowSource {
return false;
if (fluid.isEmpty())
return false;
if (!FluidHelper.hasBlockState(fluid.getFluid())) {
if (!simulate)
applyEffects(fluid);
if (!FluidHelper.hasBlockState(fluid.getFluid()))
return true;
}
if (!fluidState.isEmpty() && fluidState.getType() != fluid.getFluid()) {
FluidReactions.handlePipeSpillCollision(world, outputPos, fluid.getFluid(), fluidState);
@ -272,6 +269,8 @@ public class OpenEndedPipe extends FlowSource {
int fill = super.fill(resource, action);
if (action.simulate())
return fill;
if (!resource.isEmpty())
applyEffects(resource);
if (getFluidAmount() == 1000 || !FluidHelper.hasBlockState(containedFluidStack.getFluid()))
if (provideFluidToSpace(containedFluidStack, false))
setFluid(FluidStack.EMPTY);