Skip to content

Commit

Permalink
certus quartz chiseling and material amount fix
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss committed Dec 15, 2023
1 parent d9f2565 commit 275d71c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/gregtech/api/unification/ore/OrePrefix.java
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ public static void init() {

block.modifyMaterialAmount(Materials.Glowstone, 4);
block.modifyMaterialAmount(Materials.NetherQuartz, 4);
block.modifyMaterialAmount(Materials.CertusQuartz, 4);
block.modifyMaterialAmount(Materials.Brick, 4);
block.modifyMaterialAmount(Materials.Clay, 4);
block.modifyMaterialAmount(Materials.Glass, 1);
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/gregtech/integration/chisel/ChiselModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import gregtech.api.GTValues;
import gregtech.api.block.VariantBlock;
import gregtech.api.modules.GregTechModule;
import gregtech.api.unification.material.Material;
import gregtech.api.unification.material.Materials;
import gregtech.common.blocks.BlockColored;
import gregtech.common.blocks.BlockCompressed;
import gregtech.common.blocks.BlockWarningSign;
import gregtech.common.blocks.BlockWarningSign1;
import gregtech.common.blocks.MetaBlocks;
Expand Down Expand Up @@ -63,6 +66,9 @@ public void init(FMLInitializationEvent event) {
if (doesGroupExist("treated_wood")) { // IE Treated Wood group
addVariations("treated_wood", MetaBlocks.PLANKS, BlockGregPlanks.BlockType.TREATED_PLANK);
}
if (doesGroupExist("certus")) { // AE2 Certus Quartz group
addVariation("certus", Materials.CertusQuartz);
}
}

@SafeVarargs
Expand Down Expand Up @@ -93,6 +99,12 @@ private void addVariations(String group, StoneType type, boolean enableCobbles)
}
}

private void addVariation(String group, Material material) {
BlockCompressed block = MetaBlocks.COMPRESSED.get(material);
int meta = block.getMetaFromState(block.getBlock(material));
addVariation(group, block, meta);
}

private void addVariation(String group, Block block, int meta) {
NBTTagCompound tag = new NBTTagCompound();
tag.setString("group", group);
Expand Down

0 comments on commit 275d71c

Please sign in to comment.