Started by
villagernumber9
on
Topic category: Help with Minecraft modding (Java Edition)
I've managed to make a decent Autosmelt enchant but it has 2 major flaws:
- It doesn't work with fortune or on ores that drop more than 1 item
- Ores mined with this enchant don't drop XP
Here's the code I'm working with:
Is there a way to fix this?
i don't think there's an easy fix for this, because fortune works with loot tables.
you could try using "Get XP reward for smelting/blasting/smoking item" from snail's plugin.
I can live with it being incompatible with fortune, but what about copper ore for example? It still drops only 1 ingot
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.
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.
Sure, that would be great
You gonna send that picture now?
Sorry, I got my widsom teeth out:
https://imgur.com/a/U6fTCzW
Thanks
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