public class mod_Supercreeper extends BaseMod
{
public mod_Supercreeper()
{
AddMobs();
}
public void AddMobs()
{
//This line just registers the mob, and sets a name for it, as well as it's own unique entity ID
ModLoader.RegisterEntityID(EntitySupercreeper.class, "Supercreeper", ModLoader.getUniqueEntityId());
//This line makes tells the mob to spawn. The number 500 is how rare the mob is
//EnumCreatureType.creature = land mob, EnumCreatureType.waterCreature = water mob,
//EnumCreatureType.monster = a hostile mob that only spawns in darkness
ModLoader.AddSpawn(EntitySupercreeper.class, 500, EnumCreatureType.monster);
}
public void AddRenderer(Map map)
{
map.put(EntitySupercreeper.class, new RenderSupercreeper(new ModelSupercreeper(), 0.5F));
}
public String Version()
{
return "1.8.1";
}
}
EntitySupercreeper:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public void onStruckByLightning(EntityLightningBolt entitylightningbolt)
{
super.onStruckByLightning(entitylightningbolt);
dataWatcher.updateObject(17, Byte.valueOf((byte)1));
}
int timeSinceIgnited;
int lastActiveTime;
}
ModelSupercreeper:
// Date: 22/10/2011 13:06:41
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
public class RenderSupercreeper extends RenderLiving
{
//The three numbers below change the size of your model (you'll need to change the hitbox size too though)
protected void preRenderScale(EntitySupercreeper entity, float f)
{
GL11.glScalef(1.5F, 1.5F, 1.5F);
}
public RenderSupercreeper(ModelSupercreeper modelbase, float f)
{
super(modelbase, f);
}
0
== MCP v4.4 ==
> Recompiling client...
javac.exe -g -source 1.6 -target 1.6 -classpath "lib/;lib/*;jars/bin/minecraft.j
ar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath s
rc/minecraft -d bin/minecraft src/minecraft\net\minecraft\client\*.java src/mine
craft\net\minecraft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/pat
ches/*.java failed.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Supercreeper.java:20: cannot find symbol
symbol : method AddSpawn(java.lang.Class<net.minecraft.src.EntitySupercreeper>,
int,net.minecraft.src.EnumCreatureType)
location: class net.minecraft.src.ModLoader
ModLoader.AddSpawn(EntitySupercreeper.class, 500, EnumCreatureType.monster);
^
1 error
==================
> Done in 3.88 seconds
> Recompiling server...
> Done in 3.30 seconds
Pressione qualquer tecla para continuar. . .
Here are My files:
mod_Supercreeper
package net.minecraft.src;
import java.util.Random;
import java.util.Map;
public class mod_Supercreeper extends BaseMod
{
public mod_Supercreeper()
{
AddMobs();
}
public void AddMobs()
{
//This line just registers the mob, and sets a name for it, as well as it's own unique entity ID
ModLoader.RegisterEntityID(EntitySupercreeper.class, "Supercreeper", ModLoader.getUniqueEntityId());
//This line makes tells the mob to spawn. The number 500 is how rare the mob is
//EnumCreatureType.creature = land mob, EnumCreatureType.waterCreature = water mob,
//EnumCreatureType.monster = a hostile mob that only spawns in darkness
ModLoader.AddSpawn(EntitySupercreeper.class, 500, EnumCreatureType.monster);
}
public void AddRenderer(Map map)
{
map.put(EntitySupercreeper.class, new RenderSupercreeper(new ModelSupercreeper(), 0.5F));
}
public String Version()
{
return "1.8.1";
}
}
EntitySupercreeper:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// EntityMob, DataWatcher, NBTTagCompound, World,
// DamageSource, EntitySkeleton, Item, Entity,
// EntityLightningBolt
public class EntitySupercreeper extends EntityMob
{
public EntitySupercreeper(World world)
{
super(world);
texture = "/mob/supercreeper.png";
}
protected void entityInit()
{
super.entityInit();
dataWatcher.addObject(16, Byte.valueOf((byte)-1));
dataWatcher.addObject(17, Byte.valueOf((byte)0));
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
if(dataWatcher.getWatchableObjectByte(17) == 1)
{
nbttagcompound.setBoolean("powered", true);
}
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
dataWatcher.updateObject(17, Byte.valueOf((byte)(nbttagcompound.getBoolean("powered") ? 1 : 0)));
}
protected void attackBlockedEntity(Entity entity, float f)
{
if(worldObj.multiplayerWorld)
{
return;
}
if(timeSinceIgnited > 0)
{
setSupercreeperState(-1);
timeSinceIgnited--;
if(timeSinceIgnited < 0)
{
timeSinceIgnited = 0;
}
}
}
public void onUpdate()
{
lastActiveTime = timeSinceIgnited;
if(worldObj.multiplayerWorld)
{
int i = getSupercreeperState();
if(i > 0 && timeSinceIgnited == 0)
{
worldObj.playSoundAtEntity(this, "random.fuse", 1.0F, 0.5F);
}
timeSinceIgnited += i;
if(timeSinceIgnited < 0)
{
timeSinceIgnited = 0;
}
if(timeSinceIgnited >= 30)
{
timeSinceIgnited = 30;
}
}
super.onUpdate();
if(entityToAttack == null && timeSinceIgnited > 0)
{
setSupercreeperState(-1);
timeSinceIgnited--;
if(timeSinceIgnited < 0)
{
timeSinceIgnited = 0;
}
}
}
protected String getHurtSound()
{
return "mob.creeper";
}
protected String getDeathSound()
{
return "mob.creeperdeath";
}
public void onDeath(DamageSource damagesource)
{
super.onDeath(damagesource);
if(damagesource.getEntity() instanceof EntitySkeleton)
{
dropItem(Item.record13.shiftedIndex + rand.nextInt(2), 1);
}
}
protected void attackEntity(Entity entity, float f)
{
if(worldObj.multiplayerWorld)
{
return;
}
int i = getSupercreeperState();
if(i <= 0 && f < 3F || i > 0 && f < 7F)
{
if(timeSinceIgnited == 0)
{
worldObj.playSoundAtEntity(this, "random.fuse", 1.0F, 0.5F);
}
setSupercreeperState(1);
timeSinceIgnited++;
if(timeSinceIgnited >= 30)
{
if(getPowered())
{
worldObj.createExplosion(this, posX, posY, posZ, 8F);
} else
{
worldObj.createExplosion(this, posX, posY, posZ, 5F);
}
setEntityDead();
}
hasAttacked = true;
} else
{
setSupercreeperState(-1);
timeSinceIgnited--;
if(timeSinceIgnited < 0)
{
timeSinceIgnited = 0;
}
}
}
public boolean getPowered()
{
return dataWatcher.getWatchableObjectByte(17) == 1;
}
public float setSupercreeperFlashTime(float f)
{
return ((float)lastActiveTime + (float)(timeSinceIgnited - lastActiveTime) * f) / 28F;
}
protected int getDropItemId()
{
return Item.gunpowder.shiftedIndex;
}
private int getSupercreeperState()
{
return dataWatcher.getWatchableObjectByte(16);
}
private void setSupercreeperState(int i)
{
dataWatcher.updateObject(16, Byte.valueOf((byte)i));
}
public void onStruckByLightning(EntityLightningBolt entitylightningbolt)
{
super.onStruckByLightning(entitylightningbolt);
dataWatcher.updateObject(17, Byte.valueOf((byte)1));
}
int timeSinceIgnited;
int lastActiveTime;
}
ModelSupercreeper:
// Date: 22/10/2011 13:06:41
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package net.minecraft.src;
public class ModelSupercreeper extends ModelBase
{
public ModelSupercreeper()
{
head = new ModelRenderer(this, 0, 0);
head.addBox(-4F, -8F, -4F, 8, 8, 8);
head.setRotationPoint(0F, 6F, 0F);
head.rotateAngleX = 0.01745F;
head.rotateAngleY = 0F;
head.rotateAngleZ = 0F;
head.mirror = false;
body = new ModelRenderer(this, 16, 16);
body.addBox(-4F, 0F, -2F, 8, 12, 4);
body.setRotationPoint(0F, 6F, 0F);
body.rotateAngleX = 0.01745F;
body.rotateAngleY = 0F;
body.rotateAngleZ = 0F;
body.mirror = false;
leg3 = new ModelRenderer(this, 0, 16);
leg3.addBox(-2F, 0F, -2F, 4, 6, 4);
leg3.setRotationPoint(-2F, 18F, -4F);
leg3.rotateAngleX = 0.01745F;
leg3.rotateAngleY = 0F;
leg3.rotateAngleZ = 0F;
leg3.mirror = false;
leg4 = new ModelRenderer(this, 0, 16);
leg4.addBox(-2F, 0F, -2F, 4, 6, 4);
leg4.setRotationPoint(2F, 18F, -4F);
leg4.rotateAngleX = 0.01745F;
leg4.rotateAngleY = 0F;
leg4.rotateAngleZ = 0F;
leg4.mirror = false;
leg1 = new ModelRenderer(this, 0, 16);
leg1.addBox(0F, 0F, -2F, 4, 6, 4);
leg1.setRotationPoint(-4F, 18F, 4F);
leg1.rotateAngleX = 0.01745F;
leg1.rotateAngleY = 0F;
leg1.rotateAngleZ = 0F;
leg1.mirror = false;
leg2 = new ModelRenderer(this, 0, 16);
leg2.addBox(-2F, 0F, -2F, 4, 6, 4);
leg2.setRotationPoint(2F, 18F, 4F);
leg2.rotateAngleX = 0.01745F;
leg2.rotateAngleY = 0F;
leg2.rotateAngleZ = 0F;
leg2.mirror = false;
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5);
head.render(f5);
body.render(f5);
leg3.render(f5);
leg4.render(f5);
leg1.render(f5);
leg2.render(f5);
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5);
}
//fields
ModelRenderer head;
ModelRenderer body;
ModelRenderer leg3;
ModelRenderer leg4;
ModelRenderer leg1;
ModelRenderer leg2;
}
RenderSupercreeper:
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
public class RenderSupercreeper extends RenderLiving
{
//The three numbers below change the size of your model (you'll need to change the hitbox size too though)
protected void preRenderScale(EntitySupercreeper entity, float f)
{
GL11.glScalef(1.5F, 1.5F, 1.5F);
}
public RenderSupercreeper(ModelSupercreeper modelbase, float f)
{
super(modelbase, f);
}
public void func_177_a(EntitySupercreeper 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)
{
super.doRenderLiving((EntitySupercreeper) entityliving, d, d1, d2, f, f1);
}
public void doRender(Entity entity, double d, double d1, double d2,
float f, float f1)
{
doRenderLiving((EntitySupercreeper)entity, d, d1, d2, f, f1);
}
protected void preRenderCallback(EntityLiving entityliving, float f)
{
preRenderScale((EntitySupercreeper)entityliving, f);
}
}
plz HELP!