Make someone and their armour invisible

Started by FerretWithACatHat on

Topic category: Help with Minecraft modding (Java Edition)

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?

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 

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

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.

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.

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

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";
            }

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"
}

 

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?

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?

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you might be able to use a…
Fri, 06/07/2024 - 12:29

you might be able to use a geckolib animated armor and run an animation that turns the armor invisible when you klick a button or something