Change the plugin system to a module system and slit up modules

-Moved the woodpile from the arboriculture module to the charcoal module
-Moved the backpacks from the storage module to the backpacks module
-Moved the crates from the storage module to the creates module
-Added the database module with a new storage for individuals
-Added a gui element system to improve the alyzer api
-Added a species plugin interface to handle the database gui
-Added some alyzer methods to the species plugin to move the alyzer
integration later to it
This commit is contained in:
Nedelosk committed 2017-11-02 16:03:33 +01:00
1 parent ee272de168
commit 88fd031fb4
277 files changed
+7361 -1930

No files matched your search

@@ -0,0 +1,92 @@
/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.energy;
import com.google.common.base.Preconditions;
import javax.annotation.Nullable;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.SidedProxy;
import forestry.api.core.ForestryAPI;
import forestry.core.config.Constants;
import forestry.core.recipes.RecipeUtil;
import forestry.energy.blocks.BlockRegistryEnergy;
import forestry.energy.proxy.ProxyEnergy;
import forestry.modules.BlankForestryModule;
import forestry.modules.ForestryModule;
import forestry.modules.ForestryModuleUids;
@ForestryModule(containerID = Constants.MOD_ID, moduleID = ForestryModuleUids.ENERGY, name = "Energy", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.module.energy.description")
public class ModuleEnergy extends BlankForestryModule {
@SuppressWarnings("NullableProblems")
@SidedProxy(clientSide = "forestry.energy.proxy.ProxyEnergyClient", serverSide = "forestry.energy.proxy.ProxyEnergy")
public static ProxyEnergy proxy;
@Nullable
public static BlockRegistryEnergy blocks;
@Override
public void registerItemsAndBlocks() {
blocks = new BlockRegistryEnergy();
}
@Override
public void doInit() {
Preconditions.checkState(blocks != null);
blocks.peatEngine.init();
blocks.biogasEngine.init();
if (ForestryAPI.activeMode.getBooleanSetting("energy.engine.clockwork")) {
blocks.clockworkEngine.init();
}
}
@Override
public void registerRecipes() {
Preconditions.checkState(blocks != null);
RecipeUtil.addRecipe("peat_engine", new ItemStack(blocks.peatEngine),
"###",
" X ",
"YVY",
'#', "ingotCopper",
'X', "blockGlass",
'Y', "gearCopper",
'V', Blocks.PISTON);
RecipeUtil.addRecipe("biogas_engine", new ItemStack(blocks.biogasEngine),
"###",
" X ",
"YVY",
'#', "ingotBronze",
'X', "blockGlass",
'Y', "gearBronze",
'V', Blocks.PISTON);
if (ForestryAPI.activeMode.getBooleanSetting("energy.engine.clockwork")) {
RecipeUtil.addRecipe("clockwork_engine", new ItemStack(blocks.clockworkEngine),
"###",
" X ",
"ZVY",
'#', "plankWood",
'X', "blockGlass",
'Y', Items.CLOCK,
'Z', "gearCopper",
'V', Blocks.PISTON);
}
}
}