Jump to content

LordJuli

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

LordJuli's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I've got an idea: the people who write their programs know their use best, so isn't it useful if you create the function, which can register a BufferedImage, because you know how MinecraftForge works, you know what is standing for what and you know what object has which sense... Just an idea^^ MFG LordJuli P.S. I accept a yes and a no, but I think it's easier for you than for me
  2. Yay, I found it Looks very complicated (@ first sight)
  3. It's only an Interface(-method) and additionally, I've already searched a lot, but no result. Sorry for being a fool
  4. I don't get it But thanks for your help Maybe I fix it myself Thanks for your help, advice and time spent on my questions MFG LordJuli
  5. What is this? As I mentioned, the core images, like the axe rod and wegde given; just look @ the generation of the spawneggs! You can design as much, as you can design the spawneggs. Think of it like colring the spawnegg and paining a border around it and calling it a new item MFG LordJuli P.S. Thanks for you fast answer
  6. I forgot, because it's so much, it's pointless extracting the function... The class Element is initialized like: Oxygen = new Element(16, "Oxygen", "O2", ...)
  7. Hi there, I'm developing a Mod (in Minecraft Version 1.5.2) which adds very much items and at least more that 1000 Images. It add most of the Elements existing in RL, each one has got it's pickaxe, axe, ore,... Because of that, I'm not very pleased drawing every Image for itself and it's laborious! My source is actually like this: public void updateIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("ModID:ItemName"); } But I expect something like this: public void updateIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIconFromImage(new BufferedImage(CreateImage(name, color))); } The reason, why the method with the Strings (actual way of doing it) isn't that good for me, because I'm not pleased to draw 1000 Images as I said before; my function CreateImage does the work for me. It colores e.g. the wedge of the axe (like spawneggs, the colorcode is given), combines this result with the rod of the axe and returnes the final image. I hope you understand what I mean MFG LordJuli Additional Code: Element.java public class Element { public Element(int ID, String name, String symbol, int num, int smeltK, int boilK, boolean hofbrincl, int electronegativity, int harvestLevel, int maxUses, float efficiencyOnProperMaterial, int damageVsEntity, int enchantability) //some parameters are used later on { EnumToolMaterial etm = EnumToolMaterial.XXX; (new ToolMaterial()).setup(etm, harvestLevel, maxUses, efficiencyOnProperMaterial, damageVsEntity, enchantability); BlockOre Ore; BlockBlock Block; ItemIngot Ingot; ItemEBucket Bucket; ItemGasBottle GasBottle; ToolAxe Axe; ToolShovel Shovel; ToolSword Sword; ToolHoe Hoe; ToolBow Bow; ToolPickaxe Pickaxe; boolean radioactive = false; if (num > 83) { radioactive = true; } Ore = new BlockOre(199 + 2 * (ID - 1) + 1, name); Block = new BlockBlock(199 + 2 * (ID - 1) + 2, name); Ingot = new ItemIngot(999 + 6 * (ID - 1) + 1, name); Pickaxe = new ToolPickaxe(999 + 9 * (ID - 1) + 2, etm, name); Axe = new ToolAxe(999 + 9 * (ID - 1) + 3, etm, name); Sword = new ToolSword(999 + 9 * (ID - 1) + 4, etm, name); Shovel = new ToolShovel(999 + 9 * (ID - 1) + 5, etm, name); Hoe = new ToolHoe(999 + 9 * (ID - 1) + 6, etm, name); Bow = new ToolBow(999 + 9 * (ID - 1) + 7, etm, name); GasBottle = new ItemGasBottle(999 + 9 * (ID - 1) + 8, name); Bucket = new ItemEBucket(999 + 9 * (ID - 1) + 9, etm, name); GameRegistry.registerBlock(Ore, name + "ore (" + num + " " + symbol + ")"); GameRegistry.registerBlock(Block, name + "block (" + num + " " + symbol + ")"); GameRegistry.registerItem(Ingot, name + "ingot (" + num + " " + symbol + ")"); GameRegistry.registerItem(Pickaxe, name + "pickaxe (" + num + " " + symbol + ")"); GameRegistry.registerItem(Axe, name + "axe (" + num + " " + symbol + ")"); GameRegistry.registerItem(Sword, name + "sword (" + num + " " + symbol + ")"); GameRegistry.registerItem(Shovel, name + "shovel (" + num + " " + symbol + ")"); GameRegistry.registerItem(Hoe, name + "hoe (" + num + " " + symbol + ")"); GameRegistry.registerItem(Bow, name + "bow (" + num + " " + symbol + ")"); GameRegistry.addSmelting(Ore.blockID, new ItemStack(Ingot), 0.45F); GameRegistry.addRecipe(new ItemStack(Pickaxe), new Object[] {"HHH"," I "," I ", 'H', Ingot ,'I', Item.stick }); GameRegistry.addRecipe(new ItemStack(Axe), new Object[] {"HH ","HI "," I ", 'H', Ingot ,'I', Item.stick }); GameRegistry.addRecipe(new ItemStack(Sword), new Object[] {" H "," H "," I ", 'H', Ingot ,'I', Item.stick }); GameRegistry.addRecipe(new ItemStack(Shovel), new Object[] {" H "," I "," I ", 'H', Ingot ,'I', Item.stick }); GameRegistry.addRecipe(new ItemStack(Hoe), new Object[] {"HH "," I "," I ", 'H', Ingot ,'I', Item.stick }); GameRegistry.addRecipe(new ItemStack(Bow), new Object[] {"H I","H I","HI ", 'H', Ingot ,'I', Item.stick }); GameRegistry.addRecipe(new ItemStack(Bow), new Object[] {" IH","I H"," IH", 'H', Ingot ,'I', Item.stick }); LanguageRegistry.addName(Ore, name + "ore (" + num + " " + symbol + ")"); LanguageRegistry.addName(Block, name + "block (" + num + " " + symbol + ")"); LanguageRegistry.addName(Ingot, name + "ingot (" + num + " " + symbol + ")"); LanguageRegistry.addName(Pickaxe, name + "pickaxe (" + num + " " + symbol + ")"); LanguageRegistry.addName(Axe, name + "axe (" + num + " " + symbol + ")"); LanguageRegistry.addName(Sword, name + "sword (" + num + " " + symbol + ")"); LanguageRegistry.addName(Shovel, name + "shovel (" + num + " " + symbol + ")"); LanguageRegistry.addName(Hoe, name + "hoe (" + num + " " + symbol + ")"); LanguageRegistry.addName(Bow, name + "bow (" + num + " " + symbol + ")"); } } ToolPickaxe.java public class ToolPickaxe extends ItemPickaxe{ String name; public ToolPickaxe(int par1, EnumToolMaterial par2EnumToolMaterial, String name) { super(par1, par2EnumToolMaterial); this.setUnlocalizedName(name + "pickaxe"); this.name = name; } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister reg) { this.itemIcon = reg.registerIcon("AdvancedMinecraft:tool_" + name.toLowerCase() + "_pickaxe"); //Image as Input expected! } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.