Raytrace blocks throw error when using a local number variable

Started by kreatorKen on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 07:39, 14. Oct 2021
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Raytrace blocks throw error when using a local number variable

Hi. I am trying to do a raytrace using a manual loop and a local number variable, I called it "i", for the raytrace distance. When I use a normal number block there is no error, when I use the local variable it throws an error. This seems to me to be a bug as an number should be a number.

 

small example of output from Console (there is more, but all the same)

> Task :compileJava
....\MiningMannigUpdateTick3MaxLevelProcedure.java:134: error: local variables referenced from a lambda expression must be final or effectively final entity.getLook(1f).x * (i), entity.getLook(1f).y * (i),
^
....\MiningMannigUpdateTick3MaxLevelProcedure.java:134: error: local variables referenced from a lambda expression must be final or effectively final entity.getLook(1f).x * (i), entity.getLook(1f).y * (i),
^
...\MiningMannigUpdateTick3MaxLevelProcedure.java:135: error: local variables referenced from a lambda expression must be final or effectively final entity.getLook(1f).z * (i)),