Topic category: Help with Minecraft modding (Java Edition)
I have it set up so light is being created based off entity tick updates for 2 mobs which works. The issue is as soon as they get in water it lags and crashes the game, the way I have been killing other versions of this type of mob when touching water was based off the same trigger that makes the light. I tried making it check if the mob is in water but then it stopped being compatible.
Is there a way to use "if" blocks to not trigger the light procedure while in water?
Edit: It also seems to destroy blocks it is on if it is half blocks/ dirt path blocks and crashes the game as well which is sort of fixed but then it still crashes in water/worlds crash while loading them back in + it can now delete the block above itself which is not ideal
Using wait blocks on tick updates always seems sketchy to me, I'd personally stay away from that. As for testing if the entity is in water - I'm pretty sure you can check if submerged height > height of event entity. I'm not able to access the software to check this for validity but these blocks should be in the entity data tab?
200% agree, it is calling for trouble in 99.9% of cases
At the moment I have it working and am not coming across any bugs/issues yet. I am going to come back to previous mods to touch them up when I understand coding better/ get more advice/examples on my updated post
Despawning a mob won't make it drop it's loot though will it? The mobs it is damaging drop their summon item whenever they die so they aren't lost
there are 5 slime mobs, 3 die when they make contact with water. every way the slimes die they always drop their summon item