What block am I breaking?

Started by Lightning_Man on

Topic category: Help with modding (Java Edition)

Last seen on 17:38, 26. Oct 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What block am I breaking?
Wed, 10/25/2023 - 16:52 (edited)

I am trying to detect what block the player is breaking with a shape shifting alloy, and the item will change to look like a pic or a shovel depending on what block it is breaking, however I am having trouble making this work as I can't find a way to actually detect the block. I saw a post that talked about a Ray casting block in the editor, but I couldn't find one that seemed to do what I needed. I am working in 2023.2.

Thanks

Edited by Lightning_Man on Wed, 10/25/2023 - 16:52
Last seen on 03:17, 23. Jul 2024
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes there is a ray casting…
Wed, 10/25/2023 - 19:50

yes there is a ray casting block! it is in the entities tab in the procedure editor i think

it's something like "get look position of [event/target entity] x y z"

basically this gives you what block the player is looking at which is what you want

then you just put this into an if statement to check whether it should look like a pickaxe or a shovel

very epic idea for a block by the way oooh so cool

Last seen on 17:38, 26. Oct 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks I'ma take a look at…
Wed, 10/25/2023 - 21:28

Thanks I'ma take a look at it. And thanks. But the coolness factor might me negated by the fact that it is an among us mod for my friends server.