Jump to content

Recommended Posts

Posted

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!
}

}

Posted

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", ...)

Posted

You can register your own AtlastTextures and do w/e you want in it.

However, for The texture packer's sake. I advise either generating your images at release time once, or making a standard format to allow the texture pack artists to design them.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted
  Quote
AtlastTextures

What is this?

 

  Quote
However, for The texture packer's sake. I advise either generating your images at release time once, or making a standard format to allow the texture pack artists to design them.

As I mentioned, the core images, like the axe rod and wegde given; just look @ the generation of the spawneggs!

 

  Quote
...allow the texture pack artists to design them.

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

Posted

Its a class in minecraft, look it up.

Go try to understand whats actually happening when you register an icon -.-

Now that you bring up spawn eggs. There is a perfect example of what you want.

It's a multi-passs system that renders the default base on bottom.

Then renders the second layer with a tint.

 

Why arnt you using that system?

'I want to do the same thing eggs do but instead of researching how they do it I wanna change minecrafts render engine'

Seems... overkill...

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

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 :D

 

MFG LordJuli

Posted
  On 7/22/2013 at 5:57 PM, LexManos said:

Go try to understand whats actually happening when you register an icon -.-

It's only an Interface(-method) and additionally, I've already searched a lot, but no result.

Sorry for being a fool ;)

Posted

Something has to IMPLEMENT that interface.. that's how programming works.

Eclipse has tools to tell you what implements it.

Go forth and do research!

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

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 ;)

Posted

That sentence didn't even make sense.

But i'm locking this because it's not needed and it undermines how the new system is designed.

Use the new system how it's designed and you'll be fine.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com   I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com
    • There is an issue with Modular Force Field System (mffs) Remove it or try other builds
    • I never imagined I would be writing this kind of testimony, but I feel it’s important to share my experience with Malice Cyber Recovery and how they helped me recover $230,000 I lost to crypto scammers. A few months ago, I got involved in a crypto investment opportunity that seemed legitimate at first. The scammers were incredibly convincing. They showed me impressive returns, sent regular updates, and even gave me access to what looked like a real trading platform. I was initially cautious, but after seeing the returns, I began to invest more, ultimately transferring over $230,000. Unfortunately, after a few weeks, when I tried to withdraw my funds, I found that the platform had disappeared, and I could no longer contact anyone involved. It was clear I had been scammed, and I felt completely helpless. For weeks, I tried everything to get my money back—contacting the authorities, reaching out to the platform’s so-called support team (who of course were unreachable), and trying to trace the transactions myself. But everything led to dead ends. The more I researched, the more I realized just how hard it was to recover stolen crypto. I began to lose hope. That’s when I came across Malice Cyber Recovery. At first, I was skeptical. Could they really help me recover my funds after everything I had been through? I decided to reach out anyway, just to see if they could offer any guidance. From the very first conversation, their team was not only professional but also deeply empathetic. They understood exactly how I was feeling and immediately made it clear that they were dedicated to helping me recover my lost funds. Malice Cyber Recovery’s team got to work quickly. They walked me through every step of the process, explaining the methods they would use to track down my stolen crypto. Their knowledge of blockchain technology and how to trace crypto transactions was incredibly impressive. They didn’t just give me vague promises they showed me the action they were taking and the progress they were making, which gave me hope that my money wasn’t gone forever. One of the most reassuring aspects of working with Malice Cyber Recovery was their transparency. They kept me updated regularly, letting me know what they were doing, what obstacles they encountered, and how they were overcoming them. It wasn’t an easy process; tracing funds through blockchain and dealing with scammers who hide behind fake identities and complex networks is incredibly difficult. But Malice Cyber Recovery’s team was relentless. They used advanced tools and techniques to trace the flow of my funds, and within just a few weeks, they managed to locate a significant portion of my lost funds. I couldn’t believe it when they informed me that they had successfully recovered a large chunk of my money. I never thought I’d see that $230,000 again. The recovery process wasn’t instantaneous it  took time, patience, and persistence but Malice Cyber Recovery delivered on their promise.  
    • Almost, just the java -server -Xmx4G -Xms4G -Dlog4j.configurationFile=log4jformattingfix.xml -jar forge-1.12.2-14.23.5.2860.jar nogui and if that doesn't work, try java --version
    • What so just copy and paste " java -server -Xmx4G -Xms4G -Dlog4j.configurationFile=log4jformattingfix.xml -jar forge-1.12.2-14.23.5.2860.jar nogui Pause >nul " into a cmd terminal? If that's what you mean, nothing happens
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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