Bug Fixes

- Fixed basin not triggering a recipe check when output fluids are emptied
- Fluid behaviour safety on render thread
- Wrenchable Depots
This commit is contained in:
simibubi 2020-12-19 18:05:37 +01:00
parent f45c0ca182
commit 2a57de3205
3 changed files with 10 additions and 3 deletions

View file

@ -58,6 +58,9 @@ public abstract class FluidTransportBehaviour extends TileEntityBehaviour {
World world = getWorld(); World world = getWorld();
BlockPos pos = getPos(); BlockPos pos = getPos();
boolean onClient = world.isRemote; boolean onClient = world.isRemote;
if (interfaces == null)
return;
Collection<PipeConnection> connections = interfaces.values(); Collection<PipeConnection> connections = interfaces.values();
// Do not provide a lone pipe connection with its own flow input // Do not provide a lone pipe connection with its own flow input

View file

@ -118,7 +118,9 @@ public class BasinTileEntity extends SmartTileEntity {
inputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.INPUT, this, 2, 1000, true) inputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.INPUT, this, 2, 1000, true)
.whenFluidUpdates(() -> contentsChanged = true); .whenFluidUpdates(() -> contentsChanged = true);
outputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.OUTPUT, this, 2, 1000, true).forbidInsertion(); outputTank = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.OUTPUT, this, 2, 1000, true)
.whenFluidUpdates(() -> contentsChanged = true)
.forbidInsertion();
behaviours.add(inputTank); behaviours.add(inputTank);
behaviours.add(outputTank); behaviours.add(outputTank);
@ -250,7 +252,8 @@ public class BasinTileEntity extends SmartTileEntity {
newFacing = test; newFacing = test;
} }
if (preferredSpoutput != null && BasinBlock.canOutputTo(world, pos, preferredSpoutput) && preferredSpoutput != Direction.UP) if (preferredSpoutput != null && BasinBlock.canOutputTo(world, pos, preferredSpoutput)
&& preferredSpoutput != Direction.UP)
newFacing = preferredSpoutput; newFacing = preferredSpoutput;
if (newFacing != currentFacing) if (newFacing != currentFacing)

View file

@ -6,6 +6,7 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack;
import com.simibubi.create.content.contraptions.wrench.IWrenchable;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
@ -34,7 +35,7 @@ import net.minecraftforge.items.ItemStackHandler;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class DepotBlock extends Block implements ITE<DepotTileEntity> { public class DepotBlock extends Block implements ITE<DepotTileEntity>, IWrenchable {
public DepotBlock(Properties p_i48440_1_) { public DepotBlock(Properties p_i48440_1_) {
super(p_i48440_1_); super(p_i48440_1_);