Topic category: Help with Minecraft modding (Java Edition)
I already posted this forum topic on "Help with Mcreator software" but as there is no way to change the category where a topic is and I didn't get any responses, i post this on a topic that would be more fitting.
I wanna make a hunter armor, which turns the player invisible when sneaking. However, the invisibility potion effect only hides body parts, and not armor, so the player is visible to mobs and players. I wanna make it so that you can become actually invisible while still wearing the armor.
I also wanna make him able to walk faster while sneaking, but this isn't doable via the speed effect, as it only works if ur running and not sneaking.
So, if you know how I could do that, please help me out.
I think the only way you could do this is by saving the players armour to a variable, and when you want them to be invisible, delete the armour, and give them invisibility. When they are no longer sneaking, give them the armour back. The only problem would be would take more damage without their armour, so you could maybe give them resistance. I'm not sure about this, but to make them move faster while sneaking, you could maybe do something with the override movement block?
@AwesomeCoderDude thanks a lot dude.
@AwesomeCoderDude wait... how can i then assure that the player doesn't put another armor on while he is sneaking?
@TDO Hope and pray, or risk lag by making it update every tick