Topic category: Help with Minecraft modding (Java Edition)
I'm attempting to make a potion effect that works like Shadow Form from Minecraft Dungeons; it should make the player invisible, increase their attack damage, and be removed once the player attacks an entity.
I already know how to make the effect increase the player's damage and how to remove it when they attack something, but I don't know how to make them invisible while affected by it. I do not want to utilize vanilla Minecraft's Invisibility status effect as Shadow Form should also hide the player's armor and be able to co-exist with Invisibility without affecting it.
While it'd be preferable if I could do this in procedures, I have a strong feeling that I will need to write custom code for this.
Versions are MCreator 2025.2, Minecraft 1.21.1, NeoForge 21.1.176
RedWire's Plugin is present if that could potentially be useful here.
This custom code snippet will hide the Event/target entity for all other players
@friyes Where would I insert this code snippet? I haven't done anything with custom code in MCreator before so I don't actually know where to place this.
Just in a custom code snippet block
@friyes What trigger would I connect this to? As in like either a global trigger or one of the various triggers for the status effect (such as On effect active tick)
Any trigger that provides an event/target entity block
should work
but i'm not sure about performance if used in tick events
@friyes Thank you for your help!
@friyes Upon attempting a test run the build failed to compile and it's saying "error: cannot find symbol" and pointing to the word "entity"
Procedure content (runs on effect being applied):
oh yeah sorry, you have to do this, if you don't use the entity block anywhere else in the procedure,
where /*code*/ is still that big snippet I originally sent
@friyes Alright!
@friyes Would my client be able to see that I'm invisible from the effect or does it only make me invisible for other players?
the target entity wouldn't be able to see it no, it technically just makes the server tell all other clients the target entity doesn't exist
@friyes Oh well I don't know if that method would work particularly well but thanks for your help!