Topic category: Help with Minecraft modding (Java Edition)
I know a similar question already has been asked and answered but i checked it and it didn't help so here's my problem:
I am working on a dungeon system for a mod i am making and i have a spawner that works the same as a trial spawner the only problem is when i kill an entity i can't find a way to remove from the block's nbt tag as it doesn't notify the block so i tried to use nbt tags in the entities to locate the block but it didn't work most of the time now i use teams to detect the entity and it even worked to change the nbt tag the only problem being that it requires an entity in my block ticking procedure so i either need a new way to link the entities and the block or a way to erase the need for an entity
I think you should go back to the "store the block's location in the nbt of the entity" idea.
What did you try?
I put the coordinates of the block in the entities with tags but it warned me it might not work from times to times and i killed the 3 enemies but it didn't affect the block at all
you can ignore the warning in this case.
how did you set it up? did you do it like how i did it?
i did the same thing but simpler and the warning is there for a reason it didn't work most of the time
The warning isn't there for that reason.
This works fine,
As a test I just made the block tick randomly but you could easily spawn the entities with an nbt timer on the block instead.
I use a similar trigger to see the remaining entities it stayed at 3 after I killed everything
Alright so i managed to fix it with nbt tags no idea why it didn't work before
I assume it's because of the old trigger I used which was when entity is hurt check if it's not alive then do the thing but it seemed to cause bugs