Can't get the height of a wheat crop

Started by ivanwafles67 on

Topic category: Help with modding (Java Edition)

Last seen on 19:34, 22. Dec 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can't get the height of a wheat crop

I am trying to run a procedure that gives you a bonus when you break a fully grown wheat crop. There is no way to use all blocks for this (correct me if I'm wrong) so I used some code. However, the code does not work, and the error message states that getValue() is not a method from net.minecraft.blocks.BlockState. I tried this code in Eclipse and the error doesn't occur and it works fine there. How can I make this work in MCreator?

 

Code

 

Blocks

 

Error Message

 

Eclipse (it works here without an error)