Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ruirui.minecraft.livelyanimals;
- import net.minecraft.client.model.ModelBase;
- import net.minecraft.client.renderer.entity.RenderLiving;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.passive.EntityPig;
- import net.minecraft.util.ResourceLocation;
- public class LARenderPig extends RenderLiving
- {
- private static final ResourceLocation saddledPigTextures = new ResourceLocation(LivelyAnimals.AID, "textures/animals/LAPig.png");
- private static final ResourceLocation pigTextures = new ResourceLocation(LivelyAnimals.AID, "textures/animals/LAPig.png");
- private static final String __OBFID = "CL_00001019";
- public LARenderPig(ModelBase p_i1265_1_, ModelBase p_i1265_2_, float p_i1265_3_)
- {
- super(p_i1265_1_, p_i1265_3_);
- this.setRenderPassModel(p_i1265_2_);
- }
- /**
- * Queries whether should render the specified pass or not.
- */
- protected int shouldRenderPass(EntityPig p_77032_1_, int p_77032_2_, float p_77032_3_)
- {
- if (p_77032_2_ == 0 && p_77032_1_.getSaddled())
- {
- this.bindTexture(saddledPigTextures);
- return 1;
- }
- else
- {
- return -1;
- }
- }
- /**
- * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
- */
- protected ResourceLocation getEntityTexture(EntityPig p_110775_1_)
- {
- return pigTextures;
- }
- /**
- * Queries whether should render the specified pass or not.
- */
- protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_)
- {
- return this.shouldRenderPass((EntityPig)p_77032_1_, p_77032_2_, p_77032_3_);
- }
- /**
- * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
- */
- protected ResourceLocation getEntityTexture(Entity p_110775_1_)
- {
- return this.getEntityTexture((EntityPig)p_110775_1_);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement