mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-08 19:04:46 +00:00
Merge pull request #187 from Thorfusion/185-enhancement-deepslate-variant-of-osmium-ore-when-efr-is-installed
Add deepslate ores and support for efr #185
This commit is contained in:
14 files changed
+60
-12
No files matched your search
+2
-2
@@ -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.38
|
||||
alt_version=9, 10, 38
|
||||
mod_version=9.10.39
|
||||
alt_version=9, 10, 39
|
||||
Binary file not shown.
@@ -72,7 +72,10 @@ public class MekanismConfig
|
||||
|
||||
}
|
||||
public static class mekce {
|
||||
|
||||
public static boolean enableoregen;
|
||||
public static boolean enableBoPProgression;
|
||||
public static boolean enabledeepslateosmium;
|
||||
public static boolean EnableQuartzCompat;
|
||||
public static boolean EnableDiamondCompat;
|
||||
public static boolean EnablePoorOresCompat;
|
||||
|
||||
@@ -251,6 +251,7 @@ public class CommonProxy implements IGuiProvider
|
||||
public void loadConfiguration()
|
||||
{
|
||||
general.updateNotifications = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "UpdateNotificationsv2", true).getBoolean();
|
||||
mekce.enableoregen = Mekanism.configuration.get("mekce", "EnableOreGen", true, "disables completely the oregen").getBoolean();
|
||||
general.controlCircuitOreDict = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ControlCircuitOreDict", true).getBoolean();
|
||||
general.logPackets = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "LogPackets", false).getBoolean();
|
||||
general.dynamicTankEasterEgg = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DynamicTankEasterEgg", false).getBoolean();
|
||||
@@ -262,6 +263,7 @@ public class CommonProxy implements IGuiProvider
|
||||
general.obsidianTNTBlastRadius = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTBlastRadius", 12).getInt();
|
||||
general.UPDATE_DELAY = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ClientUpdateDelay", 10).getInt();
|
||||
general.osmiumPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "OsmiumPerChunk", 12).getInt();
|
||||
mekce.enabledeepslateosmium = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnableDeepslateOsmiumOreInEFR", true, "adds deepslate osmium ore entry to efr if et futurum requiem is present").getBoolean();
|
||||
general.copperPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "CopperPerChunk", 16).getInt();
|
||||
general.tinPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "TinPerChunk", 14).getInt();
|
||||
general.saltPerChunk = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SaltPerChunk", 2).getInt();
|
||||
|
||||
@@ -988,6 +988,9 @@ public class Mekanism
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismBlocks.OreBlock, 1, 0), new ItemStack(MekanismItems.Ingot, 1, 1), 1.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismBlocks.OreBlock, 1, 1), new ItemStack(MekanismItems.Ingot, 1, 5), 1.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismBlocks.OreBlock, 1, 2), new ItemStack(MekanismItems.Ingot, 1, 6), 1.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismBlocks.DeepslateOreBlock, 1, 0), new ItemStack(MekanismItems.Ingot, 1, 1), 1.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismBlocks.DeepslateOreBlock, 1, 1), new ItemStack(MekanismItems.Ingot, 1, 5), 1.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismBlocks.DeepslateOreBlock, 1, 2), new ItemStack(MekanismItems.Ingot, 1, 6), 1.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.OSMIUM.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 1), 0.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.IRON.ordinal()), new ItemStack(Items.iron_ingot), 0.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.GOLD.ordinal()), new ItemStack(Items.gold_ingot), 0.0F);
|
||||
@@ -1280,6 +1283,12 @@ public class Mekanism
|
||||
OreDictionary.registerOre("ore" + mekanismMaterial, new ItemStack(MekanismBlocks.OreBlock, 1, 0));
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(MekanismBlocks.OreBlock, 1, 1));
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(MekanismBlocks.OreBlock, 1, 2));
|
||||
OreDictionary.registerOre("ore" + mekanismMaterial, new ItemStack(MekanismBlocks.DeepslateOreBlock, 1, 0));
|
||||
OreDictionary.registerOre("oreDeepslateOsmium", new ItemStack(MekanismBlocks.DeepslateOreBlock, 1, 0));
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(MekanismBlocks.DeepslateOreBlock, 1, 1));
|
||||
OreDictionary.registerOre("oreDeepslateCopper", new ItemStack(MekanismBlocks.DeepslateOreBlock, 1, 1));
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(MekanismBlocks.DeepslateOreBlock, 1, 2));
|
||||
OreDictionary.registerOre("oreDeepslateTin", new ItemStack(MekanismBlocks.DeepslateOreBlock, 1, 2));
|
||||
|
||||
if(general.controlCircuitOreDict)
|
||||
{
|
||||
@@ -1452,7 +1461,9 @@ public class Mekanism
|
||||
Mekanism.proxy.Cape();
|
||||
|
||||
//Register the mod's world generators
|
||||
GameRegistry.registerWorldGenerator(genHandler, 1);
|
||||
if (MekanismConfig.mekce.enableoregen) {
|
||||
GameRegistry.registerWorldGenerator(genHandler, 1);
|
||||
}
|
||||
|
||||
//Register the mod's GUI handler
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, new CoreGuiHandler());
|
||||
|
||||
@@ -35,7 +35,8 @@ public class MekanismBlocks
|
||||
public static final Block MachineBlock = new BlockMachine(MACHINE_BLOCK_1).setBlockName("MachineBlock");
|
||||
public static final Block MachineBlock2 = new BlockMachine(MACHINE_BLOCK_2).setBlockName("MachineBlock2");
|
||||
public static final Block MachineBlock3 = new BlockMachine(MACHINE_BLOCK_3).setBlockName("MachineBlock3");
|
||||
public static final Block OreBlock = new BlockOre().setBlockName("OreBlock");
|
||||
public static final Block OreBlock = new BlockOre("stone").setBlockName("OreBlock");
|
||||
public static final Block DeepslateOreBlock = new BlockOre("deepslate").setBlockName("DeepslateOreBlock");
|
||||
public static final Block ObsidianTNT = new BlockObsidianTNT().setBlockName("ObsidianTNT").setCreativeTab(Mekanism.tabMekanism);
|
||||
public static final Block EnergyCube = new BlockEnergyCube().setBlockName("EnergyCube");
|
||||
public static final Block BoundingBlock = (BlockBounding)new BlockBounding().setBlockName("BoundingBlock");
|
||||
@@ -60,6 +61,7 @@ public class MekanismBlocks
|
||||
GameRegistry.registerBlock(MachineBlock2, ItemBlockMachine.class, "MachineBlock2");
|
||||
GameRegistry.registerBlock(MachineBlock3, ItemBlockMachine.class, "MachineBlock3");
|
||||
GameRegistry.registerBlock(OreBlock, ItemBlockOre.class, "OreBlock");
|
||||
GameRegistry.registerBlock(DeepslateOreBlock, ItemBlockOre.class, "DeepslateOreBlock");
|
||||
GameRegistry.registerBlock(EnergyCube, ItemBlockEnergyCube.class, "EnergyCube");
|
||||
GameRegistry.registerBlock(ObsidianTNT, "ObsidianTNT");
|
||||
GameRegistry.registerBlock(BoundingBlock, "BoundingBlock");
|
||||
|
||||
@@ -3,6 +3,7 @@ package mekanism.common.block;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -25,10 +26,10 @@ public class BlockOre extends Block
|
||||
{
|
||||
public IIcon[] icons = new IIcon[256];
|
||||
|
||||
public BlockOre()
|
||||
public BlockOre(String type)
|
||||
{
|
||||
super(Material.rock);
|
||||
setHardness(3F);
|
||||
setHardness(type == "deepslate" ? 4.5F : 3F);
|
||||
setResistance(5F);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
}
|
||||
@@ -37,9 +38,17 @@ public class BlockOre extends Block
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
icons[0] = register.registerIcon("mekanism:OsmiumOre");
|
||||
icons[1] = register.registerIcon("mekanism:CopperOre");
|
||||
icons[2] = register.registerIcon("mekanism:TinOre");
|
||||
if(this == MekanismBlocks.OreBlock)
|
||||
{
|
||||
icons[0] = register.registerIcon("mekanism:OsmiumOre");
|
||||
icons[1] = register.registerIcon("mekanism:CopperOre");
|
||||
icons[2] = register.registerIcon("mekanism:TinOre");
|
||||
}
|
||||
if(this == MekanismBlocks.DeepslateOreBlock) {
|
||||
icons[0] = register.registerIcon("mekanism:DeepslateOsmiumOre");
|
||||
icons[1] = register.registerIcon("mekanism:DeepslateCopperOre");
|
||||
icons[2] = register.registerIcon("mekanism:DeepslateTinOre");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@ import java.util.Map;
|
||||
import li.cil.oc.api.Driver;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
import mekanism.common.MekanismItems;
|
||||
import mekanism.common.Resource;
|
||||
import mekanism.common.multipart.TransmitterType;
|
||||
@@ -24,6 +25,8 @@ import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import dan200.computercraft.api.ComputerCraftAPI;
|
||||
import ganymedes01.etfuturum.api.DeepslateOreRegistry;
|
||||
import mekanism.api.MekanismConfig.mekce;
|
||||
|
||||
/**
|
||||
* Hooks for Mekanism. Use to grab items or blocks out of different mods.
|
||||
@@ -41,6 +44,7 @@ public final class MekanismHooks
|
||||
public boolean CCLoaded = false;
|
||||
public boolean AE2Loaded = false;
|
||||
public boolean RRLoaded = false;
|
||||
public boolean EFRLoaded = false;
|
||||
|
||||
public void hook()
|
||||
{
|
||||
@@ -51,6 +55,12 @@ public final class MekanismHooks
|
||||
if(Loader.isModLoaded("ComputerCraft")) CCLoaded = true;
|
||||
if(Loader.isModLoaded("appliedenergistics2")) AE2Loaded = true;
|
||||
if(Loader.isModLoaded("RefinedRelocation")) RRLoaded = true;
|
||||
if(Loader.isModLoaded("etfuturum")) EFRLoaded = true;
|
||||
|
||||
if(EFRLoaded && mekce.enabledeepslateosmium){
|
||||
hookEFRRecipes();
|
||||
Mekanism.logger.info("Hooked into EFR api successfully.");
|
||||
}
|
||||
|
||||
if(IC2Loaded)
|
||||
{
|
||||
@@ -63,9 +73,14 @@ public final class MekanismHooks
|
||||
loadCCPeripheralProviders();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Method(modid = "etfuturum")
|
||||
public void hookEFRRecipes() {
|
||||
DeepslateOreRegistry.addOre(MekanismBlocks.OreBlock, 0, MekanismBlocks.DeepslateOreBlock, 0);
|
||||
}
|
||||
@Method(modid = "IC2")
|
||||
public void hookIC2Recipes()
|
||||
{
|
||||
|
||||
@@ -76,6 +76,9 @@ public class ItemBlockOre extends ItemBlock
|
||||
case 2:
|
||||
name = "TinOre";
|
||||
break;
|
||||
case 3:
|
||||
name = "DeepslateOsmiumOre";
|
||||
break;
|
||||
default:
|
||||
name = "Unknown";
|
||||
break;
|
||||
|
||||
@@ -214,9 +214,6 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
||||
dataStream.writeBoolean(recipes.enableFlamethrower);
|
||||
dataStream.writeBoolean(recipes.enableGaugeDropper);
|
||||
dataStream.writeBoolean(recipes.enableTierInstaller);
|
||||
mekce.atomicDisassemblerPoweredDamage = dataStream.readInt();
|
||||
mekce.atomicDisassemblerUnpoweredDamage = dataStream.readInt();
|
||||
mekce.atomicDisassemblerAttackPowerCost = dataStream.readInt();
|
||||
|
||||
Tier.writeConfig(dataStream);
|
||||
|
||||
@@ -289,6 +286,9 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
||||
mekce.digitalMinerMaxRadius = dataStream.readInt();
|
||||
mekce.enableSingleUseCardboxes = dataStream.readBoolean();
|
||||
mekce.enablePersonalChestPocketAccess = dataStream.readBoolean();
|
||||
mekce.atomicDisassemblerPoweredDamage = dataStream.readInt();
|
||||
mekce.atomicDisassemblerUnpoweredDamage = dataStream.readInt();
|
||||
mekce.atomicDisassemblerAttackPowerCost = dataStream.readInt();
|
||||
|
||||
for(MachineType type : MachineType.getValidMachines())
|
||||
{
|
||||
|
||||
@@ -185,6 +185,9 @@ infuse.lead=Lead
|
||||
tile.OreBlock.OsmiumOre.name=Osmium Ore
|
||||
tile.OreBlock.CopperOre.name=Copper Ore
|
||||
tile.OreBlock.TinOre.name=Tin Ore
|
||||
tile.DeepslateOreBlock.OsmiumOre.name=Deepslate Osmium Ore
|
||||
tile.DeepslateOreBlock.CopperOre.name=Deepslate Copper Ore
|
||||
tile.DeepslateOreBlock.TinOre.name=Deepslate Tin Ore
|
||||
|
||||
//Transmitters
|
||||
item.MultipartTransmitter.BasicPressurizedTube.name=Basic Pressurized Tube
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 751 B |
Binary file not shown.
|
After Width: | Height: | Size: 802 B |
Binary file not shown.
|
After Width: | Height: | Size: 768 B |
Reference in new issue
Block a user