-
-
Save JayZX535/fd60c23962e6fe0c0698495f4d53c2ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.wildcraft.wildcraft.render.entity.wolf; | |
import com.wildcraft.wildcraft.entity.canine.EntityWildCraftWolf; | |
import com.wildcraft.wildcraft.items.collars.canine.WCBasicDogCollar; | |
import com.wildcraft.wildcraft.model.entity.ModelWildCraftWolf; | |
import com.wildcraft.wildcraft.util.ModItems; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.model.ModelCreeper; | |
import net.minecraft.client.model.ModelPig; | |
import net.minecraft.client.model.ModelSkeleton; | |
import net.minecraft.client.renderer.GlStateManager; | |
import net.minecraft.client.renderer.entity.RenderWolf; | |
import net.minecraft.client.renderer.entity.layers.LayerRenderer; | |
import net.minecraft.entity.passive.EntitySheep; | |
import net.minecraft.entity.passive.EntityWolf; | |
import net.minecraft.item.Item; | |
import net.minecraft.util.ResourceLocation; | |
import net.minecraftforge.fml.relauncher.Side; | |
import net.minecraftforge.fml.relauncher.SideOnly; | |
import net.minecraftforge.items.CapabilityItemHandler; | |
@SideOnly(Side.CLIENT) | |
public class RenderWCWolfS implements LayerRenderer<EntityWildCraftWolf> | |
{ | |
private static final ResourceLocation HETERO_PIE_1 = new ResourceLocation("wildcraft:textures/entity/wolf/white/hetpie1.png"); | |
private static final ResourceLocation HETERO_PIE_2 = new ResourceLocation("wildcraft:textures/entity/wolf/white/hetpie2.png"); | |
private static final ResourceLocation HETERO_PIE_3 = new ResourceLocation("wildcraft:textures/entity/wolf/white/hetpie3.png"); | |
private static final ResourceLocation HETERO_PIE_4 = new ResourceLocation("wildcraft:textures/entity/wolf/white/hetpie4.png"); | |
private static final ResourceLocation HETERO_PIE_5 = new ResourceLocation("wildcraft:textures/entity/wolf/white/hetpie5.png"); | |
private static final ResourceLocation HOMO_PIE_1 = new ResourceLocation("wildcraft:textures/entity/wolf/white/homopie1.png"); | |
private static final ResourceLocation HOMO_PIE_2 = new ResourceLocation("wildcraft:textures/entity/wolf/white/homopie2.png"); | |
private static final ResourceLocation HOMO_PIE_3 = new ResourceLocation("wildcraft:textures/entity/wolf/white/homopie3.png"); | |
private static final ResourceLocation HOMO_PIE_4 = new ResourceLocation("wildcraft:textures/entity/wolf/white/homopie4.png"); | |
private static final ResourceLocation HOMO_PIE_5 = new ResourceLocation("wildcraft:textures/entity/wolf/white/homopie5.png"); | |
private final RenderWildCraftWolf wolfRenderer; | |
private final ModelWildCraftWolf wolfModel = new ModelWildCraftWolf(2.0F); | |
public RenderWCWolfS(RenderWildCraftWolf wolfRendererIn) | |
{ | |
this.wolfRenderer = wolfRendererIn; | |
} | |
public void doRenderLayer(EntityWildCraftWolf wolf, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) | |
{ | |
if (wolf.getGenetics().substring(20, 22).equals("00")) | |
{ | |
} | |
else | |
{ | |
if (wolf.getGenetics().substring(16, 17).equals("1")) | |
{ | |
if (wolf.getGenetics().substring(17, 18).equals("1")) | |
{ | |
if (wolf.getGenetics().substring(22, 23).equals("1")) | |
{ | |
this.wolfRenderer.bindTexture(HETERO_PIE_1); | |
} | |
else if (wolf.getGenetics().substring(22, 23).equals("2")) | |
{ | |
this.wolfRenderer.bindTexture(HETERO_PIE_2); | |
} | |
else if (wolf.getGenetics().substring(22, 23).equals("3")) | |
{ | |
this.wolfRenderer.bindTexture(HETERO_PIE_3); | |
} | |
else if (wolf.getGenetics().substring(22, 23).equals("4")) | |
{ | |
this.wolfRenderer.bindTexture(HETERO_PIE_4); | |
} | |
else | |
{ | |
this.wolfRenderer.bindTexture(HETERO_PIE_5); | |
} | |
} | |
else | |
{ | |
if (wolf.getGenetics().substring(22, 23).equals("1")) | |
{ | |
this.wolfRenderer.bindTexture(HOMO_PIE_1); | |
} | |
else if (wolf.getGenetics().substring(22, 23).equals("2")) | |
{ | |
this.wolfRenderer.bindTexture(HOMO_PIE_2); | |
} | |
else if (wolf.getGenetics().substring(22, 23).equals("3")) | |
{ | |
this.wolfRenderer.bindTexture(HOMO_PIE_3); | |
} | |
else if (wolf.getGenetics().substring(22, 23).equals("4")) | |
{ | |
this.wolfRenderer.bindTexture(HOMO_PIE_4); | |
} | |
else | |
{ | |
this.wolfRenderer.bindTexture(HOMO_PIE_5); | |
} | |
} | |
} | |
else | |
{ | |
} | |
this.wolfModel.setModelAttributes(this.wolfRenderer.getMainModel()); | |
this.wolfRenderer.getMainModel().render(wolf, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); | |
} | |
} | |
public boolean shouldCombineTextures() | |
{ | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment