Storage Drawers: Forestry Pack

Storage Drawers: Forestry Pack

6M Downloads

Compacting Drawers - No Thermal Foundation Blocks for Copper/Tin/Lead?

Ziggy114 opened this issue ยท 9 comments

commented

I see there have been a few issues posted about this in the past and I have a feeling this may have to do with my particular mod combination, but hopefully you can help. On account of my ore processing setup all ores end up as Thermal Foundation ingots, however when creating my array of 9 compacting drawers for each of the 'core' metals, they have issues with copper, tin and lead - ingots and nuggets appear, but no blocks.

With one ingot in the drawer, pulling out a nugget yields the TF variety. If I empty the drawer by pulling everything out as nuggets and put them back in, it swaps to the Railcraft varieties of ingot/block and TF nuggets, but will not accept TF ingots or blocks, only the nuggets. This is the same for all three metal types I'm having trouble with. Here's a screenshot of what I get when I insert just TF ingots (or TiCo aluminum ingots, since... no aluminum in TF):

2015-07-24_19 04 36

And here's a pastebin of /mt oredict: http://pastebin.com/mjyaRzn0

I'd like to stick to the Thermal Foundation versions of the metals if I can - if this isn't an issue with your mod and more with how some mods are registering their ores in the dictionary (as seems to often be the case), could this be solved via MineTweaker?

commented

Aye, I have another log from someone reporting similar issues that I still need to examine. Good to have a few examples though. I think the missing block problem will actually be related to recipes, so it would be useful to also dump your recipe registry.

If the drawers are rejecting ore-dict versions of ingots or blocks, then there will be some combination of entries in your ore dictionary that is causing the mod to believe that they are "category" entries and not valid for conversion. I'll know more when I dig into your log, and whether there are actually entries that would make the conversion exploitable. The mod can't easily distinguish.

You should be able to get around both problems with MineTweaker -- I've exposed APIs, which I really really need to officially document. You can whitelist the ore dictionary keys for the stubborn ingots and blocks:

mods.storagedrawers.OreDictionaryWhitelist.add("ingotCopper");
mods.storagedrawers.OreDictionaryWhitelist.add("blockCopper");

You can add the missing compacting tiers:

mods.storagedrawers.Compaction.add(mod:blockCopper, mod:ingotCopper, 9);

There's no workaround for forcing a particular metal to be picked. If you populate the drawer with a nugget, it will try to choose ingots and blocks from the same mod as it looks for more compressed forms. However, I have seen in some mod setups where those recipes don't actually exist. Either the mod in question (TF) is not registering its recipes because ore-dict-compatible recipes already exist, or another mod is unifying your recipes for you and removing them.

Though now that I think about it, if you register those explicit ingot <-> block recipes yourself in MineTweaker, you can probably work around that issue too.

commented

I should have thought of using gist before... pastebin's size limit was proving a bit of a pain, the recipes dump is massive. Anyway, this is a slightly chopped down version of my /mt recipes output - I removed a lot of the stuff that deals solely with wood (bibliocraft and such) and some other large recipe chunks that obviously have nothing to do with ores/nuggets/ingots/blocks. Hopefully I haven't axed anything critical:

https://gist.github.com/Ziggy114/2c7271b10915f6ff68ff

I can confirm that each of the TF metal blocks have ore-dictionary'd recipes in NEI, but any attempt to craft them yields the Railcraft block. Looking through the recipes dump, would that be happening because the Railcraft block recipes are registered earlier?

The mod list is somewhat my own blend, based around the direwolf20 pack with a few additions and deletions - no IC2 for instance - but the mod configs for are mostly drawn from there including the TF worldgen.

I'm a complete beginner with MineTweaker scripting, but would removing all of the applicable block recipes and re-adding them so that the TF blocks are the only valid output be possible / helpful? I was thinking something like the following, please excuse the syntax if it's off a bit.

recipes.remove(<ore:blockCopper>);
var copper = <ore:ingotCopper>;
recipes.addShapeless(<ThermalFoundation:Storage>,
[[copper,copper,copper],
[copper,copper,copper],
[copper,copper,copper]]);
commented

I'm sure a few people will find those useful.

Looking over your ore dictionary log, I notice that RotaryCraft register 2 - 3 different items for a single ingot entry. Having not used RotaryCraft, do you know what those items are? Does RotaryCraft consider those items freely exchangeable, or could that be considered an exploit?

commented

I've managed to cobble together a couple MineTweaker scripts, one to 'unify' all the ore components that compacting drawers pick to the same mod, and the other to make it so that manually crafting blocks/ingots/nuggets yields metals from the same mod - going in one direction or the other was leading to mod swaps in some cases. This should make the common metals from mods other than Thermal Foundation basically inaccessible by crafting, and any machines that produce a different variety will have their output unified.

I've tested this in-game, and at least with my combination of mods everything works the way it should. In case someone else might find them useful, here are the scripts.

Storage Drawers:

