Fix broken restraint in ore dictionary matching; added a few more entries to blacklist.

This commit is contained in:
Justin Aquadro committed 2015-06-22 19:10:45 -04:00
1 parent 7b70090acc
commit 1ef43a7260
3 files changed
+21 -7

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ buildscript {
apply plugin: 'forge'
version = "1.7.10-1.5.7"
version = "1.7.10-1.5.8"
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "StorageDrawers"
@@ -382,12 +382,6 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
if (stack != null)
dropBlockAsItem(world, x, y, z, stack);
}
//if (tile.getStorageLevel() > 1)
// dropBlockAsItem(world, x, y, z, new ItemStack(ModItems.upgrade, 1, tile.getStorageLevel()));
//if (tile.getStatusLevel() > 0)
// dropBlockAsItem(world, x, y, z, new ItemStack(ModItems.upgradeStatus, 1, tile.getStatusLevel()));
//if (tile.isVoid())
// dropBlockAsItem(world, x, y, z, new ItemStack(ModItems.upgradeVoid));
for (int i = 0; i < tile.getDrawerCount(); i++) {
if (!tile.isDrawerEnabled(i))
@@ -1,5 +1,6 @@
package com.jaquadro.minecraft.storagedrawers.config;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
@@ -22,13 +23,19 @@ public class OreDictRegistry
addBlacklist("plankWood");
addBlacklist("slabWood");
addBlacklist("stairWood");
addBlacklist("stickWood");
addBlacklist("treeSapling");
addBlacklist("treeLeaves");
addBlacklist("leavesTree");
addBlacklist("blockGlass");
addBlacklist("paneGlass");
addBlacklist("record");
addBlacklist("stone");
addBlacklist("cobblestone");
addBlacklist("glowstone");
addBlacklist("glass");
addBlacklist("obsidian");
addBlacklist("cobblestone");
addBlacklist("sand");
addBlacklist("sandstone");
@@ -36,8 +43,13 @@ public class OreDictRegistry
addBlacklist("crucioMaterial");
addBlacklist("imperioMaterial");
addBlacklist("zivicioMaterial");
addBlacklist("resourceTaint");
addBlacklist("slimeball");
addBlacklistPrefix("list");
addBlacklistPrefix("dye");
addWhitelist("nuggetIron");
}
public boolean addBlacklist (String entry) {
@@ -127,11 +139,19 @@ public class OreDictRegistry
// Fail entries that have any wildcard items registered to them.
HashSet<Item> itemIds = new HashSet<Item>();
for (int i = 0, n = oreList.size(); i < n; i++) {
if (oreList.get(i).getItemDamage() == OreDictionary.WILDCARD_VALUE)
return false;
itemIds.add(oreList.get(i).getItem());
}
// Fail entries that have multiple instances of an item registered, differing by metadata or other
// criteria.
if (itemIds.size() < oreList.size())
return false;
// Fail entries where the keys in at least one stack are not the super-set of all other stacks.
// Can be determined by merging all keys and testing cardinality.