[1.7.10] [Forge] TooManyDanyOres b1.0-3 - Too Many Ores? Solved!

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

CatDany

New Member
Jul 29, 2019
30
0
0
TooManyDanyOres
Too many ores? Solved!

What can it do?
• Convert all (copper) ores to one type
• Merge different types of (copper) ingots in your inventory
• Merge all (copper) ingots to one type when picked up
• See Ore Dictionary name and ModIDs of items using /iteminfo
• 100%* configurable


Downloads
-----> Downloads and source code are on GitHub <-----

Outdated Spotlight by ollieread

*Almost
Original mod
 
Last edited:

ShneekeyTheLost

Too Much Free Time
Dec 8, 2012
3,728
3,004
333
Lost as always
I approve of this mod!

Mind you, there will still be problems with having multiple types of ingots depending on which mod you use to process them. For example, if you use TiCo Smeltery on Copper Ore, you'll get TiCo copper ingots. If you use TE3 pulverizer and furnace, you'll get Thermal Foundation copper. These two do not stack.

If this mod were to also unify ingots on output, that might be pretty amazing, but I don't know how easy that is. Until then, I'll just use JABBA barrels for this function.
 
  • Like
Reactions: CatDany

CatDany

New Member
Jul 29, 2019
30
0
0
I approve of this mod!

Mind you, there will still be problems with having multiple types of ingots depending on which mod you use to process them. For example, if you use TiCo Smeltery on Copper Ore, you'll get TiCo copper ingots. If you use TE3 pulverizer and furnace, you'll get Thermal Foundation copper. These two do not stack.

If this mod were to also unify ingots on output, that might be pretty amazing, but I don't know how easy that is. Until then, I'll just use JABBA barrels for this function.
Oh, maan. Believe it or not, it was A LOT of fun doing this. I learned a lot new!

In b1.0-2 it's trying to merge items every 5 seconds (you can change it in config). It also will try to merge items when you pick them up from the world.
Config examples are updated.
Enjoy and thank you for inspiring me :)
 

ShneekeyTheLost

Too Much Free Time
Dec 8, 2012
3,728
3,004
333
Lost as always
Oh, maan. Believe it or not, it was A LOT of fun doing this. I learned a lot new!

In b1.0-2 it's trying to merge items every 5 seconds (you can change it in config). It also will try to merge items when you pick them up from the world.
Config examples are updated.
Enjoy and thank you for inspiring me :)
Trying to merge every five seconds is going to be hassle and CPU that is wasted. Let's think logically.

Logically, the only time this is going to be an issue is when an item is placed into or out of an inventory, yes? So, you only need to check at that time. Cuts down on the CPU cycles that way. Any current problems can be fixed simply by pulling items out of the inventory and putting them back in.

Is there a way to determine which ore type is the 'correct' one? For example, I want to always use Thermal Foundation ingots. So could I tell the config file 'hey, any ingots that are not TF ingots, please turn them into the TF equivalent'? Then, if you use, for example, the Mekanism system for ore processing, once the ingots leave the machine and enter the storage... BAM! It instantly converts.
 

CatDany

New Member
Jul 29, 2019
30
0
0
Logically, the only time this is going to be an issue is when an item is placed into or out of an inventory, yes? So, you only need to check at that time. Cuts down on the CPU cycles that way. Any current problems can be fixed simply by pulling items out of the inventory and putting them back in.
I think it's not possible to handle "inventory changed" event. But there's an (unused) method onInventoryChanged(), so I think it'll be possible in the future.
If you really experience lag, you can always change the configuration. Dropping items on the ground and picking them up works too.

Is there a way to determine which ore type is the 'correct' one? For example, I want to always use Thermal Foundation ingots. So could I tell the config file 'hey, any ingots that are not TF ingots, please turn them into the TF equivalent'? Then, if you use, for example, the Mekanism system for ore processing, once the ingots leave the machine and enter the storage... BAM! It instantly converts.
Making a thread watching every single ItemStack instance in memory? Is that even possible? :)
 
Last edited:

madnewmy

New Member
Jul 29, 2019
1,119
0
0
It would be good too have a key that will make it check, instead of having it check automaticly (or both, and configurable :D)
 

ShneekeyTheLost

Too Much Free Time
Dec 8, 2012
3,728
3,004
333
Lost as always
I think it's not possible to handle "inventory changed" event. But there's an (unused) method onInventoryChanged(), so I think it'll be possible in the future.
If you really experience lag, you can always change the configuration. Dropping items on the ground and picking them up works too.
JABBA seems to do it somehow, but I'm just an end-user as far as Java is concerned

Making a thread watching every single ItemStack instance in memory? Is that even possible? :)
Nah, you're overthinking things. Consider it like this:

If an ingot is registered in the Forge Ore Dictionary to a given mod, then that is the ingot that anything that produces that ingot name should result. I suppose it's easiest with something like Minetweaker... basically, instead of a mekanism system creating mekanism.copperIngot you can tell the machine that it creates ThermalFoundation.copperIngot or somesuch.

