Started by
LOLBroSave
on
Topic category: Help with Minecraft modding (Java Edition)
So I’m very new at this. I wanted to make an Item if you have it in inventory or as armor you get one heart deleted, but you get strenght. I know how to give effects, but I dont´t know how to delete hearts for example from 10 to 9 hearts(so you canˋt regenerate the heart), I would like to do it that it could stack, so if I have two of it I get two hearts deleted (not the Item should stack, the heart delete should stack) It would be very nice to get some help. Thanks in advance :)
There is one way I am working on I will reply when finished
Event Trigger
set number Local: Number(VariableName) to 0
if has entity/player in inventory (Your damage item)
repeat 27 times (one per inventory slot)
if get copy of item in slot (Number) of entity/player if it has inventory = (Your item) these blocks are red.
set local number NumberofItems(Number of damage items) NumberofItems + 1
set local number Number to Number + 1
else
set local number Number to Number + 1
set health of entity/player to [(max health of entity/player) - (get local number NumberOfItems)]
This section of code is not tested so I have no idea if it works but it should.
Hope this helps
Could you send a picture?
Ill try
I can't sorry. But there is a search bar for blocks in mcreator on the top left and my showing of the code is excact wording.
Here I don't know if the image shows up
https://postimg.cc/grGxFd7X
When I click on your link I only see nothing found, but still thank you that you tried to help me