This one is only for a biped model (player model and like a zombie), ill do a custom modeled mob soon!
This custom mob wont do anything special besides attack the player...
First lets start with the entity!
Make a class called EntityYOURMOB
First extends "EntityMob"
Then add your constructor:
public EntityYOURMOB(World par1World)
{
super(par1World);
}
Now add the size (the hitbox) and the AI's (to make them do something) into your constructor
public EntityYOURMOB(World par1World)
{
super(par1World);
this.setSize(1.5F, 2.0F);
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, false));
this.tasks.addTask(5, new EntityAIWander(this, 0.8D));
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
}
This will give it sounds and activate your AI code... If you followed my tut for the custom sounds, then this is where you can use it
The LanguageRegistry will add the mobs name, The EntityRegistry will register you entity, and lastly we have the RenderingRegistry...
That binds your Entity with your Render, that will make sure you get the mob you want..
Make the mob spawn!
To make a mob spawn, In you 'preInit' Method, Type: "EntityRegistry.addSpawn"
You will get something like this:
The "entityClass" Means You will need to add the EntityClass.class meaning, for this tutorial its going to be "EntityYOURMOB.class"
The "weightedProb" means how many groups will spawn in each chunk.. (Chunk meaning 16 * 16 blocks)
so lets just say 3 groups will spawn in the chunk.
the "min/max" means how many minimum and how many maximum in a group, so if i say "1, 3" It would randomize between 1 - 3 in a group (the maximum in the group could be three or it could just be one or two of your mob spawning in the group)
The "typeOfCreature" will determine if it will spawn during the night/day so because we are making a monster mob i would put "EnumCreatureType.monster" if you want it to be spawning during the day, just put "EnumCreatureType.creature"
And lastly, the "biomes", So if you want it to spawn in any biome, just go "BiomeGenBase." And pick a biome, if you want it to spawn in more than one biome, just put for example:
"BiomeGenBase.plains, BiomeGenBase.desert"
You can add more biomes by just putting in a commar after you did the last biome..
So in the final code it should look something like this:
THANKS! I´ve been trying this for MONTHS and now you gifted it to me
You just made the most important part in Kingdomcraft.Ehm, The_Slayer, what if i want for a mob to attack creatures like wolves do? Which task should i add in the AI thing?
I get an error for void saying: Syntax error on token "void", @ unexpected
Actually, you have to add a {. Dont remember where but i did that and the error dissapearedHelp!! I made everything, got no errors, but the mob doesn´t spawn. Game doesn´t crash either. Anything else that i didn´t made?
@Mod(modid = AgeOfCrafters.modid, name = "Age Of Crafters, the Rise of Steve", version = "1.0.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class AgeOfCrafters {
@Instance(value = "AgeOfCrafters")
public static AgeOfCrafters instance;
@SidedProxy(clientSide="net.aoc.mod.client.ClientProxy", serverSide="net.aoc.mod.CommonProxy")
public static CommonProxy proxy;
public static final String modid = "aoc";
//Definers ==> Naturally generated
public static Block pineLog;
public static Block ashLog;
public static Block pinePlanks;
public static Block ashPlanks;
public static Block pineSapling;
public static Block pineLeaves;
public static Block bronzeOre;
public static Block steelOre;
public static Block redSteelOre;
//Definers ==> Altars
public static Block L1IAltar;
public static Block L2IAltar;
//Definers ==> Items
public static Item bronzeIngot;
public static Item dirtBrick;
public static Item steelIngot;
public static Item redSteelIngot;
//Definers ==> Aesthetic blocks
public static Block snowBricks;
public static Block blackBricks;
public static Block brownBricks;
public static Block purpleBricks;
public static Block lightGrayBricks;
public static Block grayBricks;
public static Block pinkBricks;
public static Block limeBricks;
public static Block yellowBricks;
public static Block lightBlueBricks;
public static Block bronzeBlock;
public static Block magentaBricks;
public static Block orangeBricks;
public static Block redBricks;
public static Block whiteBricks;
public static Block blueBricks;
public static Block greenBricks;
//public static Block fancyStoneBrick;
public static Block dirtBricks;
public static Block cyanBricks;
public static CreativeTabs AoEBlocks;
public static CreativeTabs AoEItems;
public static final int guiIdL1IAltar = 0;
//Event Handlers
@EventHandler
public void preInit(FMLPreInitializationEvent event){
EntityRegistry.registerModEntity(EntityShortSwordsman.class, "ShortSwordsman", 5, this, 10, 10, true);
RenderingRegistry.registerEntityRenderingHandler(EntityShortSwordsman.class, new RenderShortSwordsman(new ModelBiped(), 0.4F));
}
@EventHandler
public void Init(FMLInitializationEvent event){
proxy.registerRenderers();
}
@EventHandler
public void PostInit(FMLPostInitializationEvent event){
}
{
AoEBlocks = new CreativeTabs("aoeblocks"){
@SideOnly(Side.CLIENT)
public int getTabIconItemIndex() {
return AgeOfCrafters.pineLog.blockID;
}
};
AoEItems = new CreativeTabs("aoeitems"){
@SideOnly(Side.CLIENT)
public int getTabIconItemIndex() {
return AgeOfCrafters.bronzeIngot.itemID;
}
};
//Settings (500-505)
ashLog = new BlockAshLog(500, Material.wood).setUnlocalizedName("ashLog").setHardness(2F).setCreativeTab(this.AoEBlocks);
ashPlanks = new BlockAshPlanks(501, Material.wood).setUnlocalizedName("ashPlanks").setHardness(2F).setCreativeTab(this.AoEBlocks);
pineLog = new BlockPineLog(502, Material.wood).setUnlocalizedName("pineLog").setHardness(2F).setCreativeTab(this.AoEBlocks);
pinePlanks = new BlockPinePlanks(503, Material.wood).setUnlocalizedName("pinePlanks").setHardness(2F).setCreativeTab(this.AoEBlocks);
bronzeOre = new BlockBronzeOre(504, Material.rock).setUnlocalizedName("bronzeOre").setHardness(3F).setCreativeTab(this.AoEBlocks);
bronzeBlock = new BlockBronzeBlock(505, Material.iron).setUnlocalizedName("bronzeBlock").setHardness(3F).setCreativeTab(this.AoEBlocks);
//Rendered Block settings (526-527)
L1IAltar = new TileEntityL1IAltar(526).setUnlocalizedName("unitStand").setHardness(3.5F).setCreativeTab(this.AoEBlocks);
L2IAltar = new TileEntityL2IAltar(527).setUnlocalizedName("evolvedUnitStand").setHardness(3.5F).setCreativeTab(this.AoEBlocks);
//Aesthetic Block settings (506-523)
snowBricks = new BlockSnowBricks(506, Material.snow).setUnlocalizedName("snowBricks").setHardness(0.5F).setCreativeTab(this.AoEBlocks);
dirtBricks = new BlockAdobeBricks(507, Material.rock).setUnlocalizedName("dirtBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
blackBricks = new BlockBlackBricks(508, Material.rock).setUnlocalizedName("blackBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
whiteBricks = new BlockWhiteBricks(509, Material.rock).setUnlocalizedName("whiteBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
greenBricks = new BlockGreenBricks(510, Material.rock).setUnlocalizedName("greenBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
limeBricks = new BlockLimeBricks(511, Material.rock).setUnlocalizedName("limeBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
purpleBricks = new BlockPurpleBricks(512, Material.rock).setUnlocalizedName("purpleBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
magentaBricks = new BlockMagentaBricks(513, Material.rock).setUnlocalizedName("magentaBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
pinkBricks = new BlockPinkBricks(514, Material.rock).setUnlocalizedName("pinkBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
redBricks = new BlockRedBricks(515, Material.rock).setUnlocalizedName("redBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
blueBricks = new BlockBlueBricks(516, Material.rock).setUnlocalizedName("blueBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
lightBlueBricks = new BlockLightBlueBricks(517, Material.rock).setUnlocalizedName("lightBlueBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
grayBricks = new BlockGrayBricks(518, Material.rock).setUnlocalizedName("grayBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
lightGrayBricks = new BlockLightGrayBricks(519, Material.rock).setUnlocalizedName("lightGrayBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
yellowBricks = new BlockYellowBricks(520, Material.rock).setUnlocalizedName("yellowBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
orangeBricks = new BlockOrangeBricks(521, Material.rock).setUnlocalizedName("orangeBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
cyanBricks = new BlockCyanBricks(522, Material.rock).setUnlocalizedName("cyanBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
brownBricks = new BlockBrownBricks(523, Material.rock).setUnlocalizedName("brownBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
//Aesthetic item settings (524-525)
dirtBrick = new ItemDirtBrick(524).setUnlocalizedName("dirtBrick").setCreativeTab(this.AoEItems);
bronzeIngot = new ItemBronzeIngot(525).setUnlocalizedName("bronzeIngot").setCreativeTab(this.AoEItems);
steelIngot = new ItemSteelIngot(526).setUnlocalizedName("steelIngot").setCreativeTab(this.AoEItems);
redSteelIngot = new ItemRedSteelIngot(527).setUnlocalizedName("redSteelIngot").setCreativeTab(this.AoEItems);
//Mobs
//Craftings and smeltings CRAFTING LINES == HORIZONTAL
//Craftings
GameRegistry.addRecipe(new ItemStack(pinePlanks, 4), new Object[] {
"A", 'A', this.pineLog});
GameRegistry.addRecipe(new ItemStack(ashPlanks, 4), new Object[] {
"A", 'A', this.ashLog});
GameRegistry.addRecipe(new ItemStack(snowBricks, 4), new Object[] {
"AAA", "AAA", "AAA",'A', Item.snowball});
GameRegistry.addRecipe(new ItemStack(dirtBricks, 4), new Object[] {
"AAA", "AAA", "AAA",'A', this.dirtBrick});
GameRegistry.addRecipe(new ItemStack(bronzeBlock, 1), new Object[] {
"AAA", "AAA", "AAA",'A', this.bronzeIngot});
//Smeltings
GameRegistry.addSmelting(Block.dirt.blockID, new ItemStack(this.dirtBrick, 4), 0.1F);
This one is only for a biped model (player model and like a zombie), ill do a custom modeled mob soon!
This custom mob wont do anything special besides attack the player...
For this tut im using this picture for the mob: https://www.dropbox....5nz5xm6/MOB.png
First lets start with the entity!
Make a class called EntityYOURMOB
Then add your constructor:
public EntityYOURMOB(World par1World) { super(par1World); }Now add the size (the hitbox) and the AI's (to make them do something) into your constructor
public EntityYOURMOB(World par1World) { super(par1World); this.setSize(1.5F, 2.0F); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, false)); this.tasks.addTask(5, new EntityAIWander(this, 0.8D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(6, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, false)); }This will give it sounds and activate your AI code... If you followed my tut for the custom sounds, then this is where you can use it
@Override protected String getLivingSound() { return Sound.YOURSOUND; } @Override protected String getHurtSound() { return Sound.YOURSOUND; } @Override protected String getDeathSound() { return Sound.YOURSOUND; } @Override protected boolean isAIEnabled() { return true; }And if you didnt want to use custom sounds and just want to use vanilla sounds, this is for a zombie for eg:
@Override protected String getLivingSound() { return "mob.zombie.say"; } @Override protected String getHurtSound() { return "mob.zombie.hurt"; } @Override protected String getDeathSound() { return "mob.zombie.death"; }Now for the health/strength ect, You change those to be what you want,
@Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(THE HEALTH.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.53000000417232513D); //Recomended speed this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(ATTACKDAMAGE.0D); this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(AMOUNT OF BLOCKS THAT IT FOLLOWS YOU.0D); }Time to add the drop that it drops apon death! The example is a diamond...
@Override protected int getDropItemId() { return Item.diamond.blockID; }This will check if it is spawning where it is dark enough!
@Override protected boolean isValidLightLevel() { return true; }Now time for the render!
The render is pretty strait forward..
Because we are doing a biped mob (that looks like steve aka the player) we will extends "RenderBiped"
public class RenderYOURMOB extends RenderBiped{Now add the constructor!:
public RenderYOURMOB(ModelBiped var1, float shadow) { super(var1, shadow); }As you can see, it will ask for a ModelBiped when you register it later on...
And now, the basic render callback:
public void renderYOURMOB(EntityYOURMOB var1, double var2, double var4, double var6, float var8, float var9) { super.doRenderLiving(var1, var2, var4, var6, var8, var9); } public void doRenderLiving(EntityLiving var1, double var2, double var4, double var6, float var8, float var9) { this.renderYOURMOB((EntityYOURMOB)var1, var2, var4, var6, var8, var9); } public void doYOURMOB(Entity var1, double var2, double var4, double var6, float var8, float var9) { this.renderYOURMOB((EntityYOURMOB)var1, var2, var4, var6, var8, var9); }Now to add the texture:
@Override protected ResourceLocation getEntityTexture(Entity entity) { return texture; }Add this above your constructor:
public static ResourceLocation texture = new ResourceLocation("MODID" + ":" + "textures/mobs/MOB.png");That will get the texture from: "assets/modid/textures/mobs/MOB.png"
Now time to register your entity!
Add this into your PreInit method into your main class (basemod class)
EntityRegistry.registerModEntity(EntityYOURMOB.class, "YOURMOBSNAME", 5, this, 10, 10, true); RenderingRegistry.registerEntityRenderingHandler(EntityYOURMOB.class, new RenderYOURMOB(new ModelBiped(), 0.4F)); LanguageRegistry.instance().addStringLocalization("entity." + "YOURMOBSNAME" + ".name", "Your Mobs Actual Name");The LanguageRegistry will add the mobs name, The EntityRegistry will register you entity, and lastly we have the RenderingRegistry...
That binds your Entity with your Render, that will make sure you get the mob you want..
Make the mob spawn!
To make a mob spawn, In you 'preInit' Method, Type: "EntityRegistry.addSpawn"
You will get something like this:
The "entityClass" Means You will need to add the EntityClass.class meaning, for this tutorial its going to be "EntityYOURMOB.class"
The "weightedProb" means how many groups will spawn in each chunk.. (Chunk meaning 16 * 16 blocks)
so lets just say 3 groups will spawn in the chunk.
the "min/max" means how many minimum and how many maximum in a group, so if i say "1, 3" It would randomize between 1 - 3 in a group (the maximum in the group could be three or it could just be one or two of your mob spawning in the group)
The "typeOfCreature" will determine if it will spawn during the night/day so because we are making a monster mob i would put "EnumCreatureType.monster" if you want it to be spawning during the day, just put "EnumCreatureType.creature"
And lastly, the "biomes", So if you want it to spawn in any biome, just go "BiomeGenBase." And pick a biome, if you want it to spawn in more than one biome, just put for example:
"BiomeGenBase.plains, BiomeGenBase.desert"
You can add more biomes by just putting in a commar after you did the last biome..
So in the final code it should look something like this:
So hopefully you should have you mob spawn in the night in the "plains" and the "desert" biome!
Im pretty sure thats it, if anyone has any questions or and suggestions for the next tutorial, ill be glad to help in any way that i can
How would you do it with a passive mob?
Like i know that its :
public class EntityBob extends EntityAnimal{}Remove the AI to attack the EntityPlayer
FEED MY STARVING DRAGON BABY







Thank you!
@Override
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(60.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.53000000417232513D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(5.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(5.0D);
I get an error for void saying: Syntax error on token "void", @ unexpected
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou probaly put @ somewhere?
(im not that experienced but it looks like it)
in the part that said
@Override
protected void applyEntityAttributes()
EDIT: wait i second... i know you....
you trolled me (not really well) on a server and then posted it on you channel (GreenishBatman)
My top mods (Programmer):
package life.human.me.organ.brain; import life.human.me; public class Brain extends Me { public void life(){ this.wasteOnInternet(); if(feelingCreative){ this.programSomething(); } else { this.beUnproductive(); } } }You just made the most important part in Kingdomcraft.Ehm, The_Slayer, what if i want for a mob to attack creatures like wolves do? Which task should i add in the AI thing?
//Block HARDNESS
/*
BlockCSS.png Obsidian 50
BlockCSS.png Ender Chest 22.5
BlockCSS.png Anvil 5
BlockCSS.png Block of Coal 5
BlockCSS.png Block of Diamond 5
BlockCSS.png Block of Emerald 5
BlockCSS.png Block of Iron 5
BlockCSS.png Block of Redstone 5
BlockCSS.png Enchantment Table 5
BlockCSS.png Iron Bars 5
ItemCSS.png Iron Door 5
BlockCSS.png Monster Spawner 5
BlockCSS.png Cobweb 4
BlockCSS.png Dispenser 3.5
BlockCSS.png Dropper 3.5 —
BlockCSS.png Furnace 3.5
BlockCSS.png Beacon 3
BlockCSS.png Block of Gold 3 I
BlockCSS.png Coal Ore 3
BlockCSS.png Diamond Ore 3
BlockCSS.png Emerald Ore 3
BlockCSS.png End Stone 3
BlockCSS.png Gold Ore 3
BlockCSS.png Hopper 3
BlockCSS.png Iron Ore 3
BlockCSS.png Lapis Lazuli Block 3
BlockCSS.png Lapis Lazuli Ore 3
BlockCSS.png Nether Quartz Ore 3
BlockCSS.png Redstone Ore 3
BlockCSS.png Trapdoor 3
ItemCSS.png Wooden Door 3
BlockCSS.png Chest 2.5
BlockCSS.png Crafting Table 2.5
BlockCSS.png Brick Stairs 2
BlockCSS.png Bricks 2
BlockCSS.png Cauldron 2
BlockCSS.png Cobblestone 2
BlockCSS.png Cobblestone Stairs 2
BlockCSS.png Cobblestone Wall 2
BlockCSS.png Fence 2
BlockCSS.png Fence Gate 2
BlockCSS.png Jukebox 2
BlockCSS.png Moss Stone 2
BlockCSS.png Nether Brick 2
BlockCSS.png Nether Brick Fence 2
BlockCSS.png Nether Brick Stairs 2
BlockCSS.png Stone Slabs 2
BlockCSS.png Wood 2
BlockCSS.png Wood Planks 2
BlockCSS.png Wooden Slabs 2
BlockCSS.png Wooden Stairs 2
BlockCSS.png Bookshelf 1.5
BlockCSS.png Stone 1.5
BlockCSS.png Stone Brick 1.5
BlockCSS.png Stone Brick Stairs 1.5
BlockCSS.png Hardened Clay 1.25
BlockCSS.png Stained Clay 1.25
*
*/
package net.aoc.mod;
import net.aoc.mod.blocks.*;
import net.aoc.mod.items.*;
import net.aoc.mod.mob.EntityShortSwordsman;
import net.aoc.mod.mob.RenderShortSwordsman;
import net.aoc.mod.tileentity.TileEntityL2IAltar;
import net.aoc.mod.tileentity.TileEntityL2IAltarEntity;
import net.aoc.mod.tileentity.TileEntityL1IAltar;
import net.aoc.mod.tileentity.TileEntityL1IAltarEntity;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.biome.BiomeGenBase;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@Mod(modid = AgeOfCrafters.modid, name = "Age Of Crafters, the Rise of Steve", version = "1.0.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class AgeOfCrafters {
@Instance(value = "AgeOfCrafters")
public static AgeOfCrafters instance;
@SidedProxy(clientSide="net.aoc.mod.client.ClientProxy", serverSide="net.aoc.mod.CommonProxy")
public static CommonProxy proxy;
public static final String modid = "aoc";
//Definers ==> Naturally generated
public static Block pineLog;
public static Block ashLog;
public static Block pinePlanks;
public static Block ashPlanks;
public static Block pineSapling;
public static Block pineLeaves;
public static Block bronzeOre;
public static Block steelOre;
public static Block redSteelOre;
//Definers ==> Altars
public static Block L1IAltar;
public static Block L2IAltar;
//Definers ==> Items
public static Item bronzeIngot;
public static Item dirtBrick;
public static Item steelIngot;
public static Item redSteelIngot;
//Definers ==> Aesthetic blocks
public static Block snowBricks;
public static Block blackBricks;
public static Block brownBricks;
public static Block purpleBricks;
public static Block lightGrayBricks;
public static Block grayBricks;
public static Block pinkBricks;
public static Block limeBricks;
public static Block yellowBricks;
public static Block lightBlueBricks;
public static Block bronzeBlock;
public static Block magentaBricks;
public static Block orangeBricks;
public static Block redBricks;
public static Block whiteBricks;
public static Block blueBricks;
public static Block greenBricks;
//public static Block fancyStoneBrick;
public static Block dirtBricks;
public static Block cyanBricks;
public static CreativeTabs AoEBlocks;
public static CreativeTabs AoEItems;
public static final int guiIdL1IAltar = 0;
//Event Handlers
@EventHandler
public void preInit(FMLPreInitializationEvent event){
EntityRegistry.registerModEntity(EntityShortSwordsman.class, "ShortSwordsman", 5, this, 10, 10, true);
RenderingRegistry.registerEntityRenderingHandler(EntityShortSwordsman.class, new RenderShortSwordsman(new ModelBiped(), 0.4F));
}
@EventHandler
public void Init(FMLInitializationEvent event){
proxy.registerRenderers();
}
@EventHandler
public void PostInit(FMLPostInitializationEvent event){
}
{
AoEBlocks = new CreativeTabs("aoeblocks"){
@SideOnly(Side.CLIENT)
public int getTabIconItemIndex() {
return AgeOfCrafters.pineLog.blockID;
}
};
AoEItems = new CreativeTabs("aoeitems"){
@SideOnly(Side.CLIENT)
public int getTabIconItemIndex() {
return AgeOfCrafters.bronzeIngot.itemID;
}
};
//Settings (500-505)
ashLog = new BlockAshLog(500, Material.wood).setUnlocalizedName("ashLog").setHardness(2F).setCreativeTab(this.AoEBlocks);
ashPlanks = new BlockAshPlanks(501, Material.wood).setUnlocalizedName("ashPlanks").setHardness(2F).setCreativeTab(this.AoEBlocks);
pineLog = new BlockPineLog(502, Material.wood).setUnlocalizedName("pineLog").setHardness(2F).setCreativeTab(this.AoEBlocks);
pinePlanks = new BlockPinePlanks(503, Material.wood).setUnlocalizedName("pinePlanks").setHardness(2F).setCreativeTab(this.AoEBlocks);
bronzeOre = new BlockBronzeOre(504, Material.rock).setUnlocalizedName("bronzeOre").setHardness(3F).setCreativeTab(this.AoEBlocks);
bronzeBlock = new BlockBronzeBlock(505, Material.iron).setUnlocalizedName("bronzeBlock").setHardness(3F).setCreativeTab(this.AoEBlocks);
//Rendered Block settings (526-527)
L1IAltar = new TileEntityL1IAltar(526).setUnlocalizedName("unitStand").setHardness(3.5F).setCreativeTab(this.AoEBlocks);
L2IAltar = new TileEntityL2IAltar(527).setUnlocalizedName("evolvedUnitStand").setHardness(3.5F).setCreativeTab(this.AoEBlocks);
//Aesthetic Block settings (506-523)
snowBricks = new BlockSnowBricks(506, Material.snow).setUnlocalizedName("snowBricks").setHardness(0.5F).setCreativeTab(this.AoEBlocks);
dirtBricks = new BlockAdobeBricks(507, Material.rock).setUnlocalizedName("dirtBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
blackBricks = new BlockBlackBricks(508, Material.rock).setUnlocalizedName("blackBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
whiteBricks = new BlockWhiteBricks(509, Material.rock).setUnlocalizedName("whiteBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
greenBricks = new BlockGreenBricks(510, Material.rock).setUnlocalizedName("greenBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
limeBricks = new BlockLimeBricks(511, Material.rock).setUnlocalizedName("limeBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
purpleBricks = new BlockPurpleBricks(512, Material.rock).setUnlocalizedName("purpleBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
magentaBricks = new BlockMagentaBricks(513, Material.rock).setUnlocalizedName("magentaBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
pinkBricks = new BlockPinkBricks(514, Material.rock).setUnlocalizedName("pinkBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
redBricks = new BlockRedBricks(515, Material.rock).setUnlocalizedName("redBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
blueBricks = new BlockBlueBricks(516, Material.rock).setUnlocalizedName("blueBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
lightBlueBricks = new BlockLightBlueBricks(517, Material.rock).setUnlocalizedName("lightBlueBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
grayBricks = new BlockGrayBricks(518, Material.rock).setUnlocalizedName("grayBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
lightGrayBricks = new BlockLightGrayBricks(519, Material.rock).setUnlocalizedName("lightGrayBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
yellowBricks = new BlockYellowBricks(520, Material.rock).setUnlocalizedName("yellowBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
orangeBricks = new BlockOrangeBricks(521, Material.rock).setUnlocalizedName("orangeBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
cyanBricks = new BlockCyanBricks(522, Material.rock).setUnlocalizedName("cyanBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
brownBricks = new BlockBrownBricks(523, Material.rock).setUnlocalizedName("brownBricks").setHardness(2F).setCreativeTab(this.AoEBlocks);
//Aesthetic item settings (524-525)
dirtBrick = new ItemDirtBrick(524).setUnlocalizedName("dirtBrick").setCreativeTab(this.AoEItems);
bronzeIngot = new ItemBronzeIngot(525).setUnlocalizedName("bronzeIngot").setCreativeTab(this.AoEItems);
steelIngot = new ItemSteelIngot(526).setUnlocalizedName("steelIngot").setCreativeTab(this.AoEItems);
redSteelIngot = new ItemRedSteelIngot(527).setUnlocalizedName("redSteelIngot").setCreativeTab(this.AoEItems);
//Mobs
//Craftings and smeltings CRAFTING LINES == HORIZONTAL
//Craftings
GameRegistry.addRecipe(new ItemStack(pinePlanks, 4), new Object[] {
"A", 'A', this.pineLog});
GameRegistry.addRecipe(new ItemStack(ashPlanks, 4), new Object[] {
"A", 'A', this.ashLog});
GameRegistry.addRecipe(new ItemStack(snowBricks, 4), new Object[] {
"AAA", "AAA", "AAA",'A', Item.snowball});
GameRegistry.addRecipe(new ItemStack(dirtBricks, 4), new Object[] {
"AAA", "AAA", "AAA",'A', this.dirtBrick});
GameRegistry.addRecipe(new ItemStack(bronzeBlock, 1), new Object[] {
"AAA", "AAA", "AAA",'A', this.bronzeIngot});
//Smeltings
GameRegistry.addSmelting(Block.dirt.blockID, new ItemStack(this.dirtBrick, 4), 0.1F);
//Game Registries
//Blocks and Items
GameRegistry.registerBlock(pineLog, modid + pineLog.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(ashLog, modid + ashLog.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(pinePlanks, modid + pinePlanks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(ashPlanks, modid + ashPlanks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(bronzeOre, modid + bronzeOre.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(blueBricks, modid + blueBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(redBricks, modid + redBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(yellowBricks, modid + yellowBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(greenBricks, modid + greenBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(orangeBricks, modid + orangeBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(cyanBricks, modid + cyanBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(blackBricks, modid + blackBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(brownBricks, modid + brownBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(purpleBricks, modid + purpleBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(lightGrayBricks, modid + lightGrayBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(grayBricks, modid + grayBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(pinkBricks, modid + pinkBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(limeBricks, modid + limeBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(lightBlueBricks, modid + lightBlueBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(magentaBricks, modid + magentaBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(whiteBricks, modid + whiteBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(snowBricks, modid + snowBricks.getUnlocalizedName().substring(5));
GameRegistry.registerItem(dirtBrick, modid + dirtBrick.getUnlocalizedName().substring(5));
GameRegistry.registerItem(bronzeIngot, modid + bronzeIngot.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(dirtBricks, modid + dirtBricks.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(bronzeBlock, modid + bronzeBlock.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(L1IAltar, modid + L1IAltar.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(L2IAltar, modid + L2IAltar.getUnlocalizedName().substring(5));
GameRegistry.registerItem(steelIngot, modid + steelIngot.getUnlocalizedName().substring(5));
GameRegistry.registerItem(redSteelIngot, modid + redSteelIngot.getUnlocalizedName().substring(5));
GameRegistry.registerTileEntity(TileEntityL1IAltarEntity.class, "tileEntityL1IAltar");
GameRegistry.registerTileEntity(TileEntityL2IAltarEntity.class, "tileEntityEvolvedUnitStand");
//GameRegistry.registerBlock(pineLeaves, modid + pineLeaves.getUnlocalizedName().substring(5));
//GameRegistry.registerBlock(pineSapling, modid + pineSapling.getUnlocalizedName().substring(5));
LanguageRegistry.addName(ashLog, "Ash Log");
LanguageRegistry.addName(pineLog, "Pine Log");
LanguageRegistry.addName(pinePlanks, "Pine Wood Planks");
LanguageRegistry.addName(ashPlanks, "Ash Wood Planks");
LanguageRegistry.addName(dirtBrick, "Dirt Brick");
LanguageRegistry.addName(bronzeOre, "Bronze Ore");
LanguageRegistry.addName(blackBricks, "Black Bricks");
LanguageRegistry.addName(redBricks, "Red Bricks");
LanguageRegistry.addName(greenBricks, "Green Bricks");
LanguageRegistry.addName(brownBricks, "Brown Bricks");
LanguageRegistry.addName(blueBricks, "Blue Bricks");
LanguageRegistry.addName(purpleBricks, "Purple Bricks");
LanguageRegistry.addName(cyanBricks, "Cyan Bricks");
LanguageRegistry.addName(lightGrayBricks, "Light Gray Bricks");
LanguageRegistry.addName(grayBricks, "Gray Bricks");
LanguageRegistry.addName(pinkBricks, "Pink Bricks");
LanguageRegistry.addName(limeBricks, "Lime Bricks");
LanguageRegistry.addName(yellowBricks, "Yellow Bricks");
LanguageRegistry.addName(lightBlueBricks, "Light Blue Bricks");
LanguageRegistry.addName(magentaBricks, "Magenta Bricks");
LanguageRegistry.addName(orangeBricks, "Orange Bricks");
LanguageRegistry.addName(whiteBricks, "White Bricks");
LanguageRegistry.addName(snowBricks, "Snow Bricks");
LanguageRegistry.addName(dirtBricks, "Adobe Bricks");
LanguageRegistry.addName(bronzeBlock, "Bronze Block");
LanguageRegistry.addName(bronzeIngot, "Bronze Ingot");
LanguageRegistry.addName(steelIngot, "Steel Ingot");
LanguageRegistry.addName(redSteelIngot, "Red Steel Ingot");
LanguageRegistry.addName(L1IAltar, "Unit Altar");
LanguageRegistry.addName(L2IAltar, "Unit Altar");
LanguageRegistry.instance().addStringLocalization("entity." + "ShortSwordsman" + ".name", "Short Swordsman");
//LanguageRegistry.addName(pineLeaves,"Pine Leaves");
//LanguageRegistry.addName(pineSapling,"Pine Sapling");
}
}
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSupport my mod by using this banner in your signature!
How? I am having the same problem