(2024.4, FORGE) Setting itemstack variable to itemstack return value of a procedure causes crashing.

Started by baicu12096 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(2024.4, FORGE) Setting itemstack variable to itemstack return value of a procedure causes crashing.

I am honestly tired of this, I've searched everything and found nothing. Here are the procedures involved.

https://imgur.com/a/0tGWHXn

https://imgur.com/a/pK350tY

Basically, I have a block that extracts different gases based on biome, height, etc.

To avoid making 300 IFELSEs and becoming Yandere Simulator 2, I am using a plugin for arrays.

The problem is, in the procedure ExtractGas, we have this variable called "gas", which I am trying to set it's itemstack value to the return value of the procedure ReturnGas. When I try to do so, this error shows up in the console:

https://gist.github.com/baicu12096/13f7b8527076283d1969266e6ca1298f

 If anyone can tell me what is happening, and possibly how I can fix it, I would appreciate. If it involves the autogenerated code, I will send it in no time.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is the ReturnGas procedure…
Mon, 09/29/2025 - 15:18

Is the ReturnGas procedure the "CheckIfGasIsCompatible" procedure here,

 

if so is the ReturnGas procedure saving correctly?

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah, ReturnGas is the same…
Mon, 09/29/2025 - 16:22

Yeah, ReturnGas is the same as CheckIfGasIsCompatible.

It is saving correctly.

HOWEVER, I had to reload the workspace once because the menu for selecting the procedure in the "call procedure and get return value" was not showing ReturnGas. IDK if that matters.

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The crash only happens if I…
Mon, 09/29/2025 - 16:23

The crash only happens if I try to emulate Minecraft btw

Debugger doesn't seem to help

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
emulate? Does the generated…
Mon, 09/29/2025 - 16:36

emulate? Does the generated code of CheckIfGasIsCompatible show up?

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I mean when you click the …
Mon, 09/29/2025 - 16:40

I mean when you click the "run client" button

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Does the generated code of…
Mon, 09/29/2025 - 17:11

Does the generated code of CheckIfGasIsCompatible show up?

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No, it crashes before…
Mon, 09/29/2025 - 17:14

No, it crashes before Minecraft even starts loading, it appears that error message I put in github gist