Raytrace blocks throw error when using a local number variable

Started by kreatorKen on Sat, 09/05/2020 - 18:11

Topic category: Bugs and solutions

Last seen on 11:22, 5. Oct 2020
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Raytrace blocks throw error when using a local number variable
Sat, 09/05/2020 - 18:11

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)),