mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-12 16:27:45 +00:00
Fix chiseling stained glass always showing white variations.
Closes #174
This commit is contained in:
1 parent
7139d40807
commit
b031b25ab4
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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user