mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 13:52:23 +00:00
Revert "Added npc.setPoweredTexture(directory) and npc.getPoweredTexture() functions, along with a new powered texture resource."
This reverts commit ba4bf107b5.
This commit is contained in:
1 parent
743cdb9db7
commit
ba0f21dc26
6 files changed
+1
-63
No files matched your search
@@ -11,7 +11,6 @@ import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.boss.BossStatus;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.util.ModelRenderPassHelper;
|
||||
import noppes.npcs.constants.EnumStandingType;
|
||||
@@ -89,47 +88,6 @@ public class RenderCustomNpc extends RenderNPCHumanMale{
|
||||
|
||||
@Override
|
||||
protected int shouldRenderPass(EntityLivingBase par1EntityLivingBase, int par2, float par3){
|
||||
EntityNPCInterface npc = (EntityNPCInterface) par1EntityLivingBase;
|
||||
if (npc.hasPoweredTexture())
|
||||
{
|
||||
if (npc.isInvisible())
|
||||
{
|
||||
GL11.glDepthMask(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
if (par2 == 1)
|
||||
{
|
||||
ResourceLocation poweredNPCTexture = new ResourceLocation(npc.display.poweredTexture);//customnpcs:textures/entity/npc_armor.png
|
||||
float f1 = (float)npc.ticksExisted + par3;
|
||||
this.bindTexture(poweredNPCTexture);
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
float f2 = f1 * 0.01F;
|
||||
float f3 = f1 * 0.01F;
|
||||
GL11.glTranslatef(f2, f3, 0.0F);
|
||||
this.setRenderPassModel(this.originalModel);
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
float f4 = 0.5F;
|
||||
GL11.glColor4f(f4, f4, f4, 1.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (par2 == 2)
|
||||
{
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
}
|
||||
if(renderEntity != null){
|
||||
return NPCRendererHelper.shouldRenderPass(entity, par2, par3, renderEntity);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user