Skip to content

Commit

Permalink
Merge pull request #188 from Thorfusion/add-further-efr-support
Browse files Browse the repository at this point in the history
Add further efr support
  • Loading branch information
maggi373 authored Oct 17, 2024
2 parents 423a97c + 92f91bd commit 6be5daf
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ FMP_version=1.2.0.345
CCLIB_version=1.1.3.141
NEI_version=1.0.5.120
CCC_version=1.0.7.48
mod_version=9.10.39
alt_version=9, 10, 39
mod_version=9.10.40
alt_version=9, 10, 40
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 @@ -196,6 +196,7 @@ public static class tools
public static class recipes
{
public static boolean enableOsmiumBlock = true;
public static boolean enableRawOsmiumBlock = true;
public static boolean enableBronzeBlock = true;
public static boolean enableRefinedObsidianBlock = true;
public static boolean enableCharcoalBlock = true;
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 @@ -412,6 +412,7 @@ else if(s.trim().equalsIgnoreCase("a") || s.trim().equalsIgnoreCase("ambient") |
Tier.loadConfig();

recipes.enableOsmiumBlock = Mekanism.configurationrecipes.get("recipes","enableOsmiumBlock", true).getBoolean();
recipes.enableRawOsmiumBlock = Mekanism.configurationrecipes.get("recipes","enableRawOsmiumBlock", true).getBoolean();
recipes.enableBronzeBlock = Mekanism.configurationrecipes.get("recipes","enableBronzeBlock", true).getBoolean();
recipes.enableRefinedObsidianBlock = Mekanism.configurationrecipes.get("recipes","enableRefinedObsidianBlock", true).getBoolean();
recipes.enableCharcoalBlock = Mekanism.configurationrecipes.get("recipes","enableCharcoalBlock", true).getBoolean();
Expand Down
12 changes: 11 additions & 1 deletion src/main/java/mekanism/common/Mekanism.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
*/
@Mod(modid = "Mekanism", name = "Mekanism", version = "GRADLE_MODVERSION", guiFactory = "mekanism.client.gui.ConfigGuiFactory",
dependencies = "after:ForgeMultipart;after:BuildCraft;after:BuildCraftAPI;after:IC2;after:CoFHCore;" +
"after:ComputerCraft;after:Galacticraft;after:MineTweaker3")
"after:ComputerCraft;after:Galacticraft;after:MineTweaker3;after:etfuturum")
public class Mekanism
{
/** Mekanism Packet Pipeline */
Expand Down Expand Up @@ -249,6 +249,12 @@ public void addRecipes()
}));
}

if (MekanismConfig.recipes.enableRawOsmiumBlock){
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.RawOsmiumOre, 9, 1), new Object[]{
"*", Character.valueOf('*'), new ItemStack(MekanismBlocks.BasicBlock2, 1, 10)
}));
}

if (MekanismConfig.recipes.enableBronzeBlock) {
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 1), new Object[]{
"***", "***", "***", Character.valueOf('*'), "ingotBronze"
Expand Down Expand Up @@ -997,6 +1003,7 @@ public void addRecipes()
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.OtherDust, 1, 1), new ItemStack(MekanismItems.Ingot, 1, 4), 0.0F);
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.COPPER.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 5), 0.0F);
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.TIN.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 6), 0.0F);
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.RawOsmiumOre), new ItemStack(MekanismItems.Ingot, 1, 1), 1.0F);

//Enrichment Chamber Recipes
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.redstone_ore), new ItemStack(Items.redstone, 12));
Expand Down Expand Up @@ -1230,6 +1237,8 @@ public void registerOreDict()
OreDictionary.registerOre("pulpWood", MekanismItems.Sawdust);
OreDictionary.registerOre("dustWood", MekanismItems.Sawdust);
OreDictionary.registerOre("blockSalt", MekanismBlocks.SaltBlock);
OreDictionary.registerOre("rawOsmium", MekanismItems.RawOsmiumOre);
OreDictionary.registerOre("oreOsmium", MekanismItems.RawOsmiumOre);


//Alloys!
Expand Down Expand Up @@ -1263,6 +1272,7 @@ public void registerOreDict()
OreDictionary.registerOre("ingotRefinedLapis", new ItemStack(MekanismItems.Ingot, 1, 7));

OreDictionary.registerOre("block" + mekanismMaterial, new ItemStack(MekanismBlocks.BasicBlock, 1, 0));
OreDictionary.registerOre("blockRawOsmium", new ItemStack(MekanismBlocks.BasicBlock2, 1, 10));
OreDictionary.registerOre("blockBronze", new ItemStack(MekanismBlocks.BasicBlock, 1, 1));
OreDictionary.registerOre("blockRefinedObsidian", new ItemStack(MekanismBlocks.BasicBlock, 1, 2));
OreDictionary.registerOre("blockCharcoal", new ItemStack(MekanismBlocks.BasicBlock, 1, 3));
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 @@ -63,6 +63,7 @@ public class MekanismItems
public static final ItemJetpack ArmoredJetpack = (ItemJetpack)new ItemJetpack().setUnlocalizedName("ArmoredJetpack");
public static final ItemFreeRunners FreeRunners = (ItemFreeRunners)new ItemFreeRunners().setUnlocalizedName("FreeRunners");
public static final Item Balloon = new ItemBalloon().setUnlocalizedName("Balloon");
public static final Item RawOsmiumOre = new ItemMekanism().setUnlocalizedName("RawOsmiumOre");

//Multi-ID Items
public static final Item OtherDust = new ItemOtherDust();
Expand Down Expand Up @@ -141,6 +142,7 @@ public static void register()
GameRegistry.registerItem(GaugeDropper, "GaugeDropper");
GameRegistry.registerItem(TierInstaller, "FactoryInstaller");
GameRegistry.registerItem(OtherDust, "OtherDust");
GameRegistry.registerItem(RawOsmiumOre, "RawOsmiumOre");

FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid("brine"), new ItemStack(BrineBucket), FluidContainerRegistry.EMPTY_BUCKET);
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid("lithium"), new ItemStack(LithiumBucket), FluidContainerRegistry.EMPTY_BUCKET);
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/mekanism/common/block/BlockBasic.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
* 1:7: Boiler Casing
* 1:8: Boiler Valve
* 1:9: Security Desk
* 1:10: Raw Osmium Block
* @author AidanBrady
*
*/
Expand Down Expand Up @@ -258,6 +259,8 @@ public void registerBlockIcons(IIconRegister register)
icons[8][0] = ctms[8][0].mainTextureData.icon;

icons[9][0] = register.registerIcon(ICON_BASE);

icons[10][0] = register.registerIcon("mekanism:RawOsmiumBlock");

break;
}
Expand Down Expand Up @@ -1130,7 +1133,8 @@ public static enum BasicType
PRESSURE_DISPERSER(BasicBlock.BASIC_BLOCK_2, 6, "PressureDisperser", TileEntityPressureDisperser.class, true),
BOILER_CASING(BasicBlock.BASIC_BLOCK_2, 7, "BoilerCasing", TileEntityBoilerCasing.class, true),
BOILER_VALVE(BasicBlock.BASIC_BLOCK_2, 8, "BoilerValve", TileEntityBoilerValve.class, true),
SECURITY_DESK(BasicBlock.BASIC_BLOCK_2, 9, "SecurityDesk", TileEntitySecurityDesk.class, true);
SECURITY_DESK(BasicBlock.BASIC_BLOCK_2, 9, "SecurityDesk", TileEntitySecurityDesk.class, true),
RAW_OSMIUM_BLOCK(BasicBlock.BASIC_BLOCK_2, 10, "RawOsmiumBlock", null, false);

public BasicBlock typeBlock;
public int meta;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/mekanism/common/integration/MekanismHooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import cpw.mods.fml.common.event.FMLInterModComms;
import dan200.computercraft.api.ComputerCraftAPI;
import ganymedes01.etfuturum.api.DeepslateOreRegistry;
import ganymedes01.etfuturum.api.RawOreRegistry;
import mekanism.api.MekanismConfig.mekce;

/**
Expand Down Expand Up @@ -80,6 +81,7 @@ public void hook()
@Method(modid = "etfuturum")
public void hookEFRRecipes() {
DeepslateOreRegistry.addOre(MekanismBlocks.OreBlock, 0, MekanismBlocks.DeepslateOreBlock, 0);
RawOreRegistry.addOre("oreOsmium", MekanismItems.RawOsmiumOre);
}
@Method(modid = "IC2")
public void hookIC2Recipes()
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/mekanism/common/integration/OreDictManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ public static void init() {
"XXX", "XXX", "XXX", Character.valueOf('X'), "ingot" + mekanismMaterial
}));
}
if (MekanismConfig.recipes.enableRawOsmiumBlock) {
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock2, 1, 10), new Object[]{
"XXX", "XXX", "XXX", Character.valueOf('X'), "raw" + mekanismMaterial
}));
}
if (MekanismConfig.recipes.enableMachineUpgrades) {
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.SpeedUpgrade), new Object[]{
" G ", "ADA", " G ", Character.valueOf('G'), "blockGlass", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('D'), "dust" + mekanismMaterial
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 @@ -120,6 +120,7 @@ public void toBytes(ByteBuf dataStream)
dataStream.writeDouble(usage.heavyWaterElectrolysisUsage);
dataStream.writeDouble(usage.formulaicAssemblicatorUsage);
dataStream.writeBoolean(recipes.enableOsmiumBlock);
dataStream.writeBoolean(recipes.enableRawOsmiumBlock);
dataStream.writeBoolean(recipes.enableBronzeBlock);
dataStream.writeBoolean(recipes.enableRefinedObsidianBlock);
dataStream.writeBoolean(recipes.enableCharcoalBlock);
Expand Down Expand Up @@ -319,6 +320,7 @@ public void fromBytes(ByteBuf dataStream)
usage.heavyWaterElectrolysisUsage = dataStream.readDouble();
usage.formulaicAssemblicatorUsage = dataStream.readDouble();
recipes.enableOsmiumBlock = dataStream.readBoolean();
recipes.enableRawOsmiumBlock = dataStream.readBoolean();
recipes.enableBronzeBlock = dataStream.readBoolean();
recipes.enableRefinedObsidianBlock = dataStream.readBoolean();
recipes.enableCharcoalBlock = dataStream.readBoolean();
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 @@ -51,6 +51,7 @@ item.Flamethrower.name=Flamethrower
item.GaugeDropper.name=Gauge Dropper
item.BioFuel.name=Biomass
item.CraftingFormula.name=Crafting Formula
item.RawOsmiumOre.name=Raw Osmium

//Control Circuits
item.BasicControlCircuit.name=Basic Control Circuit
Expand Down Expand Up @@ -117,6 +118,7 @@ tile.BasicBlock2.PressureDisperser.name=Pressure Disperser
tile.BasicBlock2.BoilerCasing.name=Boiler Casing
tile.BasicBlock2.BoilerValve.name=Boiler Valve
tile.BasicBlock2.SecurityDesk.name=Security Desk
tile.BasicBlock2.RawOsmiumBlock.name=Raw Osmium Block

//Machine Block
tile.MachineBlock.EnrichmentChamber.name=Enrichment Chamber
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.
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 6be5daf

Please sign in to comment.