(new WorldGenMinable(NAMEBlock.blockID, 4)).generate(world, random, randPosX, randPosY, randPosZ) Int randPosZ = chunkZ + randomGenerator.nextInt(20) Int randPosX = chunkX + randomGenerator.nextInt(20) Public void generateSurface(World world, Random random, int chunkX, int chunkZ) Once you have paste that line of code, be sure to change any (NAME) with your block name, now under your static final section, not your public void load. ModLoader.addName(NAMEBlock, "In Game Name Ore") NAMEBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/items/pic.png") Now paste these lines of code in you Public void load(): Public int quantityDropped(Random random)įollow the video tutorial if you get stuck or confused. Public int idDropped(int par1, Random par2Random, int par3) Public static final Block NAMEBlock = new BlockNAME(151, 0).setHardness(6F).setResistance(7.0F).setBlockName("whatever") Ĭreate a new class ( for your BlockNAME, and copy nnd paste this code in: Pase this line of code in your public static section: The picture of the sword that I used can be downloaded here! (16x16)Ĥ. In the "NAME Sword" call your sword what ever you like. The second line is adding in a name for your sword. The first line of code is telling modloader to override minecraft item's picture with your new sword sprite. ModLoader.addRecipe(new ItemStack(NAMESword, 1), new Object ModLoader.addName(NAMESword, "NAME Sword") NAMESword.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/sword.png") replace NAME with the name of your sword. In my tutorial i might have mentioned to edit a BASE class, don't do it! in this code of line you will need to make a new sword and later define it in your public void load. Public static final Item NAMESword = new ItemSword(3077, EnumToolMaterial.GOLD).setItemName("AnythingHere") My picture that I used in this tutorial can be downloaded here! (16x16)ģ.Making a Sword ( 1.2.5 / 1.3.2 / 1.4.6 ) This will define the Item of how much it can stack and to make it an official item registered onto Minecraft Here is another separate class you will need to make. setItemName("NAME") is required, but dosn't need a fancy name! in the public void load() section, you will tell modloader where your items is located at, what is needed in order to craft it, and what the name is. To understand this code is quite simple, public class final Item is telling Minecraft that you are making a new item, the (2085) is the Item ID, and the. ModLoader.addName(NAMEhere, "Ingame -Name") NAMEhere.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/pic.png") Public static final Item NAMEhere = new ItemNAME(2085).setItemName("NAME") You need a software that can allow you to make transparent pictures, like
0 Comments
Leave a Reply. |