Posted August 31, 201510 yr In my blocks i have a fild like the blockBounds holding minX,minY&minZ aswell as maxX, maxY, maxZ. No if the player is holding the item of that block i wanna draw a box showing the player how big the block will be and where he can set it. I tried this in DrawBlockHighlight event, but the box is at the players position and not at the position of the highlighted block. How can i fix this? So this i swhat i currently do: @SubscribeEvent public void onBlockHighlight(DrawBlockHighlightEvent e){ if(e.player.getCurrentEquippedItem()!=null){ Item i = e.player.getCurrentEquippedItem().getItem(); if(Block.getBlockFromItem(i) instanceof RLMBlockContainer){ RLMBlockContainer b = (RLMBlockContainer) Block.getBlockFromItem(i); BlockPos p = e.target.getBlockPos(); e.context.drawOutlinedBoundingBox(new AxisAlignedBB(b.dimensions[0], b.dimensions[1],b.dimensions[2],b.dimensions[3], b.dimensions[4], b.dimensions[5]), 100); } } } And this is how it looks:
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.