mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +01:00
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:
parent
1abc3a8bf9
commit
fae6e39b2a
4 changed files with 9 additions and 6 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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"));
|
||||||
|
|
Loading…
Reference in a new issue