src/minecraft/net/minecraft/src/mod_Cookie.java:24: cannot find symbol
symbol : variable Spawnlist
location: class net.minecraft.src.mod_Cookie
Spawnlist.addCreaturesToSpawnList("Surface biomes", EntityCookie.class);
^
src/minecraft/net/minecraft/src/mod_Cookie.java:24: cannot find symbol
symbol : variable Spawnlist
location: class net.minecraft.src.mod_Cookie
Spawnlist.addCreaturesToSpawnList("Surface biomes", EntityCookie.class);
^
i need some help
This mean you didn't istall Spawnlist correctly, you must put the files into minecraft.jar before decompiling for the first time.
EDIT: Thanks to everyone who told me to move the spawning to mod_Pigman instead of adding mod_SpawnPigman, and someone also confirms this makes it compatible with Mo' Creatures. If you followed this tutorial before, update your mods!
How do you make it drop more then 1 thing?
And how do you edit the chances/odds?
PLEASE NOTICE: Wow, this simple tutorial has brought the whole Minecraft modding community to a new generation full of human mobs. Every time I look back at this, I see how much I have changed the community, and I feel very happy. This tutorial is very outdated, however. But now, look around, everyone knows how to create a human mob. Get help from one of today's modders on how to make a human mob. I have quit modding since, and I thank everybody for their support while I was a modder. I might never return to modding, but who knows? I probably will in 1.7! ~Club559 (June 21, 2011)
Before testing your results, download (required): Risugami's ModLoader 303's SpawnList
In this tutorial I will teach you how to make a simple mob in the shape of a person. This tutorial will not include how to model, neither does it use a model.
First, download all of the listed above. Get out your tutorial folder and go to the sources. Copy all of the sources over to your MCP source folder (decompile unmodified minecraft.jar before doing this). The EntityList is just a fix for the private function MCP converts it to, so copy that to your sources too.
Open up EntityPigman.java.
package net.minecraft.src;
public class EntityPigman extends EntityCreature
{
public EntityPigman(World world)
{
super(world);
//This is the texture for your mob
texture = "/mob/mymob.png";
}
protected int getDropItemId()
{
//This is the item your mob will drop
return Item.porkCooked.shiftedIndex;
}
}
Replace all "Pigman" with the name of your mob. Then, replace "mymob" with the name of your mob. After that, change "porkCooked" to the new name of your item. If you want it to drop a block...
return Block.nameofblock.blockID;
Replace "nameofblock" with the name of the block. NOTE: You will have to look inside Item.java and Block.java to see the names of these.
Rename EntityPigman.java to fit your new mob.
Open up mod_Pigman.java.
package net.minecraft.src;
import java.lang.reflect.Method;
public class mod_Pigman extends BaseMod
{
public mod_Pigman()
{
}
public String Version()
{
return "1.2_02";
}
public void AddEntityID()
{
//This defines your entity. Class name, entity
name, and then the entity ID.
EntityList.addMapping(EntityPigman.class,
"Pigman", ModLoader.getUniqueEntityId());
//This adds your mob to the spawn list.
spawnlist.addCreaturesToSpawnList("Surface
biomes", EntityPigman.class);
}
}
Again, replace all "Pigman" with the name of your mob, and replace "Surface biomes" with the biome of your needs. For everywhere (like a normal mob), use Surface biomes. If you want a different one, check spawnlist.java for the list of biomes available.
Rename mod_Pigman to suit your new mob.
You are close to being done. Now just open the folder "Texture for minecraft.jar" in your tutorial files, open "mob", and replace mymob.png with the player skin that you would like. Also rename it to what you did on EntityPigman on this line:
texture = "/mob/mymob.png"
Once you have done that, compile the following:
mod_[MobName]
Entity[MobName]
After that, you are done with your mob!
If you get an error, make sure you did everything correctly.
EDIT: Thanks to everyone who told me to move the spawning to mod_Pigman instead of adding mod_SpawnPigman, and someone also confirms this makes it compatible with Mo' Creatures. If you followed this tutorial before, update your mods!
hmmm... I tried it and I got 2 errors...
one of them said the mod_ file was missing a "body"?
the other said there was no suitable method for addspawn?
and then it gave me this whole list of "is not applicable" modloader stuff.
HELP
1. Make the mob fly when another mob that is flying hits it
2. Make the mob fly randomly (by itself) and then randomly returning to the ground
To no avail I tried playing with:
this.motionY +=0.400000000001D or even make it += 1.0000000000001D and place it under onLivingUpdate()
but this code never tells it to fly when its hit by another mob that is not on ground :sad.gif:
I also tried
if (!entity.onGround && entity.hasAttacked && this.beenAttacked) //the (!) means not //
{
this.motionY +=0.4000000001D //because i wanted it to cruise up easily and gently
if(this.posY >= entity.posY) //this suppose to tell if the mobs position is more than
{ // the entity that attacked position then be equal to it
this.posY = entity.posY
}
}
okay but here is the problem the code does not recognize that (entity) is suppose to be the entity that attacked my mob (this). :sad.gif:
package net.minecraft.src;
import java.lang.reflect.Method;
public class mod_Piggy extends BaseMod
{
public mod_Piggy()
{
}
public void AddEntityID()
{
//This defines your entity. Class name, entity name, and then the entity ID.
EntityList.addMapping(EntityPiggy.class, "Piggy", ModLoader.getUniqueEntityId());
//This adds your mob to the spawn list.
spawnlist.addCreaturesToSpawnList("Surface biomes", EntityPiggy.class);
}
}
but when i recompile i get 4 errors!
== MCP v4.3 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\EntityList.java:125: cannot find symbol
symbol : class EntityMobs
location: class net.minecraft.src.EntityList
addMapping(EntityMobs.class, "Monster", 49);
^
src\minecraft\net\minecraft\src\EntityList.java:129: cannot find symbol
symbol : class EntityZombieSimple
location: class net.minecraft.src.EntityList
addMapping(EntityZombieSimple.class, "Giant", 53);
^
src\minecraft\net\minecraft\src\mod_Piggy.java:5: net.minecraft.src.mod_Piggy is
not abstract and does not override abstract method Version() in net.minecraft.s
rc.BaseMod
public class mod_Piggy extends BaseMod
^
src\minecraft\net\minecraft\src\mod_Piggy.java:16: cannot find symbol
symbol : variable spawnlist
location: class net.minecraft.src.mod_Piggy
spawnlist.addCreaturesToSpawnList("Surface biomes", EntityPiggy.class);
^
4 errors
==================
> Done in 5.03 seconds
> Recompiling server...
!! Can not find server sources !!
I cant find the entitypigman in my src/minecraft/src folder
You have to make it >.<
Right click any class then go to: new > class >
Then name it EntityPigman or whatever you mob is for example EntityRoBroGaming :smile.gif:
Wow thanks, this was great, how do u choose the spawning abilities? i am working on a more humans mod, and need to add some new mobs. I have the route ( villager/farmer/farmer.png/ ) like that, but i made some new ones but can't find the spawn code.
If not, can someone please make a new one? Thanks.
Please answer :smile.gif:
src/minecraft/net/minecraft/src/mod_Cookie.java:24: cannot find symbol
symbol : variable Spawnlist
location: class net.minecraft.src.mod_Cookie
Spawnlist.addCreaturesToSpawnList("Surface biomes", EntityCookie.class);
^
i need some help
This mean you didn't istall Spawnlist correctly, you must put the files into minecraft.jar before decompiling for the first time.
How do you make it drop more then 1 thing?
And how do you edit the chances/odds?
hmmm... I tried it and I got 2 errors...
one of them said the mod_ file was missing a "body"?
the other said there was no suitable method for addspawn?
and then it gave me this whole list of "is not applicable" modloader stuff.
HELP
1. Make the mob fly when another mob that is flying hits it
2. Make the mob fly randomly (by itself) and then randomly returning to the ground
To no avail I tried playing with:
this.motionY +=0.400000000001D or even make it += 1.0000000000001D and place it under onLivingUpdate()
but this code never tells it to fly when its hit by another mob that is not on ground :sad.gif:
I also tried
if (!entity.onGround && entity.hasAttacked && this.beenAttacked) //the (!) means not //
{
this.motionY +=0.4000000001D //because i wanted it to cruise up easily and gently
if(this.posY >= entity.posY) //this suppose to tell if the mobs position is more than
{ // the entity that attacked position then be equal to it
this.posY = entity.posY
}
}
okay but here is the problem the code does not recognize that (entity) is suppose to be the entity that attacked my mob (this). :sad.gif:
is there any work around for this
link: The Dragon Ball Mod Alpha 1.1
but when i recompile i get 4 errors!
== MCP v4.3 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\EntityList.java:125: cannot find symbol
symbol : class EntityMobs
location: class net.minecraft.src.EntityList
addMapping(EntityMobs.class, "Monster", 49);
^
src\minecraft\net\minecraft\src\EntityList.java:129: cannot find symbol
symbol : class EntityZombieSimple
location: class net.minecraft.src.EntityList
addMapping(EntityZombieSimple.class, "Giant", 53);
^
src\minecraft\net\minecraft\src\mod_Piggy.java:5: net.minecraft.src.mod_Piggy is
not abstract and does not override abstract method Version() in net.minecraft.s
rc.BaseMod
public class mod_Piggy extends BaseMod
^
src\minecraft\net\minecraft\src\mod_Piggy.java:16: cannot find symbol
symbol : variable spawnlist
location: class net.minecraft.src.mod_Piggy
spawnlist.addCreaturesToSpawnList("Surface biomes", EntityPiggy.class);
^
4 errors
==================
> Done in 5.03 seconds
> Recompiling server...
!! Can not find server sources !!
help?
"I know there are people in the world that do not love their fellow human beings, and I hate people like that." -Tom Lehrer
No, the mob spawning system was revamped in 1.8.1.
mine and craft
You have to make it >.<
Right click any class then go to: new > class >
Then name it EntityPigman or whatever you mob is for example EntityRoBroGaming :smile.gif: