Get Falling Block Type

Started by GremJax on

Topic category: Help with modding (Java Edition)

Last seen on 18:22, 12. May 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Get Falling Block Type

I think I have a relatively unique problem regarding falling block entities. I am trying to determine what type of falling block an entity is, but minecraft handles this in a strange way. From what I have been able to gather, falling blocks have a nested NBT tag called BlockState that has a variety of data about the falling block, but the important one is Name, which actually contains the name of the block that is falling. Sand as an example:

falling_block <x> <y> <z> {BlockState:{Name:"minecraft:sand"}}

If I want to figure out which falling block it actually is I need to separate the string for Name out of the BlockState NBT tag, but I haven't been able to do this. I tried a variety of things including printing each section individually and BlockState.Name dot notation but nothing works. I can provide more specific information if needed, and any help would be greatly appreciated

Last seen on 15:37, 20. May 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
cool
Sun, 04/14/2024 - 17:27

cool