Fix chiseling stained glass always showing white variations.

Closes #174
This commit is contained in:
tterrag1098 committed 2015-01-24 23:22:55 -05:00
1 parent 7139d40807
commit b031b25ab4
3 files changed
+17 -6

No files matched your search

@@ -19,7 +19,7 @@ public class Carving implements ICarvingRegistry {
GroupList groups = new GroupList();
public static final Carving chisel = new Carving();
public static final ICarvingRegistry chisel = new Carving();
public static final Carving needle = new Carving();
private Carving() {
@@ -60,9 +60,20 @@ public class Carving implements ICarvingRegistry {
public List<ItemStack> getItemsForChiseling(ItemStack chiseledItem) {
ArrayList<ItemStack> items = new ArrayList<ItemStack>();
int damage = chiseledItem.getItemDamage();
ICarvingGroup group = null;
int[] oreids = OreDictionary.getOreIDs(chiseledItem);
for (int i : oreids) {
group = groups.getGroupByOre(OreDictionary.getOreName(i));
if (group != null) {
break;
}
}
if (group == null) {
group = getGroup(Block.getBlockFromItem(chiseledItem.getItem()), chiseledItem.getItemDamage());
}
ICarvingGroup group = getGroup(Block.getBlockFromItem(chiseledItem.getItem()), damage);
if (group == null)
return items;