Started by
AmadeusByakko
on
Topic category: Help with Minecraft modding (Java Edition)
Hi, srry bros but i need some help here.
[MCreator 2020.5]
When I use the procedure block named "Set item in main-hand" or "Set item in main-hand" just not work.
I have confirmed that the function reaches that point, and it does, it is simply that the procedure block does not do its job.
I also have another function that what it does is the following:
When a specific item is broken, add a different one to the inventory.
however the procedure called "add Item to inventory" does not work and the only solution I found is to call this procedure 2 times.
but this only adds a copy of the specified Item to my character's inventory.
(I speak spanish... srry for mistakes)
Edited by AmadeusByakko on Mon, 07/26/2021 - 03:33
1, Try removing the local var and I think you you dont need the "else if" statement/flow. Try using just the "if / do" flow only.
2, I dont think the "provided itemstack" block will be able to tell if your item is damaged.
Chew
I understand that I can optimize the code, however, I still have the question, because heck the procedure block that adds things in the inventory does not work.
It is very annoying and I want to know if it is my editor version or if it is my error.
I say it because I know that the code reaches that point, the message is printed in the chat,
and yet the procedure blocks that add items and replace items do not work.
use entity swing trigger of the item then:
if get damage of (item in main hand) of event/target-entity >/= (your max.Itemdamage - 1)
Set Item in main hand of event/target-entity to 1 (your replacement Item)
Also i stared at the upper picture for quite some time already, but i still dont understand what its supposed to do.