use of crazypants.enderio.base.conduit.ConduitDisplayMode in project EnderIO by SleepyTrousers.
the class TileConduitBundle method updateEntityClient.
private void updateEntityClient() {
boolean markForUpdate = false;
if (clientUpdated) {
// TODO: This is not the correct solution here but just marking the block for a render update server side
// seems to get out of sync with the client sometimes so connections are not rendered correctly
markForUpdate = true;
clientUpdated = false;
}
FacadeRenderState curRS = getFacadeRenderedAs();
FacadeRenderState rs = ConduitUtil.getRequiredFacadeRenderState(this, NullHelper.notnull(EnderIO.proxy.getClientPlayer(), "Proxy#getClientPlayer"));
if (ConduitConfig.updateLightingWhenHidingFacades.get()) {
int shouldBeLO = rs == FacadeRenderState.FULL ? -1 : 0;
if (lightOpacityOverride != shouldBeLO) {
setLightOpacityOverride(shouldBeLO);
world.checkLight(getPos());
}
}
if (curRS != rs) {
setFacadeRenderAs(rs);
if (!ConduitUtil.forceSkylightRecalculation(world, getPos())) {
markForUpdate = true;
}
}
ConduitDisplayMode curMode = ConduitDisplayMode.getDisplayMode(EnderIO.proxy.getClientPlayer().getHeldItemMainhand());
if (curMode != lastMode && !(lastMode.isAll() && curMode.isAll())) {
markForUpdate = true;
}
lastMode = curMode;
if (markForUpdate) {
updateBlock();
}
}
Aggregations