Ingots never appear in the world without first being created. If only one type of ingot is ever created, then you never have a stacking problem. That way you never have to fool around with inventories or checking events periodically. Just quietly replace all recipes that create *.copperIngot with modOfChoice.copperIngot.
 

Yusunoha

New Member
Jul 29, 2019
6,440
-4
0
I hoped something like this would've been done by forge by now
where forge reads all the ingots/ores from all the mods installed and generates a configuration file where you can choose which ingot/ore from which mod you want to use, and all ingots/ores will be converted to the chosen mod ingots/ores
 
  • Like
Reactions: CatDany

CatDany

New Member
Jul 29, 2019
30
0
0
JABBA seems to do it somehow, but I'm just an end-user as far as Java is concerned


Nah, you're overthinking things. Consider it like this:

If an ingot is registered in the Forge Ore Dictionary to a given mod, then that is the ingot that anything that produces that ingot name should result. I suppose it's easiest with something like Minetweaker... basically, instead of a mekanism system creating mekanism.copperIngot you can tell the machine that it creates ThermalFoundation.copperIngot or somesuch.

Ingots never appear in the world without first being created. If only one type of ingot is ever created, then you never have a stacking problem. That way you never have to fool around with inventories or checking events periodically. Just quietly replace all recipes that create *.copperIngot with modOfChoice.copperIngot.
1)MineTweaker just has compatibility with a lot of mods.
2)Is it lagging on your computer / server?
3)Does Jabba replaces recipes in all machines in the world?[DOUBLEPOST=1407680509][/DOUBLEPOST]
It would be good too have a key that will make it check, instead of having it check automaticly (or both, and configurable :D)
I'm doing this as a serverside mod. Yes it's required on client for now, but technically it doesn't do anything (on client).
Eventually I will remove clientside dependency.
 

ShneekeyTheLost

Too Much Free Time
Dec 8, 2012
3,728
3,004
333
Lost as always
1)MineTweaker just has compatibility with a lot of mods.
2)Is it lagging on your computer / server?
3)Does Jabba replaces recipes in all machines in the world?[DOUBLEPOST=1407680509][/DOUBLEPOST]
I'm doing this as a serverside mod. Yes it's required on client for now, but technically it doesn't do anything (on client).
Eventually I will remove clientside dependency.
1) True. I was just thinking that nipping it in the source is easier than trying to spam conversions.
2) I only play SSP, so I don't know about servers. However, spamming requests can't be good for the computer.
3) JABBA OreDict replaces items pumped into it. For example, if you have TF copper in a barrel, and you pump in Mek copper, it will increment additional bars of TF copper into the barrel. This may be functionality you can bring to any inventory.
 

CatDany

New Member
Jul 29, 2019
30
0
0
1) True. I was just thinking that nipping it in the source is easier than trying to spam conversions.
2) I only play SSP, so I don't know about servers. However, spamming requests can't be good for the computer.
3) JABBA OreDict replaces items pumped into it. For example, if you have TF copper in a barrel, and you pump in Mek copper, it will increment additional bars of TF copper into the barrel. This may be functionality you can bring to any inventory.
Jabba replaces items when they enter a barrel.
I understand how to do that. Look at Handler.itemPickup(...) method. I do exactly the same but when item is picked up by a player. It's better to have it checking every X seconds then every time player updates an inventory because it would cause more lag. Stop talking about optimization. If you experience serious lag only because of this mod, then I will try to come up with something good. For now it's fine
 

CatDany

New Member
Jul 29, 2019
30
0
0
Updated to b1.0-3.
- Added /iteminfo [id] command. Shows you Ore Dictionary names of given item and its Unique Identifier. Scans item from your hand if "id" parameter is empty.
 

Spida22

New Member
Jul 29, 2019
1
0
0
Loving this mod. The only issue that I am having at this moment, is that I can't figure out how to get Aluminum Nuggets to stay Nuggets, they are turning into Oreberries - Because the Only Mod I have that makes Aluminum Nuggets is TConstruct. Is there a way to use the ID # rather than the Oredic Name?
 
Last edited:

Zsashas

New Member
Jul 29, 2019
15
0
1
Loving this mod. The only issue that I am having at this moment, is that I can't figure out how to get Aluminum Nuggets to stay Nuggets, they are turning into Oreberries - Because the Only Mod I have that makes Aluminum Nuggets is TConstruct. Is there a way to use the ID # rather than the Oredic Name?
This is an issue with TiCon itself, and one that Boni refuses to fix. See this thread for information and a possible solution: https://github.com/SlimeKnights/TinkersConstruct/issues/1820

Basically, Oreberries are registered as nuggets, when they were never meant to be interchangeable with nuggets, EVER. A simple Minetweaker (or ModTweaker, I forget which) script can fix this.