Jump to content

[1.7.10]How do I use the new skin format with my custom mob?


UntouchedWagons

Recommended Posts

package untouchedwagons.minecraft.custom_mobs.renders;

import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;

public class PlayerRender extends RenderLiving {
    private String player_name;

    public PlayerRender(String player_name)
    {
        super(new ModelBiped(), 0.5F);

        this.player_name = player_name;
    }

    @Override
    protected ResourceLocation getEntityTexture(Entity entity) {
        return new ResourceLocation("custom-mobs", "skins/" + this.player_name + ".png");
    }
}

 

This works fine if the skin is from the previous system but the entities' textures are all messed up if the skin is using the new format.

I like trains.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.