Jump to content
  • Home
  • Files
  • Docs
  • Merch
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • tuku747

tuku747

Members
 View Profile  See their activity
  • Content Count

    2
  • Joined

    September 22
  • Last visited

    December 3

Community Reputation

0 Neutral

About tuku747

  • Rank
    Tree Puncher
  1. tuku747

    [1.12.2] Checking if the player can place a block using PlayerInteractEvent.RightClickBlock

    tuku747 replied to tuku747's topic in Modder Support

    This causes the client and the server to desync. The item is used up on the client but still exists on the server. Is there a reliable way to update the client's hotbar?
    • September 23
    • 3 replies
  2. tuku747

    [1.12.2] Checking if the player can place a block using PlayerInteractEvent.RightClickBlock

    tuku747 posted a topic in Modder Support

    Is there a way to tell if the item used during PlayerInteractEvent is going to result in a block being placed in the world? The issue with PlayerInteractEvent.RightClickBlock is that it's called on the client even when the player is too close to the clicked block for a new block to be placed. I need to check before BlockEvent.PlaceEvent is triggered because I want to prevent the ItemStack's count from decreasing. I tried using world.mayPlace() but it doesn't seem to detect if the player is standing in the way. I'm using this method in PlayerInteractEvent.RightClickBlock: Block block = Block.getBlockFromItem(event.getItemStack().getItem()); if (world.mayPlace(block, event.getPos().offset(event.getFace()), false, event.getFace(), player)) { } Alternatively, is there a reliable way to detect when an item is consumed or depleted in stack size?
    • September 22
    • 3 replies
  • All Activity
  • Home
  • tuku747
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community