Super ignored

- Fixed pumps and valves not registering their stress impact properly after changing state
- Fixed belts not applying stress when created in certain orientations
- Fixed belt items flickering due to previous changes
This commit is contained in:
simibubi 2021-10-07 13:30:19 +02:00
parent 1abc3a8bf9
commit fae6e39b2a
4 changed files with 9 additions and 6 deletions

View file

@ -80,6 +80,7 @@ public class WaterWheelBlock extends DirectionalKineticBlock implements ITE<Wate
@Override @Override
public void onPlace(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) { public void onPlace(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
super.onPlace(state, worldIn, pos, oldState, isMoving);
updateAllSides(state, worldIn, pos); updateAllSides(state, worldIn, pos);
} }

View file

@ -148,6 +148,7 @@ public class PumpBlock extends DirectionalKineticBlock implements IWaterLoggable
@Override @Override
public void onPlace(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) { public void onPlace(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) {
super.onPlace(state, world, pos, oldState, isMoving);
if (world.isClientSide) if (world.isClientSide)
return; return;
if (state != oldState) if (state != oldState)

View file

@ -102,6 +102,7 @@ public class FluidValveBlock extends DirectionalAxisKineticBlock implements IAxi
@Override @Override
public void onPlace(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) { public void onPlace(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) {
super.onPlace(state, world, pos, oldState, isMoving);
if (world.isClientSide) if (world.isClientSide)
return; return;
if (state != oldState) if (state != oldState)

View file

@ -101,11 +101,12 @@ public class BeltTileEntity extends KineticTileEntity implements ILightUpdateLis
@Override @Override
public void tick() { public void tick() {
super.tick();
// Init belt // Init belt
if (beltLength == 0) if (beltLength == 0)
BeltBlock.initBelt(level, worldPosition); BeltBlock.initBelt(level, worldPosition);
super.tick();
if (!AllBlocks.BELT.has(level.getBlockState(worldPosition))) if (!AllBlocks.BELT.has(level.getBlockState(worldPosition)))
return; return;
@ -211,6 +212,7 @@ public class BeltTileEntity extends KineticTileEntity implements ILightUpdateLis
@Override @Override
protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) { protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) {
int prevBeltLength = beltLength;
super.fromTag(state, compound, clientPacket); super.fromTag(state, compound, clientPacket);
if (compound.getBoolean("IsController")) if (compound.getBoolean("IsController"))
@ -224,12 +226,10 @@ public class BeltTileEntity extends KineticTileEntity implements ILightUpdateLis
controller = NBTUtil.readBlockPos(compound.getCompound("Controller")); controller = NBTUtil.readBlockPos(compound.getCompound("Controller"));
trackerUpdateTag = compound; trackerUpdateTag = compound;
index = compound.getInt("Index"); index = compound.getInt("Index");
int length = compound.getInt("Length"); beltLength = compound.getInt("Length");
if (beltLength != length) { if (prevBeltLength != beltLength)
beltLength = length;
light = null; light = null;
} }
}
if (isController()) if (isController())
getInventory().read(compound.getCompound("Inventory")); getInventory().read(compound.getCompound("Inventory"));