Skip to content

Commit

Permalink
Merge pull request #44 from DrParadox7/BoP-Integration
Browse files Browse the repository at this point in the history
BoP Progression Integration
  • Loading branch information
maggi373 authored Oct 18, 2022
2 parents 97bddf2 + b2dad45 commit 5f54b1c
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/java/mekanism/api/MekanismConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static class general
public static boolean cardboardSpawners = true;
public static boolean enableWorldRegeneration = true;
public static boolean spawnBabySkeletons = true;
public static boolean enableBoPProgression = true;
public static int obsidianTNTBlastRadius = 12;
public static int osmiumPerChunk = 12;
public static int copperPerChunk = 16;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/mekanism/common/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ public void loadConfiguration()
general.voiceServerEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoiceServerEnabled", false).getBoolean();
general.cardboardSpawners = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AllowSpawnerBoxPickup", true).getBoolean();
general.enableWorldRegeneration = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnableWorldRegeneration", false).getBoolean();
general.enableBoPProgression = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "enableBoPProgression", true).getBoolean();
general.spawnBabySkeletons = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SpawnBabySkeletons", true).getBoolean();
general.obsidianTNTDelay = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTDelay", 100).getInt();
general.obsidianTNTBlastRadius = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTBlastRadius", 12).getInt();
Expand Down
15 changes: 13 additions & 2 deletions src/main/java/mekanism/common/Mekanism.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import mekanism.api.EnumColor;
import mekanism.api.MekanismAPI;
import mekanism.api.MekanismAPI.BoxBlacklistEvent;
import mekanism.api.MekanismConfig;
import mekanism.api.MekanismConfig.general;
import mekanism.api.MekanismConfig.usage;
import mekanism.api.gas.Gas;
Expand Down Expand Up @@ -769,6 +770,8 @@ public void addRecipes()
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.TIN.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 6), 0.0F);

//Enrichment Chamber Recipes
ItemStack Amethyst = GameRegistry.findItemStack("BiomesOPlenty", "gems", 1);

RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.redstone_ore), new ItemStack(Items.redstone, 12));
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.obsidian), new ItemStack(MekanismItems.OtherDust, 2, 6));
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Items.coal, 1, 0), new ItemStack(MekanismItems.CompressedCarbon));
Expand All @@ -790,6 +793,7 @@ public void addRecipes()
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(MekanismBlocks.SaltBlock), new ItemStack(MekanismItems.Salt, 4));
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Items.diamond), new ItemStack(MekanismItems.CompressedDiamond));
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(MekanismItems.Polyethene, 3, 0), new ItemStack(MekanismItems.Polyethene, 1, 2));
RecipeHandler.addEnrichmentChamberRecipe(Amethyst, new ItemStack(MekanismItems.CompressedEnder));

for(int i = 0; i < EnumColor.DYES.length; i++)
{
Expand Down Expand Up @@ -872,7 +876,11 @@ public void addRecipes()
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.sand), new ItemStack(Blocks.dirt));
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("BIO"), 10, new ItemStack(Blocks.dirt), new ItemStack(Blocks.dirt, 1, 2));
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("DIAMOND"), 10, new ItemStack(MekanismItems.EnrichedAlloy), new ItemStack(MekanismItems.ReinforcedAlloy));
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("OBSIDIAN"), 10, new ItemStack(MekanismItems.ReinforcedAlloy), new ItemStack(MekanismItems.AtomicAlloy));
if (MekanismConfig.general.enableBoPProgression && Loader.isModLoaded("BiomesOPlenty")) {
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("ENDER"), 10, new ItemStack(MekanismItems.ReinforcedAlloy), new ItemStack(MekanismItems.AtomicAlloy));
} else {
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("OBSIDIAN"), 10, new ItemStack(MekanismItems.ReinforcedAlloy), new ItemStack(MekanismItems.AtomicAlloy));
}

//Chemical Infuser Recipes
RecipeHandler.addChemicalInfuserRecipe(new GasStack(GasRegistry.getGas("oxygen"), 1), new GasStack(GasRegistry.getGas("sulfurDioxideGas"), 2), new GasStack(GasRegistry.getGas("sulfurTrioxideGas"), 2));
Expand Down Expand Up @@ -940,8 +948,10 @@ public void addRecipes()
InfuseRegistry.registerInfuseObject(new ItemStack(Blocks.brown_mushroom), new InfuseObject(InfuseRegistry.get("FUNGI"), 10));
InfuseRegistry.registerInfuseObject(new ItemStack(MekanismItems.CompressedDiamond), new InfuseObject(InfuseRegistry.get("DIAMOND"), 80));
InfuseRegistry.registerInfuseObject(new ItemStack(MekanismItems.CompressedObsidian), new InfuseObject(InfuseRegistry.get("OBSIDIAN"), 80));
InfuseRegistry.registerInfuseObject(new ItemStack(MekanismItems.CompressedEnder), new InfuseObject(InfuseRegistry.get("ENDER"), 80));
InfuseRegistry.registerInfuseObject(Amethyst, new InfuseObject(InfuseRegistry.get("ENDER"), 10));

