(Semi-Solved) 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:
(Semi-Solved) Setting itemstack variable to itemstack return value of a procedure causes crashing.
Mon, 09/29/2025 - 19:04 (edited)

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. 
 

Edited by baicu12096 on Mon, 09/29/2025 - 19:04
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
couldn't you get this…
Mon, 09/29/2025 - 19:25

couldn't you get this working?

<Mod_id>ModItems.<ITEM_IN_CAPS>.get()