Basically, I wanted several of my Mobs to have Glowing eyes, like that of the Eyes of Enderman, Spider, EnderDragon, ect. But for some odd Reason, they won't render over my Model's Texture, instead showing a Purple Glow, which I think is a "Missing Texture", even though I have tried several Different Textures, and tried separating the Mob's Textures (That I'm currently working on) into Folders (Or Packages in Eclipse). I even went to as far as using the Spider's Rendering Code (Of Course with the Values Changed up so it matches the Entity), But to my luck, I have nothing Rendered Properly. Here is the Mob I was trying to add the Effect to, as well as the required classes:
@SideOnly(Side.CLIENT)
public class RenderAris extends RenderLiving{
private static final ResourceLocation EyesTextures = new ResourceLocation("textures/entity/ArisEyes.png");
private static final ResourceLocation ArisTextures = new ResourceLocation(RefStrings.MODID + ":textures/entity/Aris.png");
private static final String __OBFID = "CL_00001027";
public RenderAris() {
super(new ModelAris(), 1.0F);
this.setRenderPassModel(new ModelAris());
}
protected int shouldRenderPass(EntityAris p_77032_1_, int p_77032_2_, float p_77032_3_)
{
if (p_77032_2_ != 0)
{
return -1;
}
else
{
this.bindTexture(EyesTextures);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
if (p_77032_1_.isInvisible())
{
GL11.glDepthMask(false);
}
else
{
GL11.glDepthMask(true);
}
public class ClientProxy extends CommonProxy{
public void registerKeyBindings()
{
ClientRegistry.registerKeyBinding(KeyBindings.WeaponTransform);
}
public void registerRenderThings()
{
RenderingRegistry.registerEntityRenderingHandler(EntityFalseNetherrack.class, new RenderFalseNetherrack(new ModelFalseNetherrack(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityNethermite.class, new RenderNethermite(new ModelNethermite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityNetherman.class, new RenderNetherman(new ModelBiped(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityDevil.class, new RenderDevil(new ModelDevil(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityArchDevil.class, new RenderArchDevil(new ModelDevil(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityChaos.class, new RenderChaos(new ModelChaos(), 0));
//could not do "new RenderAris(new ModelAris(), 0)); because of "The constructor RenderAris(ModelAris, int) is undefined//
RenderingRegistry.registerEntityRenderingHandler(EntityAris.class, new RenderAris());
RenderingRegistry.registerEntityRenderingHandler(EntityMutatedWasp.class, new RenderMutatedWasp(new ModelMutantWasp(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityPinkSprite.class, new RenderPinkSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityBlackSprite.class, new RenderBlackSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityYellowSprite.class, new RenderYellowSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityRedSprite.class, new RenderRedSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityBlueSprite.class, new RenderBlueSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityGreenSprite.class, new RenderGreenSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityLightBullet.class, new RenderLightBullet());
RenderingRegistry.registerEntityRenderingHandler(EntityHailBall.class, new RenderHailBall());
}
@SideOnly(Side.CLIENT)
public KeyHandler keyHandler;
public void registerPre() {}
public int addArmor(String armor)
{
return 0;
}
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return null;
}
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return null;
}
}
Basically, I wanted several of my Mobs to have Glowing eyes, like that of the Eyes of Enderman, Spider, EnderDragon, ect. But for some odd Reason, they won't render over my Model's Texture, instead showing a Purple Glow, which I think is a "Missing Texture", even though I have tried several Different Textures, and tried separating the Mob's Textures (That I'm currently working on) into Folders (Or Packages in Eclipse). I even went to as far as using the Spider's Rendering Code (Of Course with the Values Changed up so it matches the Entity), But to my luck, I have nothing Rendered Properly. Here is the Mob I was trying to add the Effect to, as well as the required classes:
RenderAris:
package com.stormarmory.client.render;
import org.apache.logging.log4j.core.helpers.Strings;
import org.lwjgl.opengl.GL11;
import com.stormarmory.client.entity.EntityAris;
import com.stormarmory.client.model.ModelAris;
import com.stormarmory.lib.RefStrings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
@SideOnly(Side.CLIENT)
public class RenderAris extends RenderLiving{
private static final ResourceLocation EyesTextures = new ResourceLocation("textures/entity/ArisEyes.png");
private static final ResourceLocation ArisTextures = new ResourceLocation(RefStrings.MODID + ":textures/entity/Aris.png");
private static final String __OBFID = "CL_00001027";
public RenderAris() {
super(new ModelAris(), 1.0F);
this.setRenderPassModel(new ModelAris());
}
protected int shouldRenderPass(EntityAris p_77032_1_, int p_77032_2_, float p_77032_3_)
{
if (p_77032_2_ != 0)
{
return -1;
}
else
{
this.bindTexture(EyesTextures);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
if (p_77032_1_.isInvisible())
{
GL11.glDepthMask(false);
}
else
{
GL11.glDepthMask(true);
}
char var4 = 61680;
int var5 = var4 % 65536;
int var6 = var4 / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)var5 / 1.0F, (float)var6 / 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
return 1;
}
}
protected ResourceLocation getEntityTexture(EntityAris entity1)
{
return ArisTextures;
}
protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_)
{
return this.shouldRenderPass((EntityAris)p_77032_1_, p_77032_2_, p_77032_3_);
}
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return this.getEntityTexture((EntityAris)p_110775_1_);
}
}
EntityAris
package com.stormarmory.client.entity;
import com.stormarmory.item.MItems;
import net.minecraft.block.Block;
import net.minecraft.block.BlockColored;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIBeg;
import net.minecraft.entity.ai.EntityAIFleeSun;
import net.minecraft.entity.ai.EntityAIFollowOwner;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILeapAtTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMate;
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
import net.minecraft.entity.ai.EntityAIRestrictSun;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAITargetNonTamed;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.entity.passive.EntityPig;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.entity.passive.EntityTameable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.pathfinding.PathEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityAris extends EntityTameable
{
private float field_70926_e;
private float field_70924_f;
private boolean isShaking;
private boolean field_70928_h;
private float timeIsShaking;
private float prevTimeIsShaking;
private static final String __OBFID = "CL_00001654";
public EntityAris(World p_i1696_1_)
{
super(p_i1696_1_);
this.setSize(0.9F, 1.3F);
this.getNavigator().setAvoidsWater(true);
this.getNavigator().getPathSearchRange();
this.getNavigator().getPathToEntityLiving(entityToAttack);
this.tasks.addTask(2, new EntityAIRestrictSun(this));
this.tasks.addTask(3, new EntityAIFleeSun(this, 1.0D));
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, this.aiSit);
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
this.tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(9, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityCow.class, 200, false));
this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityPig.class, 200, false));
this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityChicken.class, 200, false));
this.setTamed(false);
this.isImmuneToFire = true;
}
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.4D);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(0.45D);
if (this.isTamed())
{
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(65.0D);
}
else
{
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(45.0D);
}
}
public boolean isAIEnabled()
{
return true;
}
public void setAttackTarget(EntityLivingBase p_70624_1_)
{
super.setAttackTarget(p_70624_1_);
if (p_70624_1_ == null)
{
this.setAngry(false);
}
else if (!this.isTamed())
{
this.setAngry(true);
}
}
protected void updateAITick()
{
this.dataWatcher.updateObject(18, Float.valueOf(this.getHealth()));
}
protected void entityInit()
{
super.entityInit();
this.dataWatcher.addObject(18, new Float(this.getHealth()));
this.dataWatcher.addObject(19, new Byte((byte)0));
this.dataWatcher.addObject(20, new Byte((byte)BlockColored.func_150032_b(1)));
}
protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_)
{
this.playSound("mob.pig.step", 0.15F, 1.0F);
}
public void writeEntityToNBT(NBTTagCompound p_70014_1_)
{
super.writeEntityToNBT(p_70014_1_);
p_70014_1_.setBoolean("Angry", this.isAngry());
}
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
{
super.readEntityFromNBT(p_70037_1_);
this.setAngry(p_70037_1_.getBoolean("Angry"));
}
protected Item func_146068_u()
{
return Item.getItemById(-1);
}
public void onLivingUpdate()
{
super.onLivingUpdate();
if (!this.worldObj.isRemote && this.isShaking && !this.field_70928_h && !this.hasPath() && this.onGround)
{
this.field_70928_h = true;
this.timeIsShaking = 0.0F;
this.prevTimeIsShaking = 0.0F;
this.worldObj.setEntityState(this, (byte)8);
}
}
public void onUpdate()
{
super.onUpdate();
this.field_70924_f = this.field_70926_e;
if (this.func_70922_bv())
{
this.field_70926_e += (1.0F - this.field_70926_e) * 0.4F;
}
else
{
this.field_70926_e += (0.0F - this.field_70926_e) * 0.4F;
}
if (this.func_70922_bv())
{
this.numTicksToChaseTarget = 10;
}
if (this.isWet())
{
this.isShaking = true;
this.field_70928_h = false;
this.timeIsShaking = 0.0F;
this.prevTimeIsShaking = 0.0F;
}
else if ((this.isShaking || this.field_70928_h) && this.field_70928_h)
{
if (this.timeIsShaking == 0.0F)
{
this.playSound("mob.wolf.shake", this.getSoundVolume(), (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
}
this.prevTimeIsShaking = this.timeIsShaking;
this.timeIsShaking += 0.05F;
if (this.prevTimeIsShaking >= 2.0F)
{
this.isShaking = false;
this.field_70928_h = false;
this.prevTimeIsShaking = 0.0F;
this.timeIsShaking = 0.0F;
}
if (this.timeIsShaking > 0.4F)
{
float var1 = (float)this.boundingBox.minY;
int var2 = (int)(MathHelper.sin((this.timeIsShaking - 0.4F) * (float)Math.PI) * 7.0F);
for (int var3 = 0; var3 < var2; ++var3)
{
float var4 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
float var5 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
this.worldObj.spawnParticle("splash", this.posX + (double)var4, (double)(var1 + 0.8F), this.posZ + (double)var5, this.motionX, this.motionY, this.motionZ);
}
}
}
}
public boolean getShaking()
{
return this.isShaking;
}
public float getShadingWhileShaking(float p_70915_1_)
{
return 0.75F + (this.prevTimeIsShaking + (this.timeIsShaking - this.prevTimeIsShaking) * p_70915_1_) / 2.0F * 0.25F;
}
public float getShakeAngle(float p_70923_1_, float p_70923_2_)
{
float var3 = (this.prevTimeIsShaking + (this.timeIsShaking - this.prevTimeIsShaking) * p_70923_1_ + p_70923_2_) / 1.8F;
if (var3 < 0.0F)
{
var3 = 0.0F;
}
else if (var3 > 1.0F)
{
var3 = 1.0F;
}
return MathHelper.sin(var3 * (float)Math.PI) * MathHelper.sin(var3 * (float)Math.PI * 11.0F) * 0.15F * (float)Math.PI;
}
public float getInterestedAngle(float p_70917_1_)
{
return (this.field_70924_f + (this.field_70926_e - this.field_70924_f) * p_70917_1_) * 0.15F * (float)Math.PI;
}
public float getEyeHeight()
{
return this.height * 0.8F;
}
public int getVerticalFaceSpeed()
{
return this.isSitting() ? 20 : super.getVerticalFaceSpeed();
}
public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_)
{
if (this.isEntityInvulnerable())
{
return false;
}
else
{
Entity var3 = p_70097_1_.getEntity();
this.aiSit.setSitting(false);
if (var3 != null && !(var3 instanceof EntityPlayer) && !(var3 instanceof EntityArrow))
{
p_70097_2_ = (p_70097_2_ + 1.0F) / 2.0F;
}
return super.attackEntityFrom(p_70097_1_, p_70097_2_);
}
}
public boolean attackEntityAsMob(Entity p_70652_1_)
{
int var2 = this.isTamed() ? 4 : 2;
return p_70652_1_.attackEntityFrom(DamageSource.causeMobDamage(this), (float)var2);
}
public void setTamed(boolean p_70903_1_)
{
super.setTamed(p_70903_1_);
if (p_70903_1_)
{
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(65.0D);
}
else
{
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(45.0D);
}
}
public boolean interact(EntityPlayer p_70085_1_)
{
ItemStack var2 = p_70085_1_.inventory.getCurrentItem();
if (this.isTamed())
{
if (var2 != null)
{
if (var2.getItem() instanceof ItemFood)
{
ItemFood var3 = (ItemFood)var2.getItem();
if (var3.isWolfsFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < 20.0F)
{
if (!p_70085_1_.capabilities.isCreativeMode)
{
--var2.stackSize;
}
this.heal((float)var3.func_150905_g(var2));
if (var2.stackSize <= 0)
{
p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, (ItemStack)null);
}
return true;
}
}
}
if (this.func_152114_e(p_70085_1_) && !this.worldObj.isRemote && !this.isBreedingItem(var2))
{
this.aiSit.setSitting(!this.isSitting());
this.isJumping = false;
this.setPathToEntity((PathEntity)null);
this.setTarget((Entity)null);
this.setAttackTarget((EntityLivingBase)null);
}
}
else if (var2 != null && var2.getItem() == MItems.DevilFlesh && !this.isAngry())
{
if (!p_70085_1_.capabilities.isCreativeMode)
{
--var2.stackSize;
}
if (var2.stackSize <= 0)
{
p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, (ItemStack)null);
}
if (!this.worldObj.isRemote)
{
if (this.rand.nextInt(3) == 0)
{
this.setTamed(true);
this.setPathToEntity((PathEntity)null);
this.setAttackTarget((EntityLivingBase)null);
this.aiSit.setSitting(true);
this.setHealth(20.0F);
this.func_152115_b(p_70085_1_.getUniqueID().toString());
this.playTameEffect(true);
this.worldObj.setEntityState(this, (byte)7);
}
else
{
this.playTameEffect(false);
this.worldObj.setEntityState(this, (byte)6);
}
}
return true;
}
return super.interact(p_70085_1_);
}
public void handleHealthUpdate(byte p_70103_1_)
{
if (p_70103_1_ == 8)
{
this.field_70928_h = true;
this.timeIsShaking = 0.0F;
this.prevTimeIsShaking = 0.0F;
}
else
{
super.handleHealthUpdate(p_70103_1_);
}
}
public boolean isBreedingItem(ItemStack p_70877_1_)
{
return p_70877_1_ == null ? false : (!(p_70877_1_.getItem() instanceof ItemFood) ? false : ((ItemFood)p_70877_1_.getItem()).isWolfsFavoriteMeat());
}
public int getMaxSpawnedInChunk()
{
return 8;
}
public boolean isAngry()
{
return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0;
}
public void setAngry(boolean p_70916_1_)
{
byte var2 = this.dataWatcher.getWatchableObjectByte(16);
if (p_70916_1_)
{
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 | 2)));
}
else
{
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 & -3)));
}
}
public int getCollarColor()
{
return this.dataWatcher.getWatchableObjectByte(20) & 15;
}
public void setCollarColor(int p_82185_1_)
{
this.dataWatcher.updateObject(20, Byte.valueOf((byte)(p_82185_1_ & 15)));
}
public EntityAris createChild(EntityAgeable p_90011_1_)
{
EntityAris var2 = new EntityAris(this.worldObj);
String var3 = this.func_152113_b();
if (var3 != null && var3.trim().length() > 0)
{
var2.func_152115_b(var3);
var2.setTamed(true);
}
return var2;
}
public void func_70918_i(boolean p_70918_1_)
{
if (p_70918_1_)
{
this.dataWatcher.updateObject(19, Byte.valueOf((byte)1));
}
else
{
this.dataWatcher.updateObject(19, Byte.valueOf((byte)0));
}
}
public boolean canMateWith(EntityAnimal p_70878_1_)
{
if (p_70878_1_ == this)
{
return false;
}
else if (!this.isTamed())
{
return false;
}
else if (!(p_70878_1_ instanceof EntityAris))
{
return false;
}
else
{
EntityAris var2 = (EntityAris)p_70878_1_;
return !var2.isTamed() ? false : (var2.isSitting() ? false : this.isInLove() && var2.isInLove());
}
}
public boolean func_70922_bv()
{
return this.dataWatcher.getWatchableObjectByte(19) == 1;
}
protected boolean canDespawn()
{
return !this.isTamed() && this.ticksExisted > 2400;
}
public boolean func_142018_a(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_)
{
if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast))
{
if (p_142018_1_ instanceof EntityAris)
{
EntityAris var3 = (EntityAris)p_142018_1_;
if (var3.isTamed() && var3.getOwner() == p_142018_2_)
{
return false;
}
}
return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer)p_142018_2_).canAttackPlayer((EntityPlayer)p_142018_1_) ? false : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse)p_142018_1_).isTame();
}
else
{
return false;
}
}
}
ClientProxy
package com.stormarmory.proxies;
import javax.swing.plaf.basic.BasicTreeUI.KeyHandler;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import com.stormarmory.client.entity.EntityArchDevil;
import com.stormarmory.client.entity.EntityAris;
import com.stormarmory.client.entity.EntityBlackSprite;
import com.stormarmory.client.entity.EntityBlueSprite;
import com.stormarmory.client.entity.EntityChaos;
import com.stormarmory.client.entity.EntityDevil;
import com.stormarmory.client.entity.EntityFalseNetherrack;
import com.stormarmory.client.entity.EntityGreenSprite;
import com.stormarmory.client.entity.EntityMutatedWasp;
import com.stormarmory.client.entity.EntityNetherman;
import com.stormarmory.client.entity.EntityNethermite;
import com.stormarmory.client.entity.EntityPinkSprite;
import com.stormarmory.client.entity.EntityRedSprite;
import com.stormarmory.client.entity.EntityYellowSprite;
import com.stormarmory.client.model.ModelArchDevil;
import com.stormarmory.client.model.ModelAris;
import com.stormarmory.client.model.ModelChaos;
import com.stormarmory.client.model.ModelDevil;
import com.stormarmory.client.model.ModelFalseNetherrack;
import com.stormarmory.client.model.ModelMutantWasp;
import com.stormarmory.client.model.ModelNethermite;
import com.stormarmory.client.model.ModelSprite;
import com.stormarmory.client.render.RenderArchDevil;
import com.stormarmory.client.render.RenderAris;
import com.stormarmory.client.render.RenderBlackSprite;
import com.stormarmory.client.render.RenderBlueSprite;
import com.stormarmory.client.render.RenderChaos;
import com.stormarmory.client.render.RenderDevil;
import com.stormarmory.client.render.RenderFalseNetherrack;
import com.stormarmory.client.render.RenderGreenSprite;
import com.stormarmory.client.render.RenderMutatedWasp;
import com.stormarmory.client.render.RenderNetherman;
import com.stormarmory.client.render.RenderNethermite;
import com.stormarmory.client.render.RenderPinkSprite;
import com.stormarmory.client.render.RenderRedSprite;
import com.stormarmory.client.render.RenderYellowSprite;
import com.stormarmory.keybinds.KeyBindings;
import com.stormarmory.projectiles.EntityHailBall;
import com.stormarmory.projectiles.EntityLightBullet;
import com.stormarmory.projectiles.RenderHailBall;
import com.stormarmory.projectiles.RenderLightBullet;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ClientProxy extends CommonProxy{
public void registerKeyBindings()
{
ClientRegistry.registerKeyBinding(KeyBindings.WeaponTransform);
}
public void registerRenderThings()
{
RenderingRegistry.registerEntityRenderingHandler(EntityFalseNetherrack.class, new RenderFalseNetherrack(new ModelFalseNetherrack(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityNethermite.class, new RenderNethermite(new ModelNethermite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityNetherman.class, new RenderNetherman(new ModelBiped(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityDevil.class, new RenderDevil(new ModelDevil(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityArchDevil.class, new RenderArchDevil(new ModelDevil(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityChaos.class, new RenderChaos(new ModelChaos(), 0));
//could not do "new RenderAris(new ModelAris(), 0)); because of "The constructor RenderAris(ModelAris, int) is undefined//
RenderingRegistry.registerEntityRenderingHandler(EntityAris.class, new RenderAris());
RenderingRegistry.registerEntityRenderingHandler(EntityMutatedWasp.class, new RenderMutatedWasp(new ModelMutantWasp(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityPinkSprite.class, new RenderPinkSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityBlackSprite.class, new RenderBlackSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityYellowSprite.class, new RenderYellowSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityRedSprite.class, new RenderRedSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityBlueSprite.class, new RenderBlueSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityGreenSprite.class, new RenderGreenSprite(new ModelSprite(), 0));
RenderingRegistry.registerEntityRenderingHandler(EntityLightBullet.class, new RenderLightBullet());
RenderingRegistry.registerEntityRenderingHandler(EntityHailBall.class, new RenderHailBall());
}
@SideOnly(Side.CLIENT)
public KeyHandler keyHandler;
public void registerPre() {}
public int addArmor(String armor)
{
return 0;
}
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return null;
}
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return null;
}
}
Anybody? Want to get this finished up before Release, on 1.7.10 by the way.
should be
You didn't give it a modid, so it was looking for the texture in vanilla assets.
Please don't PM me asking for help, I will just redirect you to the appropriate forum, where there are others who are far more skilled than me.
This is not the signature you are looking for.
Banners and such things
That fixed it up a little bit, but now it renders the Overlay not on the Eyes, but instead the Body. How would I go about fixing this?
import org.lwjgl.opengl.GL11; import com.stormarmory.client.entity.EntityAris;
import com.stormarmory.client.model.ModelAris;
import com.stormarmory.lib.RefStrings; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation; @SideOnly(Side.CLIENT)
public class RenderAris extends RenderLiving{
private static final ResourceLocation EyesTextures = new ResourceLocation(RefStrings.MODID + ":textures/entity/ArisEyes.png");
private static final ResourceLocation ArisTextures = new ResourceLocation(RefStrings.MODID + ":textures/entity/Aris.png");
private static final String __OBFID = "CL_00001027";
public RenderAris() {
super(new ModelAris(), 1.0F);
this.setRenderPassModel(new ModelAris());
}
protected int shouldRenderPass(EntityAris p_77032_1_, int p_77032_2_, float p_77032_3_)
{
if (p_77032_2_ != 0)
{
return -1;
}
else
{
this.bindTexture(EyesTextures);
GL11.glEnable(GL11.GL_BLEND);
GL11.glColor4f(1.0F, 0.0F, 0.0F, 1.0F);
GL11.glEnable(GL11.GL_3D_COLOR_TEXTURE);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
if (p_77032_1_.isInvisible())
{
GL11.glDepthMask(false);
}
else
{
GL11.glDepthMask(true);
}
char var4 = 61680;
int var5 = var4 % 65536;
int var6 = var4 / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)var5 / 1.0F, (float)var6 / 1.0F);
GL11.glEnable(GL11.GL_LIGHTING);
return 1;
}
}
protected ResourceLocation getEntityTexture(EntityAris entity1)
{
return ArisTextures;
}
protected int shouldRenderPass(EntityLivingBase p_77032_1_, int p_77032_2_, float p_77032_3_)
{
return this.shouldRenderPass((EntityAris)p_77032_1_, p_77032_2_, p_77032_3_);
}
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return this.getEntityTexture((EntityAris)p_110775_1_);
}
}
Nevermind, Fixed it.