Make someone and their armour invisible

Started by FerretWithACatHat on

Topic category: Help with Minecraft modding (Java Edition)

Active 9 months ago
Joined Aug 2019
Points:
817

User statistics:

  • Modifications: 0
  • Forum topics: 27
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 54
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?

Active 14 hours ago
Joined Nov 2019
Points:
879

User statistics:

  • Modifications: 0
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 335
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 

Active 9 months ago
Joined Aug 2019
Points:
817

User statistics:

  • Modifications: 0
  • Forum topics: 27
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 54
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

Active 3 years ago
Joined Nov 2019
Points:
878

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 384
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.

Active 3 years ago
Joined Jan 2021
Points:
595

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
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.

Active 3 years ago
Joined Nov 2019
Points:
878

User statistics:

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

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

Active 3 years ago
Joined Jan 2021
Points:
595

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
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";
            }

Active 3 years ago
Joined Nov 2019
Points:
878

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 384
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"
}

 

Active 1 year ago
Joined Jun 2021
Points:
626

User statistics:

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

How do I do this for 1.16.5?

Active 3 months ago
Joined Sep 2021
Points:
972

User statistics:

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

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

Active 1 year ago
Joined Jul 2021
Points:
563

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
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?

Active 3 months ago
Joined Jun 2024
Points:
89

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
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