mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-13 17:04:15 +00:00
From 1.10 branch: Fix comp drawers allowing invalid material transformation; fix comp drawers mishandling some items like snowballs; fix controller range config sync; fix possible crash if controller asked to find null item.
This commit is contained in:
1 parent
0184864354
commit
ae565e9ee8
5 files changed
+19
-13
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.7.10-1.10.7"
|
||||
version = "1.7.10-1.10.8"
|
||||
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "StorageDrawers"
|
||||
|
||||
|
||||
@@ -921,6 +921,9 @@ public class TileEntityController extends TileEntity implements IDrawerGroup, IP
|
||||
|
||||
@Override
|
||||
public Iterator<Integer> iterator () {
|
||||
if (this.stack == null)
|
||||
return new ArrayList<Integer>(0).iterator();
|
||||
|
||||
return new Iterator<Integer> ()
|
||||
{
|
||||
List<SlotRecord> primaryRecords = drawerPrimaryLookup.getEntries(stack.getItem(), stack.getItemDamage());
|
||||
|
||||
@@ -323,7 +323,7 @@ public class TileEntityDrawersComp extends TileEntityDrawers
|
||||
ItemStack match = null;
|
||||
|
||||
ItemStack output = recipe.getRecipeOutput();
|
||||
if (!DrawerData.areItemsEqual(stack, output, false))
|
||||
if (!DrawerData.areItemsEqual(stack, output, true))
|
||||
continue;
|
||||
|
||||
IRecipeHandler handler = StorageDrawers.recipeHandlerRegistry.getRecipeHandler(recipe.getClass());
|
||||
@@ -594,7 +594,7 @@ public class TileEntityDrawersComp extends TileEntityDrawers
|
||||
return Integer.MAX_VALUE / convRate[slot];
|
||||
}
|
||||
|
||||
return protoStack[slot].getItem().getItemStackLimit(protoStack[slot]) * getStackCapacity(slot);
|
||||
return protoStack[0].getItem().getItemStackLimit(protoStack[0]) * getStackCapacity(0) * getConversionRate(slot);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -304,6 +304,8 @@ public class ConfigManager
|
||||
cache.addonShowVanilla = config.get(sectionAddons.getQualifiedName(), "showBlocksInCreative", true).setLanguageKey(LANG_PREFIX + "addons.showCreative").setRequiresWorldRestart(true).getBoolean();
|
||||
cache.addonSeparateVanilla = config.get(sectionAddons.getQualifiedName(), "useSeparateCreativeTabs", true).setLanguageKey(LANG_PREFIX + "addons.separateTabs").setRequiresMcRestart(true).getBoolean();
|
||||
|
||||
getControllerRange();
|
||||
|
||||
if (config.hasChanged())
|
||||
config.save();
|
||||
}
|
||||
|
||||
@@ -48,20 +48,21 @@ public class OreDictRegistry
|
||||
addBlacklist("resourceTaint");
|
||||
addBlacklist("slimeball");
|
||||
|
||||
addBlacklist("blockMetal");
|
||||
addBlacklist("ingotMetal");
|
||||
addBlacklist("nuggetMetal");
|
||||
|
||||
addBlacklistPrefix("list");
|
||||
addBlacklistPrefix("dye");
|
||||
|
||||
for (String item : new String[] { "oreIron", "oreGold", "oreAluminum", "oreAluminium", "oreTin", "oreCopper", "oreLead", "oreSilver", "orePlatinum", "oreNickel" })
|
||||
addWhitelist(item);
|
||||
String[] oreTypes = { "ore", "block", "ingot", "nugget" };
|
||||
String[] oreMaterials = { "Iron", "Gold", "Diamond", "Emerald", "Aluminum", "Aluminium", "Tin", "Copper", "Lead",
|
||||
"Silver", "Platinum", "Nickel", "Osmium", "Invar", "Bronze", "Electrum", "Enderium" };
|
||||
|
||||
for (String item : new String[] { "blockIron", "blockGold", "blockAluminum", "blockAluminium", "blockTin", "blockCopper", "blockLead", "blockSilver", "blockPlatinum", "blockNickel" })
|
||||
addWhitelist(item);
|
||||
|
||||
for (String item : new String[] { "ingotIron", "ingotGold", "ingotAluminum", "ingotAluminium", "ingotTin", "ingotCopper", "ingotLead", "ingotSilver", "ingotPlatinum", "ingotNickel" })
|
||||
addWhitelist(item);
|
||||
|
||||
for (String item : new String[] { "nuggetIron", "nuggetGold", "nuggetAluminum", "nuggetAluminium", "nuggetTin", "nuggetCopper", "nuggetLead", "nuggetSilver", "nuggetPlatinum", "nuggetNickel" })
|
||||
addWhitelist(item);
|
||||
for (String ore : oreMaterials) {
|
||||
for (String type : oreTypes)
|
||||
addWhitelist(type + ore);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean addBlacklist (String entry) {
|
||||
|
||||
Reference in new issue
Block a user