small fixes

This commit is contained in:
modmuss50 2019-07-23 17:51:38 +01:00
parent 56503ad117
commit 1e52477b9e

View file

@ -146,6 +146,7 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
// We are in BlockEntity.create method during chunk load.
this.checkOverfill = false;
}
updatePanel();
super.fromTag(tag);
}
@ -153,6 +154,10 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
@Override
public void onLoad() {
super.onLoad();
updatePanel();
}
private void updatePanel(){
Block panelBlock = world.getBlockState(pos).getBlock();
if (panelBlock instanceof BlockSolarPanel) {
BlockSolarPanel solarPanelBlock = (BlockSolarPanel) panelBlock;