Skip to content

Commit

Permalink
Merge pull request #337 from Oganesson897/stonetype
Browse files Browse the repository at this point in the history
ore stone variant byproducts
  • Loading branch information
bruberu authored Nov 18, 2024
2 parents 2979c93 + 77d94e0 commit ae51916
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package supersymmetry.api.unification.ore;

import gregtech.api.unification.material.Material;
import gregtech.api.unification.material.Materials;
import gregtech.api.unification.ore.OrePrefix;
import gregtech.api.unification.ore.StoneType;
import gregtech.api.unification.stack.MaterialStack;
import gregtech.common.ConfigHolder;
import net.minecraft.block.SoundType;
import net.minecraft.block.state.IBlockState;
import supersymmetry.common.blocks.SuSyBlocks;
Expand All @@ -23,6 +27,7 @@ public class SusyStoneTypes {

public SusyStoneTypes(){
}

public static void init(){
GABBRO = new StoneType(12, "gabbro", SoundType.STONE, SusyOrePrefix.oreGabbro, SusyMaterials.Gabbro,
() -> gtStoneState(SusyStoneVariantBlock.StoneType.GABBRO),
Expand Down Expand Up @@ -51,7 +56,24 @@ public static void init(){
KIMBERLITE = new StoneType(20, "kimberlite", SoundType.STONE, SusyOrePrefix.oreKimberlite, SusyMaterials.Kimberlite,
() -> gtStoneState(SusyStoneVariantBlock.StoneType.KIMBERLITE),
state -> gtStonePredicate(state, SusyStoneVariantBlock.StoneType.KIMBERLITE), false);

if (ConfigHolder.worldgen.allUniqueStoneTypes) {
addSecondary(SusyOrePrefix.oreGabbro, SusyMaterials.Gabbro);
addSecondary(SusyOrePrefix.oreGneiss, SusyMaterials.Gneiss);
addSecondary(SusyOrePrefix.oreLimestone, SusyMaterials.Limestone);
addSecondary(SusyOrePrefix.orePhyllite, SusyMaterials.Phyllite);
addSecondary(SusyOrePrefix.oreQuartzite, Materials.Quartzite);
addSecondary(SusyOrePrefix.oreShale, SusyMaterials.Shale);
addSecondary(SusyOrePrefix.oreSlate, SusyMaterials.Slate);
addSecondary(SusyOrePrefix.oreSoapstone, Materials.Soapstone);
addSecondary(SusyOrePrefix.oreKimberlite, SusyMaterials.Kimberlite);
}
}

private static void addSecondary(OrePrefix prefix, Material material) {
prefix.addSecondaryMaterial(new MaterialStack(material, OrePrefix.dust.getMaterialAmount(material)));
}

private static IBlockState gtStoneState(SusyStoneVariantBlock.StoneType stoneType) {
return SuSyBlocks.SUSY_STONE_BLOCKS.get(SusyStoneVariantBlock.StoneVariant.SMOOTH).getState(stoneType);
}
Expand Down

0 comments on commit ae51916

Please sign in to comment.