how to add player skin overlay

Started by itzmodestep3 on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 weeks ago
Joined Apr 2020
Points:
739

User statistics:

  • Modifications: 2
  • Forum topics: 19
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 22
how to add player skin overlay

so im trying to make a vampirism when you become a vampire overlay (red eyes, blood around mouth) without using armor slot? how would i do this

Active 4 years ago
Joined Sep 2019
Points:
976

User statistics:

  • Modifications: 1
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 507
You are looking for Layers…
Wed, 06/17/2020 - 00:58

You are looking for Layers. However, this is not supported yet in MCreator.

Simply,

You need to create a Layer that extends LayerRenderer. If you need help add my discord (in profile).

You need to add the Layer to all entities using,

    public static void addLayers(PlayerRenderer renderer)
    {
        List<LayerRenderer<AbstractClientPlayerEntity, PlayerModel<AbstractClientPlayerEntity>>> layers = ObfuscationReflectionHelper.getPrivateValue(LivingRenderer.class, renderer, "field_177097_h");
        if(layers != null)
        {
            layers.add(new [YOURLAYER]<>(renderer));
        }
    }

And call the above using,

        Map<String, PlayerRenderer> skinMap = Minecraft.getInstance().getRenderManager().getSkinMap();
        [CLASSCONTAININGMETHOD].addLayers(skinMap.get("default"));
        [CLASSCONTAININGMETHOD].addLayers(skinMap.get("slim"));

 

Due to this being a popular request, I may do a user tutorial soon. Time will tell.

Active 4 years ago
Joined Jul 2020
Points:
654

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
a tutorial would be great…
Sun, 08/16/2020 - 22:59

a tutorial would be great since i still dont have a clue about this

 

Active 2 years ago
Joined Sep 2020
Points:
602

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 6
could you please do a…
Wed, 09/23/2020 - 17:55

could you please do a tutorial?

Active 2 years ago
Joined Sep 2021
Points:
504

User statistics:

  • Modifications: 1
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
yes, could you do a tutorial…
Sun, 12/19/2021 - 15:17

yes, could you do a tutorial ? pleassee xd xd

Active 1 year ago
Joined Mar 2022
Points:
405

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 7
yes please tutorial
Sun, 04/03/2022 - 15:29

yes please tutorial