use of lumien.randomthings.block.BlockLightRedirector in project Random-Things by lumien231.
the class MessageLightRedirector method onMessage.
@Override
public void onMessage(MessageContext context) {
WorldClient worldObj = Minecraft.getMinecraft().world;
if (worldObj != null && worldObj.provider.getDimension() == dimension && worldObj.isBlockLoaded(pos)) {
for (EnumFacing facing : EnumFacing.VALUES) {
if (!(worldObj.getBlockState(pos.offset(facing)).getBlock() instanceof BlockLightRedirector)) {
IBlockState state = worldObj.getBlockState(pos.offset(facing));
worldObj.notifyBlockUpdate(pos.offset(facing), state, state, 3);
}
}
}
}
Aggregations