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 df6c167db0
commit 70f5045418
3 files changed
+17 -6

No files matched your search

@@ -9,7 +9,7 @@ import com.cricketcraft.chisel.client.render.TextureSubmap;
public class CarvableVariation {
public String blockName;
private String description;
public String descriptionUnloc;
public int metadata;
public int kind;
@@ -30,11 +30,11 @@ public class CarvableVariation {
public TextureSubmap submapSmall;
public String getDescription() {
return I18n.format(description);
return I18n.format(descriptionUnloc);
}
public void setDescriptionUnloc(String desc) {
this.description = desc;
this.descriptionUnloc = desc;
}
static class CarvableVariationCTM {
@@ -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;