I need help with auto-smelt potion-effect

Started by Gamemaster2022 on

Topic category: Help with modding (Java Edition)

Last seen on 16:16, 15. Sep 2023
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help with auto-smelt potion-effect
Sat, 05/07/2022 - 12:57 (edited)

Hello, I need help with making potion effect that will make me able to autosmelt when mining. It is going to be part of full armor set. I've already tried to use some procedures people made before They worked but they were were glitched (When I walked with pickaxe towards block at positive Z it broke without mining and dropped - and I don't want this). This is the picture of my current procedure that does not work how it should: https://imgur.com/a/43C2lyk. If you know how to fix it, or have better one, please tell me. Thank you

Edited by Gamemaster2022 on Sat, 05/07/2022 - 12:57
Last seen on 11:58, 19. Apr 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://i.imgur.com/AUxV7dP…
Sat, 05/07/2022 - 23:28

https://i.imgur.com/AUxV7dP.png

For this procedure I suggest making a block "Tag" element, so that you can control exactly what blocks can be auto-smelted. You can name it whatever you like, just remember it and type as I did in the procedure.

 

Another issues is that this procedure will not take into account if the item in main hand of the player is using the Fortune enchantment. You will have to figure a way to account for this. I tried to figure it out but my brain started hurting xD.

Last seen on 16:16, 15. Sep 2023
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, thank you for reply I…
Sun, 05/08/2022 - 19:42

Hello, thank you for reply I've tried your procedure and it works. BUT. The problem I mentioned in origial post still persist. When I go with tool in my hand towards blocks at Positive Z (Look in Minecraft F3 if you don't know what I mean), they break by themselves without mining. Do you know what can cause this problem? Potion effect applies when I have full set of custom armor. Can this be the problem? Thanks for help.

Last seen on 06:22, 13. Mar 2023
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay so, Instead of removing…
Mon, 05/09/2022 - 04:22

Okay so, Instead of removing and placing the block get rid of that part. This can be solved by setting a logic entity data tag for the player to true if you have the effect DwarvernGrace, and false if you dont. Then, for any block you want it to work on you have to set the loot tables to drop the smelted item if that entitytag for the player.

You'd have to add stuff to the loot tables for EVERY block you want it to work on though, although I don't know if theres another way besides procedures, but this allows for modpack/addon support where you can change the loot tables of modded blocks to work with it. 

I suggest watching youtube videos on loot tables, and use this loot table generator to help make your loot table, I use it all the time: https://misode.github.io/loot-table/. It has generated blocks to choose from and you can edit it and write your own stuff in the spots. In that loot table you just have to check for the entity properties under conditions. There is a button for it in the loot table generator.

Last seen on 06:22, 13. Mar 2023
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Otherwise you have  to add…
Mon, 05/09/2022 - 04:23

Otherwise you have  to add procedures for block broken, and check if player has DwarvenGrace is active, and if the block is a block you want to use then remove the block and spawn the item. This wouldn't be nearly as effective as using loot tables, but would work and is simpler.