### Copper Compaction
mods.storagedrawers.OreDictionaryWhitelist.add("blockCopper");
mods.storagedrawers.OreDictionaryWhitelist.add("ingotCopper");
mods.storagedrawers.OreDictionaryWhitelist.add("nuggetCopper");
mods.storagedrawers.Compaction.add(<ThermalFoundation:Storage>,<ThermalFoundation:material:64>,9);
mods.storagedrawers.Compaction.add(<ThermalFoundation:material:64>,<ThermalFoundation:material:96>,9);

### Tin Compaction
mods.storagedrawers.OreDictionaryWhitelist.add("blockTin");
mods.storagedrawers.OreDictionaryWhitelist.add("ingotTin");
mods.storagedrawers.OreDictionaryWhitelist.add("nuggetTin");
mods.storagedrawers.Compaction.add(<ThermalFoundation:Storage:1>,<ThermalFoundation:material:65>,9);
mods.storagedrawers.Compaction.add(<ThermalFoundation:material:65>,<ThermalFoundation:material:97>,9);

### Lead Compaction
mods.storagedrawers.OreDictionaryWhitelist.add("blockLead");
mods.storagedrawers.OreDictionaryWhitelist.add("ingotLead");
mods.storagedrawers.OreDictionaryWhitelist.add("nuggetLead");
mods.storagedrawers.Compaction.add(<ThermalFoundation:Storage:3>,<ThermalFoundation:material:67>,9);
mods.storagedrawers.Compaction.add(<ThermalFoundation:material:67>,<ThermalFoundation:material:99>,9);

### Iron Nuggets
mods.storagedrawers.Compaction.add(<minecraft:iron_ingot>,<ThermalFoundation:material:8>,9);

Manual Crafting:

var nCopper = <ore:nuggetCopper>;
var nTin = <ore:nuggetTin>;
var nLead = <ore:nuggetLead>;
var nSilver = <ore:nuggetSilver>;
var nIron = <ore:nuggetIron>;

var iCopper = <ore:ingotCopper>;
var iTin = <ore:ingotTin>;
var iLead = <ore:ingotLead>;
var iSilver = <ore:ingotSilver>;
var iIron = <ore:ingotIron>;

var bCopper = <ore:blockCopper>;
var bTin = <ore:blockTin>;
var bLead = <ore:blockLead>;

### Copper
//Nugget -> Ingot
recipes.removeShaped(iCopper,
    [[nCopper,nCopper,nCopper],[nCopper,nCopper,nCopper],[nCopper,nCopper,nCopper]]);
recipes.addShaped(<ThermalFoundation:material:64>,
    [[nCopper,nCopper,nCopper],[nCopper,nCopper,nCopper],[nCopper,nCopper,nCopper]]);
//Ingot -> Nugget
recipes.removeShapeless(nCopper * 9,[iCopper]);
recipes.addShapeless(<ThermalFoundation:material:96> * 9,[iCopper]);
//Ingot -> Block
recipes.removeShaped(bCopper,
    [[iCopper,iCopper,iCopper],[iCopper,iCopper,iCopper],[iCopper,iCopper,iCopper]]);
recipes.addShaped(<ThermalFoundation:Storage>,
    [[iCopper,iCopper,iCopper],[iCopper,iCopper,iCopper],[iCopper,iCopper,iCopper]]);
//Block -> Ingot
recipes.removeShapeless(iCopper * 9,[bCopper]);
recipes.addShapeless(<ThermalFoundation:material:64> * 9,[bCopper]);

### Tin
//Nugget -> Ingot
recipes.removeShaped(iTin,
    [[nTin,nTin,nTin],[nTin,nTin,nTin],[nTin,nTin,nTin]]);
recipes.addShaped(<ThermalFoundation:material:65>,
    [[nTin,nTin,nTin],[nTin,nTin,nTin],[nTin,nTin,nTin]]);
//Ingot -> Nugget
recipes.removeShapeless(nTin * 9,[iTin]);
recipes.addShapeless(<ThermalFoundation:material:97> * 9,[iTin]);
//Ingot -> Block
recipes.removeShaped(bTin,
    [[iTin,iTin,iTin],[iTin,iTin,iTin],[iTin,iTin,iTin]]);
recipes.addShaped(<ThermalFoundation:Storage:1>,
    [[iTin,iTin,iTin],[iTin,iTin,iTin],[iTin,iTin,iTin]]);
//Block -> Ingot
recipes.removeShapeless(iTin * 9,[bTin]);
recipes.addShapeless(<ThermalFoundation:material:65> * 9,[bTin]);

### Lead
//Nugget -> Ingot
recipes.removeShaped(iLead,
    [[nLead,nLead,nLead],[nLead,nLead,nLead],[nLead,nLead,nLead]]);
recipes.addShaped(<ThermalFoundation:material:67>,
    [[nLead,nLead,nLead],[nLead,nLead,nLead],[nLead,nLead,nLead]]);
