mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 14:24:42 +00:00
Merge remote-tracking branch 'origin/mc-1.12' into dev
This commit is contained in:
commit
b515870cb4
3 files changed
+41
-81
No files matched your search
+4
-3
@@ -40,9 +40,6 @@ minecraft {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://maven.epoxide.xyz'
|
||||
}
|
||||
maven {
|
||||
url "http://dvs1.progwml6.com/files/maven"
|
||||
}
|
||||
@@ -54,6 +51,10 @@ repositories {
|
||||
name = "Modmuss50"
|
||||
url = "http://maven.modmuss50.me"
|
||||
}
|
||||
maven {
|
||||
|
||||
url 'http://maven.mcmoddev.com'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -26,7 +26,6 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms;
|
||||
|
||||
import forestry.api.circuits.ChipsetManager;
|
||||
import forestry.api.circuits.CircuitSocketType;
|
||||
@@ -38,8 +37,6 @@ import forestry.api.fuels.FuelManager;
|
||||
import forestry.api.modules.ForestryModule;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
import forestry.api.storage.ICrateRegistry;
|
||||
import forestry.api.storage.StorageManager;
|
||||
import forestry.apiculture.ModuleApiculture;
|
||||
import forestry.apiculture.items.EnumPropolis;
|
||||
import forestry.apiculture.items.ItemRegistryApiculture;
|
||||
@@ -52,7 +49,6 @@ import forestry.core.fluids.Fluids;
|
||||
import forestry.core.items.EnumElectronTube;
|
||||
import forestry.core.items.ItemRegistryCore;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.core.utils.ItemStackUtil;
|
||||
import forestry.core.utils.Log;
|
||||
import forestry.core.utils.ModUtil;
|
||||
import forestry.energy.ModuleEnergy;
|
||||
@@ -65,6 +61,7 @@ import forestry.farming.circuits.CircuitFarmLogic;
|
||||
import forestry.farming.logic.FarmLogicRubber;
|
||||
import forestry.farming.logic.ForestryFarmIdentifier;
|
||||
import forestry.farming.logic.farmables.FarmableBasicIC2Crop;
|
||||
import forestry.farming.logic.farmables.FarmableSapling;
|
||||
import forestry.modules.BlankForestryModule;
|
||||
import forestry.modules.ForestryModuleUids;
|
||||
import forestry.modules.ModuleHelper;
|
||||
@@ -76,7 +73,7 @@ import ic2.api.recipe.Recipes;
|
||||
@ForestryModule(containerID = ForestryCompatPlugins.ID, moduleID = ForestryModuleUids.INDUSTRIALCRAFT2, name = "IndustrialCraft2", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.module.ic2.description")
|
||||
public class PluginIC2 extends BlankForestryModule {
|
||||
public static final String MOD_ID = "ic2";
|
||||
|
||||
|
||||
@Nullable
|
||||
private static ItemStack rubberSapling;
|
||||
@Nullable
|
||||
@@ -87,7 +84,7 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
public static ItemStack resin;
|
||||
@Nullable
|
||||
public static ItemStack fertilizer;
|
||||
|
||||
|
||||
@Nullable
|
||||
public static BlockRegistryIC2 blocks;
|
||||
|
||||
@@ -129,7 +126,7 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
resin = IC2Items.getItem("misc_resource", "resin");
|
||||
rubberSapling = IC2Items.getItem("sapling");
|
||||
rubber = IC2Items.getItem("crafting", "rubber");
|
||||
fertilizer = IC2Items.getItem("crop_res","fertilizer");
|
||||
fertilizer = IC2Items.getItem("crop_res", "fertilizer");
|
||||
|
||||
IFarmProperties rubberFarm = FarmRegistry.getInstance().registerLogic(ForestryFarmIdentifier.RUBBER, FarmLogicRubber::new);
|
||||
|
||||
@@ -138,7 +135,7 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
ICircuitLayout layoutEngineTin = new CircuitLayout("engine.tin", CircuitSocketType.ELECTRIC_ENGINE);
|
||||
ChipsetManager.circuitRegistry.registerLayout(layoutEngineTin);
|
||||
|
||||
if(fertilizer != null){
|
||||
if (fertilizer != null) {
|
||||
FarmRegistry.getInstance().registerFertilizer(fertilizer, 250);
|
||||
}
|
||||
}
|
||||
@@ -147,14 +144,14 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
@Optional.Method(modid = PluginIC2.MOD_ID)
|
||||
public void doInit() {
|
||||
// Remove some items from the recycler
|
||||
if (Recipes.recyclerBlacklist != null) {
|
||||
ItemRegistryApiculture beeItems = ModuleApiculture.getItems();
|
||||
if (beeItems != null) {
|
||||
if (ModuleHelper.isEnabled(ForestryModuleUids.APICULTURE)) {
|
||||
if (Recipes.recyclerBlacklist != null) {
|
||||
ItemRegistryApiculture beeItems = ModuleApiculture.getItems();
|
||||
Recipes.recyclerBlacklist.add(Recipes.inputFactory.forStack(new ItemStack(beeItems.beeQueenGE)));
|
||||
Recipes.recyclerBlacklist.add(Recipes.inputFactory.forStack(new ItemStack(beeItems.beePrincessGE)));
|
||||
} else {
|
||||
Log.error("IC2 Recipes.recyclerBlacklist not found.");
|
||||
}
|
||||
} else {
|
||||
Log.error("IC2 Recipes.recyclerBlacklist not found.");
|
||||
}
|
||||
|
||||
Circuits.energyElectricChoke1 = new CircuitElectricChoke("electric.choke.1");
|
||||
@@ -162,71 +159,38 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
Circuits.energyElectricBoost1 = new CircuitElectricBoost("electric.boost.1", 4, 10);
|
||||
Circuits.energyElectricBoost2 = new CircuitElectricBoost("electric.boost.2", 7, 20);
|
||||
|
||||
blocks.electricalEngine.init();
|
||||
blocks.generator.init();
|
||||
getBlocks().electricalEngine.init();
|
||||
getBlocks().generator.init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
if (BackpackManager.backpackInterface == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (resin != null) {
|
||||
BackpackManager.backpackInterface.addItemToForestryBackpack(BackpackManager.FORESTER_UID, resin);
|
||||
}
|
||||
if (rubber != null) {
|
||||
BackpackManager.backpackInterface.addItemToForestryBackpack(BackpackManager.FORESTER_UID, rubber);
|
||||
}
|
||||
if (rubberSapling != null) {
|
||||
BackpackManager.backpackInterface.addItemToForestryBackpack(BackpackManager.FORESTER_UID, rubberSapling);
|
||||
}
|
||||
ItemStack rubberLeaves = IC2Items.getItem("leaves");
|
||||
if (rubberLeaves != null) {
|
||||
BackpackManager.backpackInterface.addItemToForestryBackpack(BackpackManager.FORESTER_UID, rubberLeaves);
|
||||
}
|
||||
|
||||
ModuleHelper.addItemToBackpack(BackpackManager.FORESTER_UID, resin);
|
||||
ModuleHelper.addItemToBackpack(BackpackManager.FORESTER_UID, rubberSapling);
|
||||
ModuleHelper.addItemToBackpack(BackpackManager.FORESTER_UID, rubber);
|
||||
ModuleHelper.addItemToBackpack(BackpackManager.FORESTER_UID, rubberLeaves);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerCrates() {
|
||||
ICrateRegistry crateRegistry = StorageManager.crateRegistry;
|
||||
if (crateRegistry == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (resin != null) {
|
||||
crateRegistry.registerCrate(resin);
|
||||
}
|
||||
|
||||
if (rubber != null) {
|
||||
crateRegistry.registerCrate(rubber);
|
||||
}
|
||||
ModuleHelper.registerCrate(resin);
|
||||
|
||||
ItemStack scrap = IC2Items.getItem("crafting", "scrap");
|
||||
if (scrap != null) {
|
||||
crateRegistry.registerCrate(scrap);
|
||||
}
|
||||
ModuleHelper.registerCrate(scrap);
|
||||
|
||||
ItemStack uuMatter = IC2Items.getItem("misc_resource", "matter");
|
||||
if (uuMatter != null) {
|
||||
crateRegistry.registerCrate(uuMatter);
|
||||
}
|
||||
ModuleHelper.registerCrate(uuMatter);
|
||||
|
||||
ItemStack silver = IC2Items.getItem("ingot", "silver");
|
||||
if (silver != null) {
|
||||
crateRegistry.registerCrate(silver);
|
||||
}
|
||||
|
||||
ItemStack brass = IC2Items.getItem("ingot", "bronze");
|
||||
if (brass != null) {
|
||||
crateRegistry.registerCrate(brass);
|
||||
}
|
||||
ModuleHelper.registerCrate("ingotSilver");
|
||||
ModuleHelper.registerCrate("itemRubber");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = PluginIC2.MOD_ID)
|
||||
public void registerRecipes() {
|
||||
ItemRegistryCore coreItems = ModuleCore.items;
|
||||
ItemRegistryCore coreItems = ModuleCore.getItems();
|
||||
|
||||
if (rubber != null) {
|
||||
RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), coreItems.tubes.get(EnumElectronTube.RUBBER, 4),
|
||||
@@ -243,8 +207,8 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
RecipeUtil.addFermenterRecipes(bioChaff, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat") * 9, Fluids.BIOMASS);
|
||||
}
|
||||
|
||||
ItemRegistryApiculture beeItems = ModuleApiculture.getItems();
|
||||
if (beeItems != null) {
|
||||
if (ModuleHelper.isEnabled(ForestryModuleUids.APICULTURE)) {
|
||||
ItemRegistryApiculture beeItems = ModuleApiculture.getItems();
|
||||
if (resin != null) {
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, beeItems.propolis.get(EnumPropolis.NORMAL, 1), ImmutableMap.of(resin, 1.0f));
|
||||
} else {
|
||||
@@ -259,15 +223,10 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
}
|
||||
|
||||
if (rubberSapling != null && resin != null) {
|
||||
String saplingName = ItemStackUtil.getBlockNameFromRegistryAsString(ItemStackUtil.getBlock(rubberSapling));
|
||||
if(saplingName != null){
|
||||
String resinName = ItemStackUtil.getItemNameFromRegistryAsString(resin.getItem());
|
||||
String imc = String.format("farmArboreal@%s.%s.%s.%s",
|
||||
saplingName, rubberSapling.getItemDamage(),
|
||||
resinName, resin.getItemDamage());
|
||||
Log.trace("Sending IMC '%s'.", imc);
|
||||
FMLInterModComms.sendMessage(Constants.MOD_ID, "add-farmable-sapling", imc);
|
||||
}
|
||||
FarmRegistry.getInstance().registerFarmables("farmArboreal", new FarmableSapling(
|
||||
rubberSapling,
|
||||
new ItemStack[0]
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -284,12 +243,12 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
if (waterCell != null) {
|
||||
int bogEarthOutputCan = ForestryAPI.activeMode.getIntegerSetting("recipe.output.bogearth.can");
|
||||
if (bogEarthOutputCan > 0) {
|
||||
ItemStack bogEarthCan = ModuleCore.getBlocks().bogEarth.get(BlockBogEarth.SoilType.BOG_EARTH, bogEarthOutputCan);
|
||||
ItemStack bogEarthCan = ModuleCore.getBlocks().bogEarth.get(BlockBogEarth.SoilType.BOG_EARTH, bogEarthOutputCan);
|
||||
RecipeUtil.addRecipe("ic2_bog_earth_can", bogEarthCan, "#Y#", "YXY", "#Y#", '#', Blocks.DIRT, 'X', waterCell, 'Y', "sand");
|
||||
}
|
||||
}
|
||||
|
||||
ICircuitLayout layout = ChipsetManager.circuitRegistry.getLayout("forestry.engine.tin");
|
||||
ICircuitLayout layout = Preconditions.checkNotNull(ChipsetManager.circuitRegistry.getLayout("forestry.engine.tin"));
|
||||
|
||||
// / Solder Manager
|
||||
ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.COPPER, 1), Circuits.energyElectricChoke1);
|
||||
@@ -299,7 +258,7 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
|
||||
if (ModuleHelper.isEnabled(ForestryModuleUids.FARMING)) {
|
||||
if (resin != null && rubberWood != null) {
|
||||
ICircuitLayout layoutManual = ChipsetManager.circuitRegistry.getLayout("forestry.farms.manual");
|
||||
ICircuitLayout layoutManual = Preconditions.checkNotNull(ChipsetManager.circuitRegistry.getLayout("forestry.farms.manual"));
|
||||
ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.RUBBER, 1), Circuits.farmRubberManual);
|
||||
}
|
||||
|
||||
@@ -309,7 +268,7 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
|
||||
BlockRegistryEnergy energyBlocks = ModuleEnergy.blocks;
|
||||
if (energyBlocks != null) {
|
||||
RecipeUtil.addRecipe("ic2_generator", blocks.generator,
|
||||
RecipeUtil.addRecipe("ic2_generator", getBlocks().generator,
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
@@ -317,7 +276,7 @@ public class PluginIC2 extends BlankForestryModule {
|
||||
'X', "ingotGold",
|
||||
'Y', coreItems.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe("ic2_eletrical_engine", blocks.electricalEngine,
|
||||
RecipeUtil.addRecipe("ic2_electrical_engine", getBlocks().electricalEngine,
|
||||
"###",
|
||||
" X ",
|
||||
"YVY",
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Wooden frames are speed up the production speed of the queen in an apiary. The better the quality of the wood is the higher is the production speed of the queen."
|
||||
"text": "Wooden frames increase the production speed of the queen in an apiary. Better quality frames increase the production speed of the queen more than lower quality frames."
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"text": "By myself I currently had no success with inserting wooden frames into a alveary or a bee house. At the moment I only discovered 3 frames: the Untreated Frame, the Impregnated Frame and the Proven Frame."
|
||||
"text": "By myself, I currently had no success with inserting wooden frames into an alveary or a bee house. At the moment I only discovered 3 frames: the Untreated Frame, the Impregnated Frame and the Proven Frame."
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user