Belt Shadow Legends

- Fixed a lighting issue for the belt item renderer
This commit is contained in:
simibubi 2021-09-27 13:43:59 +02:00
parent fa7039a04a
commit 34d430989c

View file

@ -227,10 +227,7 @@ public class BeltTileEntity extends KineticTileEntity implements ILightUpdateLis
int length = compound.getInt("Length"); int length = compound.getInt("Length");
if (beltLength != length) { if (beltLength != length) {
beltLength = length; beltLength = length;
if (level != null) light = null;
initializeLight();
else
light = null;
} }
} }
@ -523,7 +520,7 @@ public class BeltTileEntity extends KineticTileEntity implements ILightUpdateLis
return getController().equals(((BeltTileEntity) target).getController()) ? 1 : 0; return getController().equals(((BeltTileEntity) target).getController()) ? 1 : 0;
return 0; return 0;
} }
public void invalidateItemHandler() { public void invalidateItemHandler() {
itemHandler.invalidate(); itemHandler.invalidate();
} }
@ -535,7 +532,7 @@ public class BeltTileEntity extends KineticTileEntity implements ILightUpdateLis
BlockState state = getBlockState(); BlockState state = getBlockState();
return state != null && state.hasProperty(BeltBlock.PART) && state.getValue(BeltBlock.PART) == BeltPart.START; return state != null && state.hasProperty(BeltBlock.PART) && state.getValue(BeltBlock.PART) == BeltPart.START;
} }
@Override @Override
public boolean onLightUpdate(IBlockDisplayReader world, LightType type, GridAlignedBB changed) { public boolean onLightUpdate(IBlockDisplayReader world, LightType type, GridAlignedBB changed) {
if (this.remove) { if (this.remove) {