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