//Ingot -> Nugget
recipes.removeShapeless(nLead * 9,[iLead]);
recipes.addShapeless(<ThermalFoundation:material:99> * 9,[iLead]);
//Ingot -> Block
recipes.removeShaped(bLead,
    [[iLead,iLead,iLead],[iLead,iLead,iLead],[iLead,iLead,iLead]]);
recipes.addShaped(<ThermalFoundation:Storage:3>,
    [[iLead,iLead,iLead],[iLead,iLead,iLead],[iLead,iLead,iLead]]);
//Block -> Ingot
recipes.removeShapeless(iLead * 9,[bLead]);
recipes.addShapeless(<ThermalFoundation:material:67> * 9,[bLead]);

### Silver
//Ingot -> Nugget
recipes.removeShapeless(nSilver * 9,[iSilver]);
recipes.addShapeless(<ThermalFoundation:material:98> * 9,[iSilver]);

### Iron
//Ingot -> Nugget
recipes.removeShapeless(nIron * 9,[iIron]);
recipes.addShapeless(<ThermalFoundation:material:8> * 9,[iIron]);
commented

Yes this was very useful to me.
Rotarycraft lists multiple Irons, because it has a Iron ingot and a Nether Iron Ingot. Afaik these are the basically the same, and I think you can only get them with the nether ores mods installed. I don't think an exploit is possible.

Since I have more mods installed I had to add some more Metals to the script although I didnt add them to the Manual Crafting one, as I don't care which one I get. In case someone else needs it I added the following:

### Silver
mods.storagedrawers.OreDictionaryWhitelist.add("blockSilver");
mods.storagedrawers.OreDictionaryWhitelist.add("ingotSilver");
mods.storagedrawers.OreDictionaryWhitelist.add("nuggetSilver");
mods.storagedrawers.Compaction.add(<ThermalFoundation:Storage:2>,<ThermalFoundation:material:66>,9);
mods.storagedrawers.Compaction.add(<ThermalFoundation:material:66>,<ThermalFoundation:material:98>,9);

###Nickel
mods.storagedrawers.OreDictionaryWhitelist.add("blockNickel");
mods.storagedrawers.OreDictionaryWhitelist.add("ingotNickel");
mods.storagedrawers.OreDictionaryWhitelist.add("nuggetNickel");
mods.storagedrawers.Compaction.add(<ThermalFoundation:Storage:4>,<ThermalFoundation:material:68>,9);
mods.storagedrawers.Compaction.add(<ThermalFoundation:material:68>,<ThermalFoundation:material:100>,9);

###Aluminum
mods.storagedrawers.OreDictionaryWhitelist.add("blockAluminum");
mods.storagedrawers.OreDictionaryWhitelist.add("ingotAluminum");
mods.storagedrawers.OreDictionaryWhitelist.add("nuggetAluminum");
mods.storagedrawers.Compaction.add(<ImmersiveEngineering:Storage:1>,<ImmersiveEngineering:metal:1>,9);
mods.storagedrawers.Compaction.add(<ImmersiveEngineering:metal:1>,<TConstruct:materials:22>,9);

###Platinum
mods.storagedrawers.OreDictionaryWhitelist.add("blockPlatinum");
mods.storagedrawers.OreDictionaryWhitelist.add("ingotPlatinum");
mods.storagedrawers.OreDictionaryWhitelist.add("nuggetPlatinum");
mods.storagedrawers.Compaction.add(<ThermalFoundation:Storage:5>,<ThermalFoundation:material:69>,9);
mods.storagedrawers.Compaction.add(<ThermalFoundation:material:69>,<ThermalFoundation:material:101>,9);

###Bronze
mods.storagedrawers.OreDictionaryWhitelist.add("blockBronze");
mods.storagedrawers.OreDictionaryWhitelist.add("ingotBronze");
mods.storagedrawers.OreDictionaryWhitelist.add("nuggetBronze");
mods.storagedrawers.Compaction.add(<ThermalFoundation:Storage:9>,<ThermalFoundation:material:73>,9);
mods.storagedrawers.Compaction.add(<ThermalFoundation:material:73>,<ThermalFoundation:material:105>,9);

Now nearly everything works for me so that's exactly what I wanted (some RC ingots don't go in perfectly but I don't really need that as I don't use it much yet)

commented

I think it's safe to call this one 'resolved'... especially since it wasn't a problem with your mod and more a problem with an imperfect ore dictionary. Thanks for your help on this!

commented

I'm looking for a mod pack to try and reproduce this. If you know of one, please let me know.

commented

Similar issue was raised in #127

commented

This is formally fixed in 1.5.13. If a given ore dictionary was blacklisted, then associated recipes based on the ore dictionary key would fail. Since some mods register explicit recipes with their own items, some register with ore keys, and some don't register at all, it led to very unpredictable behavior.

The compacting drawers will no longer use strict matching for purposes of finding tiers, so it won't matter if those entries end up blacklisted. I've also whitelisted several common metals in nugget/ingot/block/ore form.