Topic category: Troubleshooting, bugs, and solutions
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)),