Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float faceX, float faceY, float faceZ)
- {
- if (!world.isRemote && player.getHeldItem() == null && !player.isSneaking())
- {
- Logger.Info(String.format("onBlockActivated (%d,%d,%d)", x, y, z));
- //world.setBlockMetadataWithNotify(x, y, z, 1, 3);
- //this.setLightLevel(15);
- TileEntity te = world.getTileEntity(x,y,z);
- if (te instanceof TileEntityScreen)
- {
- TileEntityScreen screen = (TileEntityScreen)te;
- float fDepth = screen.Depth;
- fDepth = fDepth-0.1f < 0.1f ? 1.0f : fDepth-0.1f;
- screen.Depth = fDepth;
- setBlockBoundsBasedOnState(world, x, y, z);
- world.markBlockForUpdate(x, y, z);
- }
- return true;
- }
- else
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement