Posted September 25, 201411 yr I am interested in doing a gas for my mod (among other things) that is light sensitive and reaction depends on the light level itself, is there a means to which I can detect how much light it recieves? or any proximal block suffices
September 26, 201411 yr Author This is the code I use to check it public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ){ if (!world.isRemote){ System.out.println("Light value: " + world.getBlockLightValue(x, y, z)); System.out.println("Light_do true value: " + world.getBlockLightValue_do(x, y, z, true)); System.out.println("Light_do false value: " + world.getBlockLightValue_do(x, y, z, false)); System.out.println("saved light block: " + world.getSavedLightValue(EnumSkyBlock.Block, x, y, z)); System.out.println("saved light sky: " + world.getSavedLightValue(EnumSkyBlock.Sky, x, y, z)); } return true; } This is what I get Light value: 0 Light_do true value: 0 Light_do false value: 0 saved light block: 0 saved light sky: 0
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.