Hello I am stuck on how to make an inventory like a chest for piston extensions. When a player click a piston head it will be like a chest and an inventory will open witch you can put items in and then retrieve them. But i dont know how to make a inventory for each block Please help -awesomer3
well for the head you need to do 2 ways of checking .. you can check if its piston head blocks when piston is extended and for retracted pistons you can check which way piston is facing "find the head side" get the block that player is facing when right clicking "has to be piston" get which side player is looking "has to be the side with head" and if they equal open the menu
Garris0n ik i just need help i dont want you to do it for me just give me an example code for me to build on
also here is what i use for checking the face of a block Code:java if (is.getType() == Material.GLASS_BOTTLE) { List<Block> blocks = event.getPlayer().getLastTwoTargetBlocks(null, 5); //5 is the range if (blocks.size() > 1) { BlockFace face = ((Block)blocks.get(1)).getFace((Block)blocks.get(0)); event.getPlayer().sendMessage(face + " test"); } for range if you set it 5 and try clicking away "more than 5 blocks" it will not give correct result . so make range bigger if you want to get a correct result on far range "this code is on @EventHandler public void onPlayerInteract(PlayerInteractEvent event)" so on rightclicking it gives you the face of block you are looking at