Issue with "Get smelting result of an item" procedure block

Published by Hidan on Thu, 03/05/2020 - 18:35
Status
Fixed
Type
Product/platform
Not applicable
Priority
Normal
Issue description

So I was using "Get Smelting Result for input item" Procedure block in my furnace and everything
works fine well unless I use block that don't have actuall smelting output, If I put such a block for example wool
game will crash instantly.

Crashlog: https://pastebin.com/M5Q3gzPk
Note: Crash only occures in 1.14.4 in 1.12.2 it still tries to process it but no output is added
 

Also It seems that this block works only once for some odd reasons in both 1.12.2 and 1.14.4 :L
I'm attaching Procedure
You can skip first 2 if's

Also 2: Debug showed that it is smelting Air???
Even though there are still items in Input slot
 

32:02.52 [Server thread/INFO] [STDOUT/]: [net.mcreator.machineria.MCreatorMetalFurnaceSmelting:executeProcedure:215 Smelted!1 iron_ingot 


32:03.22 [Server thread/INFO] [STDOUT/]: [net.mcreator.machineria.MCreatorMetalFurnaceSmelting:executeProcedure:215 Smelted!1 gold_ingot 


32:03.26 [Server thread/INFO] [STDOUT/]: [net.mcreator.machineria.MCreatorMetalFurnaceSmelting:executeProcedure:215 Smelted!0 air 


32:03.47 [Server thread/INFO] [STDOUT/]: [net.mcreator.machineria.MCreatorMetalFurnaceSmelting:executeProcedure:215 Smelted!1 gold_ingot 


32:03.51 [Server thread/INFO] [STDOUT/]: [net.mcreator.machineria.MCreatorMetalFurnaceSmelting:executeProcedure:215 Smelted!0 air 


32:04.12 [Server thread/INFO] [STDOUT/]: [net.mcreator.machineria.MCreatorMetalFurnaceSmelting:executeProcedure:215 Smelted!0 air 


32:04.26 [Server thread/INFO] [STDOUT/]: [net.mcreator.machineria.MCreatorMetalFurnaceSmelting:executeProcedure:215 Smelted!0 air

PS: Can you fix Comments have broken font when resizing its box and typing in it
this is so anoying :L

Attachment Size
Electric Furnace Smelting_0.ptpl1.4 KB 1.4 KB
New Furnace.zip143.9 KB 143.9 KB

Issue comments

This bug will be fixed in the next release.

PS: Can you fix Comments have broken font when resizing its box and typing in it

What do you mean with this?

I was not able to replicate this, but this could be WebKit or Blockly bug and we would need these devs to fix this.

Hmmm, So I have Tested new snapshot and apparently get smelting result still does not work properly :L
I mean it does not crash but still places only one item per world loading

If you need to check this out than I can send you my workspace with map so that you can test it out instantly
without learning how to set up my stupid machinery xD

Please make a minimal reproducible example of this procedure failing as if I make a simple procedure to print smelting result of the block right-clicked to the chat, smelting works properly each try so I suspect it is your procedure setup.

I got the workspace but I don't understand how to use this and the whole system is quite complex.

I would greatly appreciate it if you could assemble a demo workspace with minimal elements and complexity required to reproduce this. Thanks!

There should be a map that have assembled basic charging for furnace
But yep I will simplify it so it will start processing when there is item inside

Thanks, make a very basic demo if possible and slip a comment here when you are done so I get a notification ;)

Updated now.
It does not require energy to work anymore so you can place any smeltable material inside it

Hehe, this is a funny bug. The problem is that I took the item stack of the smelting result instead of copying it, so the result of the crafting was the item stack from the recipe definition and when it got transferred from one slot to another, the reference to it was lost and the recipe for the said item was essentially "broken" from that point on, even for the vanilla recipe system.

If you are in a hurry, you can use the "copy itemstack" procedure block to do this yourself. Just wrap smelting result procedure in the part where you put in int the slot with copy block.

Just have test it and rebuild it and still does not work :L

I can not reproduce this and I did this:

  1. Import the workspace from ticket in 2020.2
  2. Make new word
  3. Place metal furnace
  4. Place full stack of diamond ore in it
  5. Wait for one ingot to smelt
  6. Take it out
  7. Wait for another to smelt and do this 10 times
  8. I got golden ingot each time

How should I reproduce this as my procedure above did not reproduce the bug?

Oki Apparently they work as you said but they still does not stack for some odd reasons
I made procedure like this:

Set: [[Get amount of items in slot 1] + 1]
Of: Get smelting result of an item in slot 0
in slot: 1

and still only one item is placed and they does not stack :L

Also got a very Odd issue, My Energy Harvester Works on Flat world but not on normal one for some odd reasons
you can test it yourself if you want to investigate that

how to test that:
Place one Energy Harvester "Block With Big Red Dot on sides"
and surround it with Tier 1 Solar Panel than right click on Energy Harvester to open its gui and see that energy is not produced on normal world generator

Oki Apparently they work as you said but they still does not stack for some odd reasons
I made procedure like this:

Set: [[Get amount of items in slot 1] + 1]
Of: Get smelting result of an item in slot 0
in slot: 1

Open a new ticket for this as this is not related to this one. I will try to reproduce this in the meantime.

Also got a very Odd issue, My Energy Harvester Works on Flat world but not on normal one for some odd reasons
you can test it yourself if you want to investigate that

I don't understand or know the concept behind your energy harvester. Please make a minimal example of the isolated procedure block that does not work as you expect it to and I will work from there to attempt to fix it or help. Thanks!

Oki Apparently they work as you said but they still does not stack for some odd reasons
I made procedure like this:

Set: [[Get amount of items in slot 1] + 1]
Of: Get smelting result of an item in slot 0
in slot: 1

No need for a ticket for this one, I was able to reproduce this, but this bug exists in all versions of MCreator so far when and set item in inventory-related procedure block a non-fixed item reference is used.

Since this bug was present before 2020.2 this is not a regression and will not be patched alone most likely, but if other bugs are found in relation to 2020.2 that are regressions and need urgent fixing, this will be released in a patch, otherwise in 2020.3



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.