Announcement: Yes, Minecraft.net is having issues. _Please_ don't post threads about it!

coding help

Anything that isn't Minecraft-related or doesn't go anywhere above goes here.

Post Permalink
by jgj2 » 6/29/2012

how do i make a spawn egg so far all i got

package net.minecraft.src;

import java.util.Random;

public class mod_Itemspawnegg
{

public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer
entityplayer)
{
Entitytank test = new Entitytank(world);
test.setLocationAndAngles(entityplayer.posX, entityplayer.posY,
entityplayer.posZ, entityplayer.rotationYaw, 0.3F);
world.entityJoinedWorld(test);
itemstack.stackSize--;
return itemstack;
}
}

what less do i need?
User avatar
Level 38
Artisan Modder
Posts: 9
Joined: 11/16/11

Post Permalink
by DusteroftheCentury » 6/29/2012

Actually, all you need is to when making a new mob, just use this
Code: Select all
ModLoader.registerEntityID(EntityExample.class, "Example", ModLoader.getUniqueEntityId(),0x<html color code>, 0x<html colo code>);
ModLoader.addLocalization("entity.Example.name", "Example");

The color codes are for the color of the egg
Image
User avatar
Level 6
Apprentice Skinner
Posts: 686
Joined: 7/9/11
Location: The Moon
Says: Stand back! Im going to try "SCIENCE".
Minecraft: CenturyDuster


Return to General Discussion