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
public void onPlace(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) {
super.onPlace(state, worldIn, pos, oldState, isMoving);
updateAllSides(state, worldIn, pos);
}

View file

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

View file

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

View file

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