Jump to content

talera

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by talera

  1. ok i have it using RayTraceResult Thanks
  2. IBlockState iblockstate = Minecraft.getMinecraft().world.getBlockState(Minecraft.getMinecraft().objectMouseOver.getBlockPos()); with this and left click on mob the games crashes. have you a idea ?
  3. Thank you!
  4. Is there anything to check if a player keeps the left mouse button pressed? Playerleftclick event only works if you press the left click several times unfortunately not if you hold it down.
  5. Thanks first. I have the following function. I can only break blocks if I have the block in my hand. but if I don't have the block in my hand I can't break it but unfortunately I see the block particle when I hit it in creative. Can you please write me an example of how I might get this into this function? @SubscribeEvent public static void blockBreakEv(final BreakEvent event) { final Block block = event.getState().getBlock(); if (block instanceof Inversiveblock) { final EntityPlayer player = event.getPlayer(); final Item item = player.getHeldItemMainhand().getItem(); if (!(Block.getBlockFromItem(item) instanceof Inversiveblock)) { event.setCanceled(true); return; } } }
  6. I have created a block that is not breakable . But this only works when you are in survival mode. When I am in Creative mode I can destroy it. Is there anything that makes it unbreakable in Creative mode?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.