When dealing with structure rotation using procedures, I keep getting an error: "Double cannot be dereferenced"

Started by Liam Jones on

Topic category: Troubleshooting, bugs, and solutions

Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When dealing with structure rotation using procedures, I keep getting an error: "Double cannot be dereferenced"

I am trying to make a stick that spawns a certain set of structures with random rotation and mirror, for debug purposes. However, I can no longer do so because once I added the rotation randomizing part of the procedure, I could no longer complete the compileJava task. I restarted Mcreator, I rebuilt the code, etc. and nothing fixed the issue. I keep getting the error titled "Double cannot be dereferenced." It seems this error appears for every block in the procedure that spawns a structure. One more note, this error did not appear before I edited the procedure to have random structure rotation, and if I remove the randomness, the error persists.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I had a similar issue- the…
Sat, 12/03/2022 - 18:46

I had a similar issue- the problem in my case was that I modified the procedures in such a way that they required a y value, whereas the original procedures used world surface height, and thus only required x and z. If it's giving you a 'double,' error, it may be reffering to numbers that are missing. 

Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
As it turns out, the local…
Tue, 12/06/2022 - 20:55

As it turns out, the local variables that I was using to randomize the structure rotation and mirror were called "Structure" "Rotation" and "Mirror". This appears to be a problem because the actual structure placing procedure block used structure rotation and mirror in it. So apparently, this messed with the compilation of the code. Once I deleted these variables, the problem was solved.