Make someone and their armour invisible

Started by FerretWithACatHatYT on

Topic category: Help with modding (Java Edition)

Last seen on 15:21, 3. May 2023
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make someone and their armour invisible

I am making a ninja mod with an armour that makes you invisible. Using the potion effect has the problem of your armour still showing up.

Is there a solution?

Last seen on 22:29, 27. Mar 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
go into your textures and…
Thu, 10/01/2020 - 23:51

go into your textures and edit your armor, select white and turn the opacity to 0, use the fill tool and boom, invisible armor 

Last seen on 15:21, 3. May 2023
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It should only be invisible…
Sun, 10/18/2020 - 09:38

It should only be invisible when the full set is on and on a cooldown thing

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
making armor invisible…
Sun, 10/18/2020 - 17:18

making armor invisible requires a tiny bit of coding.

first make a blank 64x32 texture. then lock and edit the armor element, find the lines:

protected ResourceLocation getEntityTexture(Entity entity) {
    return new ResourceLocation("yourmodid:textures/your_helmet.png");
}

and edit it like this:

protected ResourceLocation getEntityTexture(Entity entity) {
    if (entity.isInvisible()) {
        return new ResourceLocation("yourmodid:textures/blank.png");
    }
    return new ResourceLocation("yourmodid:textures/your_helmet.png");
}

kind of like that.

Last seen on 21:21, 20. Nov 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So I'm trying to do this…
Mon, 02/01/2021 - 05:02

So I'm trying to do this whole invisible armor thing as well that's tied to the boots. So far I have it so that the boots give the invisibility potion effect to the player if they're in a light level that's less than 5. I want to be able to make the entire player invisible (including the armor) when the conditions are met. Here's the thing though, I made a blank 64 x 32 texture, I locked the armor set element then went to edit it's code but I'm not seeing either of those lines of code. There's some similarities but nothing completely matching, and by that I mean "protected" and "return new" aren't showing up at all among some other differences.

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what version minecraft? show…
Mon, 02/01/2021 - 09:50

what version minecraft? show me that piece of code that has getEntityTexture

Last seen on 21:21, 20. Nov 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
1.15.3, it's the farthest I…
Mon, 02/01/2021 - 17:04

1.15.3, it's the farthest I can go with MCreator at the moment.

public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) {
                return "arcson:textures/models/armor/dekruutian_layer_" + (slot == EquipmentSlotType.LEGS ? "2" : "1") + ".png";
            }

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ah, i made a mistake in the…
Tue, 02/02/2021 - 06:58

ah, i made a mistake in the previous post. should be overriding the getArmorTexture method:

@Override
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type){
    if (entity.isInvisible()) {
        return "arcson:textures/[your blank texture]";
    }
    return "arcson:textures/models/armor/dekruutian_layer_" + (slot == EquipmentSlotType.LEGS ? "2" : "1") + ".png"
}

 

Last seen on 01:57, 20. Mar 2024
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I do this for 1.16.5?
Fri, 06/25/2021 - 22:14

How do I do this for 1.16.5?

Last seen on 18:19, 28. Mar 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Would it be possible to do…
Thu, 10/19/2023 - 21:36

Would it be possible to do this with held items as well?

Last seen on 01:40, 26. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know this is old, but when…
Fri, 11/10/2023 - 01:59

I know this is old, but when I do it, the blank texture shows up as the magenta and black of a missing texture. The directory for the file is right, though. Maybe it's an issue with more recent versions?