mcdMobs -- errors need help!!! [Unanswered]
4 posters
Page 1 of 1
mcdMobs -- errors need help!!! [Unanswered]
Hi guys
i need help with my mcdMobs mod...
i have an error with my first mob...
here is the error :
and here is my RenderWarthog :
Please help... :L
i need help with my mcdMobs mod...
i have an error with my first mob...
here is the error :
- Code:
MCP 2.12 running in /Users/madcrazydrumma/Desktop/mcp212_test1
Compiling Minecraft
sources/minecraft/net/minecraft/src/mod_Warthog.java:12: cannot find symbol
symbol : variable Modloader
location: class net.minecraft.src.mod_Warthog
Modloader.getUniqueEntityID());
^
sources/minecraft/net/minecraft/src/mod_Warthog.java:20: cannot find symbol
symbol : constructor RenderWarthog(net.minecraft.src.ModelWarthog,float)
location: class net.minecraft.src.RenderWarthog
map.put(EntityWarthog.class, new RenderWarthog(new ModelWarthog(),
^
2 errors
and here is my RenderWarthog :
- Code:
package net.minecraft.src;
public class RenderWarthog extends RenderLiving
{
public RenderWarthog(ModelBase modelbase, ModelBase modelbase1, float f)
{
super(modelbase, f);
setRenderPassModel(modelbase1);
}
protected boolean renderSaddledPig(EntityWarthog entitywarthog, int i, float f)
{
loadTexture("/mob/saddle.png");
return i == 0 && entitywarthog.getSaddled();
}
protected boolean shouldRenderPass(EntityLiving entityliving, int i, float f)
{
return renderSaddledPig((EntityWarthog)entityliving, i, f);
}
}
- Code:
package net.minecraft.src;
public class EntityWarthog extends EntityAnimal
{
public EntityWarthog(World world)
{
super(world);
texture = "/mob/warthog.png";
setSize(0.9F, 0.9F);
}
protected void entityInit()
{
dataWatcher.addObject(16, Byte.valueOf((byte)0));
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
nbttagcompound.setBoolean("Saddle", getSaddled());
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
setSaddled(nbttagcompound.getBoolean("Saddle"));
}
protected String getLivingSound()
{
return "mob.pig";
}
protected String getHurtSound()
{
return "mob.pig";
}
protected String getDeathSound()
{
return "mob.pigdeath";
}
public boolean interact(EntityPlayer entityplayer)
{
if(getSaddled() && !worldObj.multiplayerWorld && (riddenByEntity == null || riddenByEntity == entityplayer))
{
entityplayer.mountEntity(this);
return true;
} else
{
return false;
}
}
protected int getDropItemId()
{
if(fire > 0)
{
return Item.porkCooked.shiftedIndex;
} else
{
return Item.porkRaw.shiftedIndex;
}
}
public boolean getSaddled()
{
return (dataWatcher.getWatchableObjectByte(16) & 1) != 0;
}
public void setSaddled(boolean flag)
{
if(flag)
{
dataWatcher.updateObject(16, Byte.valueOf((byte)1));
} else
{
dataWatcher.updateObject(16, Byte.valueOf((byte)0));
}
}
public void func_27014_a(EntityLightningBolt entitylightningbolt)
{
EntityWarthog entitywarthog = new EntityWarthog(worldObj);
entitywarthog.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch);
worldObj.entityJoinedWorld(entitywarthog);
setEntityDead();
}
protected void fall(float f)
{
super.fall(f);
if(f > 5F && (riddenByEntity instanceof EntityPlayer))
{
((EntityPlayer)riddenByEntity).func_27026_a(AchievementList.field_27375_u);
}
}
}
Please help... :L
madcrazydrumma- ZidMC Coder
- Posts : 61
Join date : 2011-04-22
Age : 28
Location : Dubai
Re: mcdMobs -- errors need help!!! [Unanswered]
For the first error, the L in ModLoader isn't capitalized. See if that clears up the other one.
shoopdawhoop23- Moderator
- Posts : 56
Join date : 2011-04-22
Re: mcdMobs -- errors need help!!! [Unanswered]
No it doesnt clear it up... im still having an error Here is the error:
and the 2 classes are above... i have no idea what is wrong?! :L
- Code:
MCP 2.12 running in /Users/madcrazydrumma/Desktop/mcp212_test1
Compiling Minecraft
sources/minecraft/net/minecraft/src/mod_Warthog.java:12: cannot find symbol
symbol : method getUniqueEntityID()
location: class net.minecraft.src.ModLoader
ModLoader.getUniqueEntityID());
^
sources/minecraft/net/minecraft/src/mod_Warthog.java:20: cannot find symbol
symbol : constructor RenderWarthog(net.minecraft.src.ModelWarthog,float)
location: class net.minecraft.src.RenderWarthog
map.put(EntityWarthog.class, new RenderWarthog(new ModelWarthog(),
^
2 errors
*** minecraft_server.jar not found, skipping
=== MCP 2.12 recompile script finished ===
and the 2 classes are above... i have no idea what is wrong?! :L
madcrazydrumma- ZidMC Coder
- Posts : 61
Join date : 2011-04-22
Age : 28
Location : Dubai
Re: mcdMobs -- errors need help!!! [Unanswered]
Hey, don't just copy and paste code and rename it. Also, Java is looking for a Constructor. MCP says, learn the basics and come back to us. You should know what Constructors are. I don't know about the other error, your code seems okay there.
Re: mcdMobs -- errors need help!!! [Unanswered]
Hmm well if someone could help that would be useful
RE: "The the new error log is above and also my files are at the top post aswell"...
RE: "The the new error log is above and also my files are at the top post aswell"...
madcrazydrumma- ZidMC Coder
- Posts : 61
Join date : 2011-04-22
Age : 28
Location : Dubai
Re: mcdMobs -- errors need help!!! [Unanswered]
I know what is wrong. Your mod_Warthog is wrong.
It says:
It should say:
Thats the only thing I saw wrong. If it doesn't work I don't know what to do.
It says:
- Code:
public class EntityWarthog extends EntityAnimal
It should say:
- Code:
public class mod_Warthog extends BaseMod
Thats the only thing I saw wrong. If it doesn't work I don't know what to do.
xMinecraft45- Recruit
- Posts : 1
Join date : 2011-05-02
Re: mcdMobs -- errors need help!!! [Unanswered]
Ok Will Try that now and i will post again to see if it helped
madcrazydrumma- ZidMC Coder
- Posts : 61
Join date : 2011-04-22
Age : 28
Location : Dubai
Re: mcdMobs -- errors need help!!! [Unanswered]
Oops lol... at the above i accidentaly posted my entity as the mod_Warthog.java file...
anyways here is all my class files plus the error log ...
Error Log:
and here is my RenderWarthog :
and here is my mod_Warthog :
and here is my EntityWarthog :
and finally here is my modelWarthog :
and basically for the modelWarthog i just copied and pasted the codes from the pig.java files in the sources part of MCP...
so yeh please help :L
anyways here is all my class files plus the error log ...
Error Log:
- Code:
MCP 2.12 running in /Users/madcrazydrumma/Desktop/mcp212_test1
Compiling Minecraft
sources/minecraft/net/minecraft/src/mod_Warthog.java:12: cannot find symbol
symbol : method getUniqueEntityID()
location: class net.minecraft.src.ModLoader
ModLoader.getUniqueEntityID());
^
sources/minecraft/net/minecraft/src/mod_Warthog.java:20: cannot find symbol
symbol : constructor RenderWarthog(net.minecraft.src.ModelWarthog,float)
location: class net.minecraft.src.RenderWarthog
map.put(EntityWarthog.class, new RenderWarthog(new ModelWarthog(),
^
2 errors
*** minecraft_server.jar not found, skipping
=== MCP 2.12 recompile script finished ===
and here is my RenderWarthog :
- Code:
package net.minecraft.src;
public class RenderWarthog extends RenderLiving
{
public RenderWarthog(ModelBase modelbase, ModelBase modelbase1, float f)
{
super(modelbase, f);
setRenderPassModel(modelbase1);
}
protected boolean renderSaddledPig(EntityWarthog entitywarthog, int i, float f)
{
loadTexture("/mob/saddle.png");
return i == 0 && entitywarthog.getSaddled();
}
protected boolean shouldRenderPass(EntityLiving entityliving, int i, float f)
{
return renderSaddledPig((EntityWarthog)entityliving, i, f);
}
}
and here is my mod_Warthog :
- Code:
package net.minecraft.src;
import java.util.*;
import java.util.Map;
public class mod_Warthog extends BaseMod
{
public mod_Warthog()
{
ModLoader.RegisterEntityID(EntityWarthog.class, "WartHog",
ModLoader.getUniqueEntityID());
ModLoader.AddSpawn(EntityWarthog.class, 2,
EnumCreatureType.creature);
}
public void AddRenderer(Map map)
{
map.put(EntityWarthog.class, new RenderWarthog(new ModelWarthog(),
0.5F));
}
public String Version()
{
return "mcdMobs for Beta 1.5_01!";
}
}
and here is my EntityWarthog :
- Code:
package net.minecraft.src;
public class EntityWarthog extends EntityAnimal
{
public EntityWarthog(World world)
{
super(world);
texture = "/mob/warthog.png";
setSize(0.9F, 0.9F);
}
protected void entityInit()
{
dataWatcher.addObject(16, Byte.valueOf((byte)0));
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
nbttagcompound.setBoolean("Saddle", getSaddled());
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
setSaddled(nbttagcompound.getBoolean("Saddle"));
}
protected String getLivingSound()
{
return "mob.pig";
}
protected String getHurtSound()
{
return "mob.pig";
}
protected String getDeathSound()
{
return "mob.pigdeath";
}
public boolean interact(EntityPlayer entityplayer)
{
if(getSaddled() && !worldObj.multiplayerWorld && (riddenByEntity == null || riddenByEntity == entityplayer))
{
entityplayer.mountEntity(this);
return true;
} else
{
return false;
}
}
protected int getDropItemId()
{
if(fire > 0)
{
return Item.porkCooked.shiftedIndex;
} else
{
return Item.porkRaw.shiftedIndex;
}
}
public boolean getSaddled()
{
return (dataWatcher.getWatchableObjectByte(16) & 1) != 0;
}
public void setSaddled(boolean flag)
{
if(flag)
{
dataWatcher.updateObject(16, Byte.valueOf((byte)1));
} else
{
dataWatcher.updateObject(16, Byte.valueOf((byte)0));
}
}
public void func_27014_a(EntityLightningBolt entitylightningbolt)
{
EntityWarthog entitywarthog = new EntityWarthog(worldObj);
entitywarthog.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch);
worldObj.entityJoinedWorld(entitywarthog);
setEntityDead();
}
protected void fall(float f)
{
super.fall(f);
if(f > 5F && (riddenByEntity instanceof EntityPlayer))
{
((EntityPlayer)riddenByEntity).func_27026_a(AchievementList.field_27375_u);
}
}
}
and finally here is my modelWarthog :
- Code:
package net.minecraft.src;
public class ModelWarthog extends ModelQuadruped
{
public ModelWarthog()
{
super(6, 0.0F);
}
public ModelWarthog(float f)
{
super(6, f);
}
}
and basically for the modelWarthog i just copied and pasted the codes from the pig.java files in the sources part of MCP...
so yeh please help :L
madcrazydrumma- ZidMC Coder
- Posts : 61
Join date : 2011-04-22
Age : 28
Location : Dubai
Similar topics
» [MCP 3.1]1.5_01 Recompile errors [UNANSWERED]
» 29 ERRORS!!!
» [1.5_01] recompile errors [answered]
» [Answered]Recompiling Errors[1.5_01][3.1]
» [212-1][MOB]Recompiling errors (not icecube) URGENT!!!
» 29 ERRORS!!!
» [1.5_01] recompile errors [answered]
» [Answered]Recompiling Errors[1.5_01][3.1]
» [212-1][MOB]Recompiling errors (not icecube) URGENT!!!
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|