The Meaning of Life, the Universe, and Everything.
Join Date:
5/26/2014
Posts:
83
Member Details
Hi everyone! This is my first mod so plz no bad comments. If you want to install this mod here is the code
function useItem (x, y, z,itemId, blockId, side)//325
{
if(itemId == 325)//If the item used is a stick
{
var custom = Level.spawnMob(x,y+1,z,11,"cow/char.png"); //spawns mob, variable "custom", and uses the skin char
Entity.setRenderType(custom,3); //changes the rendertype of the mob custom to a player
clientMessage("You have now Spawned Cow Man! LoLz"); //clientmessage sent if item is a stick
}
}
To spawn cow man; tap the ground with a milk bucket!
Hm... Seems that you got some things wrong. ;( Nvm, I have a "fix" for this code.
var custom;
function useItem(x, y, z, itemId, blockId, side)
{
if(itemId == 325){//If item used is a bucket
custom = Level.spawnMob(x, y+1, z, 11, "mob/char.png"); //Spawns a cow with a Steve skin
Entity.setRenderType(custom, 3); //The cow "becomes" a player (steve)
clientMessage("You have now spawned Cow Man! LoLz"); //Sends a message when you spawned cow man
}
}
Good Luck on your future mods!
Rollback Post to RevisionRollBack
It has been FUN modding, but everything has an end. I've quitted modding! Good Luck & Have Fun! ;D
To post a comment, please login or register a new account.
function useItem (x, y, z,itemId, blockId, side)//325
{
if(itemId == 325)//If the item used is a stick
{
var custom = Level.spawnMob(x,y+1,z,11,"cow/char.png"); //spawns mob, variable "custom", and uses the skin char
Entity.setRenderType(custom,3); //changes the rendertype of the mob custom to a player
clientMessage("You have now Spawned Cow Man! LoLz"); //clientmessage sent if item is a stick
}
}
To spawn cow man; tap the ground with a milk bucket!
var custom; function useItem(x, y, z, itemId, blockId, side) { if(itemId == 325){//If item used is a bucket custom = Level.spawnMob(x, y+1, z, 11, "mob/char.png"); //Spawns a cow with a Steve skin Entity.setRenderType(custom, 3); //The cow "becomes" a player (steve) clientMessage("You have now spawned Cow Man! LoLz"); //Sends a message when you spawned cow man } }Good Luck on your future mods!