Help with Autosmelt enchantment

Started by villagernumber9 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with Autosmelt enchantment

I've managed to make a decent Autosmelt enchant but it has 2 major flaws:

  1.  It doesn't work with fortune or on ores that drop more than 1 item
  2. Ores mined with this enchant don't drop XP

Here's the code I'm working with:

https://imgur.com/a/Q3rN2gz

Is there a way to fix this?

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It doesn't work with fortune…
Thu, 04/24/2025 - 16:09

It doesn't work with fortune or on ores that drop more than 1 item

i don't think there's an easy fix for this, because fortune works with loot tables.

Ores mined with this enchant don't drop XP

you could try using "Get XP reward for smelting/blasting/smoking item" from snail's plugin.

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can live with it being…
Thu, 04/24/2025 - 16:50

I can live with it being incompatible with fortune, but what about copper ore for example? It still drops only 1 ingot

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That could just be a trade…
Thu, 04/24/2025 - 18:22

That could just be a trade off as in, you get it immediatly smelted but no extra. You can also do something like I have done in my mod where at Autosmelt Level 1 you'd get one copper ingot, but at level 2, you get one guaranteed and a 33% chance of getting another, and at level 3, you have a 50% chance of getting another. This isn't as great on things like copper, but is very op for ancient debris, or other ores that you might add that fortune doesn't work on.

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
aslo I had an issue where…
Thu, 04/24/2025 - 18:25

aslo I had an issue where using autosmelt on a shoulder box with stuff in it, it would delete the stuff in it when mined. you can fix it by doing

if: can be smelted

else if: is get block at x, y,z tagged in block tags at Minecraft:shulker_boxes, do nothing

else: remove block and drop

I can send a picture of my procedure if you want further clarification.

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sure, that would be great
Thu, 04/24/2025 - 18:30

Sure, that would be great

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You gonna send that picture…
Sat, 04/26/2025 - 10:43

You gonna send that picture now?

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Btw BeXla do you know how…
Sat, 04/26/2025 - 13:31

Btw BeXla do you know how Get XP reward from snail's plugin works? I can't figure it out

Joined Mar 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Btw BeXla do you know how…
Sat, 04/26/2025 - 19:13

Btw BeXla do you know how Get XP reward from snail's plugin works? I can't figure it out

i don't remember exactly how it works, but i assume it gives you the same amount from recipes (for example, smelting raw copper gives you 0.7xp), so i guess all you have to do is multiply it by 10 or 100 or something so it gives you the real value