//Fuels
//Fuels
GameRegistry.registerFuelHandler(new IFuelHandler() {
@Override
public int getBurnTime(ItemStack fuel)
Expand Down Expand Up @@ -1195,6 +1205,7 @@ else if(config.getAbsolutePath().contains("tekkit"))
InfuseRegistry.registerInfuseType(new InfuseType("FUNGI", "mekanism:infuse/Fungi").setUnlocalizedName("fungi"));
InfuseRegistry.registerInfuseType(new InfuseType("BIO", "mekanism:infuse/Bio").setUnlocalizedName("bio"));
InfuseRegistry.registerInfuseType(new InfuseType("OBSIDIAN", "mekanism:infuse/Obsidian").setUnlocalizedName("obsidian"));
InfuseRegistry.registerInfuseType(new InfuseType("ENDER", "mekanism:infuse/Ender").setUnlocalizedName("ender"));
}

@EventHandler
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/mekanism/common/MekanismItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class MekanismItems
public static final Item CompressedRedstone = new ItemMekanism().setUnlocalizedName("CompressedRedstone");
public static final Item CompressedDiamond = new ItemMekanism().setUnlocalizedName("CompressedDiamond");
public static final Item CompressedObsidian = new ItemMekanism().setUnlocalizedName("CompressedObsidian");
public static final Item CompressedEnder = new ItemMekanism().setUnlocalizedName("CompressedEnder");
public static final Item BrineBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.bucket).setUnlocalizedName("BrineBucket");
public static final Item LithiumBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.bucket).setUnlocalizedName("LithiumBucket");
public static final Item HeavyWaterBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.bucket).setUnlocalizedName("HeavyWaterBucket");
Expand Down Expand Up @@ -132,6 +133,7 @@ public static void register()
GameRegistry.registerItem(CompressedRedstone, "CompressedRedstone");
GameRegistry.registerItem(CompressedDiamond, "CompressedDiamond");
GameRegistry.registerItem(CompressedObsidian, "CompressedObsidian");
GameRegistry.registerItem(CompressedEnder, "CompressedEnder");
GameRegistry.registerItem(PortableTeleporter, "PortableTeleporter");
GameRegistry.registerItem(TeleportationCore, "TeleportationCore");
GameRegistry.registerItem(Clump, "Clump");
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/mekanism/common/network/PacketConfigSync.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public void toBytes(ByteBuf dataStream)
dataStream.writeBoolean(general.voiceServerEnabled);
dataStream.writeBoolean(general.cardboardSpawners);
dataStream.writeBoolean(general.spawnBabySkeletons);
dataStream.writeBoolean(general.enableBoPProgression);
dataStream.writeInt(general.obsidianTNTDelay);
dataStream.writeInt(general.obsidianTNTBlastRadius);
dataStream.writeInt(general.UPDATE_DELAY);
Expand Down Expand Up @@ -130,6 +131,7 @@ public void fromBytes(ByteBuf dataStream)
general.voiceServerEnabled = dataStream.readBoolean();
general.cardboardSpawners = dataStream.readBoolean();
general.spawnBabySkeletons = dataStream.readBoolean();
general.enableBoPProgression = dataStream.readBoolean();
general.obsidianTNTDelay = dataStream.readInt();
general.obsidianTNTBlastRadius = dataStream.readInt();
general.UPDATE_DELAY = dataStream.readInt();
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/assets/mekanism/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ item.CompressedCarbon.name=Compressed Carbon
item.CompressedRedstone.name=Compressed Redstone
item.CompressedDiamond.name=Compressed Diamond
item.CompressedObsidian.name=Compressed Obsidian
item.CompressedEnder.name=Compressed Ender Amethyst
item.PortableTeleporter.name=Portable Teleporter
item.TeleportationCore.name=Teleportation Core
item.Configurator.name=Configurator
Expand Down Expand Up @@ -176,6 +177,7 @@ infuse.redstone=Redstone
infuse.fungi=Fungi
infuse.obsidian=Obsidian
infuse.bio=Biomass
infuse.ender=Ender

//Ore Block
tile.OreBlock.OsmiumOre.name=Osmium Ore
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5f54b1c

Please sign in to comment.