Skip to content

Commit 8046ad6

Browse files
Add oredicts to cobble variants of stone types (GregTechCEu#2784)
1 parent 07dfb7a commit 8046ad6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/main/java/gregtech/loaders/OreDictionaryLoader.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
import net.minecraft.item.ItemStack;
1919
import net.minecraftforge.oredict.OreDictionary;
2020

21+
import com.google.common.base.CaseFormat;
22+
2123
import static gregtech.api.GTValues.M;
2224
import static gregtech.api.GTValues.W;
2325

@@ -113,8 +115,13 @@ public static void init() {
113115
OreDictUnifier.registerOre(new ItemStack(Blocks.STONE, 1, 4), OrePrefix.stone, Materials.Diorite);
114116

115117
for (StoneVariantBlock.StoneType type : StoneVariantBlock.StoneType.values()) {
116-
ItemStack item = MetaBlocks.STONE_BLOCKS.get(StoneVariantBlock.StoneVariant.SMOOTH).getItemVariant(type);
117-
OreDictUnifier.registerOre(item, type.getOrePrefix(), type.getMaterial());
118+
ItemStack smoothType = MetaBlocks.STONE_BLOCKS.get(StoneVariantBlock.StoneVariant.SMOOTH)
119+
.getItemVariant(type);
120+
OreDictUnifier.registerOre(smoothType, type.getOrePrefix(), type.getMaterial());
121+
ItemStack cobbleType = MetaBlocks.STONE_BLOCKS.get(StoneVariantBlock.StoneVariant.COBBLE)
122+
.getItemVariant(type);
123+
OreDictUnifier.registerOre(cobbleType,
124+
CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "cobble_" + type.getName()));
118125
}
119126

120127
OreDictUnifier.registerOre(new ItemStack(Blocks.ANVIL), "craftingAnvil");

0 commit comments

Comments
 (0)