Looking for a way around "Get smelting result of" block adding world dependency to a procedure

Started by ChaosColin on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Looking for a way around "Get smelting result of" block adding world dependency to a procedure

In short, I have created an oven with a slot for the oven racks and 4 slots for the stove burners. I wish to use the "inventory slot automation place condition" within my blocks entity data to force adjacent hoppers to only deposit items that can be smelted into food, into the top 4 slots. The only way I know how to do this is using the "get smelting result of (provided itemstack)" block, however this block adds the "world" dependency to the procedure rendering it unusable by the slot automation place condition.. Is there a way around this? 

Here is a screenshot of the procedure in question (hopefully)...

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you lock the block's…
Sat, 10/11/2025 - 10:00

can you lock the block's code?

 

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm willing to, if need be..
Sat, 10/11/2025 - 14:04

I'm willing to, if need be..

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
okay then lock your block,…
Sat, 10/11/2025 - 14:12

okay then lock your block, open the blockentity and add,

this.getLevel(), itemstack,
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I appreciate your response!…
Sat, 10/11/2025 - 14:28

I appreciate your response! However this caused the project to be unable to compile properly.. 

I was going to share the code here, but it seems its too long..

 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just send a screenshot of…
Sat, 10/11/2025 - 14:30

just send a screenshot of console

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Apologies, it was actually…
Sat, 10/11/2025 - 14:50

Apologies, it was actually an error on my part, this worked perfectly thank you! Though I have 0 understanding of HOW or WHY that worked... Do you mind explaining to me what this little snippet changed?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
awesome! :3oh yeah sure, I'd…
Sat, 10/11/2025 - 15:33

awesome! :3
oh yeah sure, I'd love to explain it. So basically the FoodProcedure.execute() or whatever your procedure is called, is triggering your procedure,

without changing the code this procedure cannot be called here, because it requires the world dependency which isn't supplied.

So what changing the code does is simply just provide that dependency to the procedure.

the this part of the added code referrers to the blockentity itself and level is simple what world is in manual code. So it simply gets the world the blockentity is in.

 

I hope that was understandable x3

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So that edit really just…
Sat, 10/11/2025 - 16:04

So that edit really just allows the block to utilize the world dependency in this case even though its not necessarily supposed too.. Interesting, thank you for teaching me this!