Started by
RaidenvBlack
on
Topic category: Help with Minecraft modding (Java Edition)
Hello
i want that the mobs gets upgraded after killing 20 mobs and i made this procedure to let it all the time trigger when i kill an mob.
Sadly it is not working and don't count up when i make this on the entity kills another one option. I also made a procedure on spawn to set the xp NBT number to 0.
I hope someone can help me (also the despawn element is not working for me maybe someone knows there a solution too)
Thanks in advance ^^
Edited by RaidenvBlack on Sat, 05/07/2022 - 23:19
set variable xp back to 0 or the first number.
excuse me i don't understand that maybe you could explain me that a bit more because how should it help me if i want to count the xp up to set it back to 0 ? and what do you mean with the first number ?
I mean "xp" is your nbt tag right. So when xp reaches 20, you do whatever you need, then set xp back to 0, so it loops over and over again. Unless I misunderstood. And also despawn isn't working because you targeted the event/target entity not the newly spawned entity.
My problem is that it not even counts up to 20 and i don't know why. I tested it now multiple times and i want that the event entitiy despawns because there the new entity will spawn. And yes xp is my nbt tag.
That's quite easy
Make a global variable call it let's say A - number variable if on player make it persistent if on mob make it world
Open a procedure when entity killed and place if SOURCE = your evolving mob then set variable to get variable +1
On your evolving mob in mob tick update pleace: if variable = 20 then spawn new entity + despawn old entity
But my problem is if i make it with global variable and i spawn multiple of my starting mobs then it is global so for every mob the same and i want to have it for every mob individual thats why i tried it with NBT what is somehow not working. And when this Mobs kill other mobs like sheeps or pigs or zombies they should evolve (despawn and spawn upgraded version from the mob) after 20 kills.
Maybe you could tell me why my version is not working i mean i set the tag let it count up (what is somehow not working as it looks)and then after 20 kills it should spawn the upgraded version and delete the old one.
Yes of course when global variable is reached then all mobs evolve
If you want a single mob to evolve after 20 and each mob must kill 20 then just set an NBT procedure to your entity which triggers under global variable condition
For example set nbt to get nbt +1 and when nbt = 20 then evolve your mob. This way each single mob must kill 20 before evolving
i mean i did that as you can see in the picture i added in my post but this is not working and i don't know why
Nah your pictures shows nothing
Do not trigger a global variable is just an nbt procedure
could you maybe explain me a bit more what you mean with ,,trigerring an NBT procedure to your entity which triggers under global variable condition'' ? what do i need to do with the global variable in detail to connect it with my nbt tag ? thank you that you try to help
Maybe if someone wants to do the same someday i post here my solution. I think that if entity kills another one trigger is a bit bugged so i solved it now like this https://imgur.com/a/lIWR9Ju