diff --git a/src/machines/java/com/enderio/machines/common/blockentity/SoulBinderBlockEntity.java b/src/machines/java/com/enderio/machines/common/blockentity/SoulBinderBlockEntity.java index 193ab81e51..d185ab7da3 100644 --- a/src/machines/java/com/enderio/machines/common/blockentity/SoulBinderBlockEntity.java +++ b/src/machines/java/com/enderio/machines/common/blockentity/SoulBinderBlockEntity.java @@ -29,6 +29,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluids; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.templates.FluidTank; @@ -131,10 +132,18 @@ protected void onContentsChanged() { @Override public int fill(FluidStack resource, FluidAction action) { - if (!this.getFluid().getFluid().isSame(EIOFluids.XP_JUICE.getSource()) && this.isFluidValid(resource)) { // Auto convert to own fluid (source) type - resource = new FluidStack(EIOFluids.XP_JUICE.getSource(), resource.getAmount()); + // Convert into XP Juice + if (this.isFluidValid(resource)) { + var currentFluid = this.getFluid().getFluid(); + if (currentFluid == Fluids.EMPTY || resource.getFluid().isSame(currentFluid)) { + return super.fill(resource, action); + } else { + return super.fill(new FluidStack(currentFluid, resource.getAmount()), action); + } } - return super.fill(resource, action); + + // Non-XP is not allowed. + return 0; } }; }