Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Mod_ File Code-----------------------------------------------------------
- //Renderer Code (Mod_ File)
- public void AddRenderer(Map map)
- {
- map.put(EntityFlyingSpiderPig.class, new RenderFlyingSpiderPig(new ModelFlyingSpiderPig(), 0.5F));
- }
- //Other Stuff (Mod_ File)
- ModLoader.RegisterEntityID(EntityFlyingSpiderPig.class, "Flying Spider Pig",
- ModLoader.getUniqueEntityId());
- ModLoader.AddSpawn(EntityFlyingSpiderPig.class, 12, 4, 4, EnumCreatureType.creature);
- //Render File--------------------------------------------------------------
- //To render a name at the top of a Mob's Head
- renderLivingLabel(entity, entity.Name, d, d1, d2, 64);
- //The Whole Render File
- package net.minecraft.src;
- public class RenderFlyingSpiderPig extends RenderLiving
- {
- public RenderFlyingSpiderPig(ModelBase modelbase, float f)
- {
- super(modelbase, f);
- }
- public void func_177_a(EntityFlyingSpiderPig entity, double d, double d1, double d2,
- float f, float f1)
- {
- super.doRenderLiving(entity, d, d1, d2, f, f1);
- }
- public void doRenderLiving(EntityLiving entityliving, double d, double d1, double d2,
- float f, float f1)
- {
- func_177_a((EntityFlyingSpiderPig)entityliving, d, d1, d2, f, f1);
- }
- public void doRender(Entity entity, double d, double d1, double d2,
- float f, float f1)
- {
- func_177_a((EntityFlyingSpiderPig)entity, d, d1, d2, f, f1);
- }
- }
- //Entity File--------------------------------------------------------------
- //This is where you initialize/declare the name
- Name = "Flying Spider Pig";
- //Spawner Block File-------------------------------------------------------
- public void onBlockClicked(World world, int i, int j, int k, EntityPlayer entityplayer)
- {
- EntityLiving entityliving = (EntityLiving)EntityList.createEntityInWorld("Something", entityplayer.worldObj);
- entityliving.setLocationAndAngles(i, j + 1, k, 0F, 0F); //x, y, z, yaw, pitch
- entityplayer.worldObj.entityJoinedWorld(entityliving);
- }
- //--------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement