mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 14:24:42 +00:00
Move factory blocks to PluginFactory.blocks
This commit is contained in:
1 parent
ffe19807db
commit
10e5391f48
35 files changed
+506
-262
No files matched your search
@@ -67,7 +67,7 @@ import forestry.apiculture.GuiHandlerApiculture;
|
||||
import forestry.apiculture.SaveEventHandlerApiculture;
|
||||
import forestry.apiculture.VillageHandlerApiculture;
|
||||
import forestry.apiculture.blocks.BlockAlveary;
|
||||
import forestry.apiculture.blocks.BlockApiculture;
|
||||
import forestry.apiculture.blocks.BlockApicultureType;
|
||||
import forestry.apiculture.blocks.BlockCandle;
|
||||
import forestry.apiculture.blocks.BlockRegistryApiculture;
|
||||
import forestry.apiculture.commands.CommandBee;
|
||||
@@ -97,8 +97,6 @@ import forestry.apiculture.multiblock.TileAlvearySwarmer;
|
||||
import forestry.apiculture.network.PacketRegistryApiculture;
|
||||
import forestry.apiculture.proxy.ProxyApiculture;
|
||||
import forestry.apiculture.tiles.TileApiaristChest;
|
||||
import forestry.apiculture.tiles.TileApiary;
|
||||
import forestry.apiculture.tiles.TileBeehouse;
|
||||
import forestry.apiculture.tiles.TileCandle;
|
||||
import forestry.apiculture.tiles.TileSwarm;
|
||||
import forestry.apiculture.trigger.ApicultureTriggers;
|
||||
@@ -108,7 +106,7 @@ import forestry.apiculture.worldgen.HiveGenHelper;
|
||||
import forestry.apiculture.worldgen.HiveRegistry;
|
||||
import forestry.core.GuiHandlerBase;
|
||||
import forestry.core.ISaveEventHandler;
|
||||
import forestry.core.blocks.BlockCore;
|
||||
import forestry.core.blocks.BlockCoreType;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.LocalizedConfiguration;
|
||||
@@ -141,11 +139,6 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
|
||||
public static HiveRegistry hiveRegistry;
|
||||
|
||||
private static MachineDefinition definitionApiary;
|
||||
private static MachineDefinition definitionChestLegacy;
|
||||
private static MachineDefinition definitionChest;
|
||||
private static MachineDefinition definitionBeehouse;
|
||||
|
||||
private final Map<String, String[]> defaultAcceptedFlowers = new HashMap<>();
|
||||
private final Map<String, String[]> defaultPlantableFlowers = new HashMap<>();
|
||||
|
||||
@@ -190,19 +183,13 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
definitionApiary = new MachineDefinition(BlockApiculture.Type.APIARY.ordinal(), "forestry.Apiary", TileApiary.class)
|
||||
.setFaces(0, 1, 2, 2, 4, 4, 0, 7);
|
||||
blocks.apiculture.addDefinition(definitionApiary);
|
||||
blocks.apiculture.addDefinitions(
|
||||
new MachineDefinition(BlockApicultureType.APIARY).setFaces(0, 1, 2, 2, 4, 4, 0, 7),
|
||||
new MachineDefinition(BlockApicultureType.APIARIST_CHEST_LEGACY).setLegacy(),
|
||||
new MachineDefinition(BlockApicultureType.BEEHOUSE).setFaces(0, 1, 2, 2, 4, 4, 0, 7)
|
||||
);
|
||||
|
||||
definitionChestLegacy = new MachineDefinition(BlockApiculture.Type.APIARIST_CHEST_LEGACY.ordinal(), "forestry.ApiaristChest", TileApiaristChest.class)
|
||||
.setLegacy();
|
||||
blocks.apiculture.addDefinition(definitionChestLegacy);
|
||||
|
||||
definitionBeehouse = new MachineDefinition(BlockApiculture.Type.BEEHOUSE.ordinal(), "forestry.Beehouse", TileBeehouse.class)
|
||||
.setFaces(0, 1, 2, 2, 4, 4, 0, 7);
|
||||
blocks.apiculture.addDefinition(definitionBeehouse);
|
||||
|
||||
definitionChest = new MachineDefinition(0, "forestry.ApiaristChestNew", TileApiaristChest.class, Proxies.render.getRenderChest("apiaristchest"))
|
||||
MachineDefinition definitionChest = new MachineDefinition(0, "forestry.ApiaristChestNew", TileApiaristChest.class, Proxies.render.getRenderChest("apiaristchest"))
|
||||
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||
blocks.apicultureChest.addDefinition(definitionChest);
|
||||
|
||||
@@ -326,10 +313,8 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
|
||||
proxy.initializeRendering();
|
||||
|
||||
definitionApiary.register();
|
||||
definitionBeehouse.register();
|
||||
definitionChestLegacy.register();
|
||||
definitionChest.register();
|
||||
blocks.apiculture.registerDefinitions();
|
||||
blocks.apicultureChest.registerDefinitions();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -487,12 +472,12 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
RecipeUtil.addRecipe(items.minecartBeehouse.getBeeHouseMinecart(),
|
||||
"B",
|
||||
"C",
|
||||
'B', blocks.apiculture.get(BlockApiculture.Type.BEEHOUSE, 1),
|
||||
'B', blocks.apiculture.get(BlockApicultureType.BEEHOUSE, 1),
|
||||
'C', Items.minecart);
|
||||
RecipeUtil.addRecipe(items.minecartBeehouse.getApiaryMinecart(),
|
||||
"B",
|
||||
"C",
|
||||
'B', blocks.apiculture.get(BlockApiculture.Type.APIARY, 1),
|
||||
'B', blocks.apiculture.get(BlockApicultureType.APIARY, 1),
|
||||
'C', Items.minecart);
|
||||
|
||||
// FOOD STUFF
|
||||
@@ -734,7 +719,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
}
|
||||
|
||||
// ANALYZER
|
||||
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCore.Type.ANALYZER, 1),
|
||||
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCoreType.ANALYZER, 1),
|
||||
"XTX",
|
||||
" Y ",
|
||||
"X X",
|
||||
@@ -742,7 +727,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'T', items.beealyzer,
|
||||
'X', "ingotBronze");
|
||||
|
||||
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApiculture.Type.APIARY, 1),
|
||||
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApicultureType.APIARY, 1),
|
||||
"XXX",
|
||||
"#C#",
|
||||
"###",
|
||||
@@ -758,7 +743,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'X', "beeComb",
|
||||
'Y', "chestWood");
|
||||
|
||||
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApiculture.Type.BEEHOUSE, 1),
|
||||
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApicultureType.BEEHOUSE, 1),
|
||||
"XXX",
|
||||
"#C#",
|
||||
"###",
|
||||
|
||||
@@ -62,7 +62,7 @@ import forestry.arboriculture.tiles.TileLeaves;
|
||||
import forestry.arboriculture.tiles.TileSapling;
|
||||
import forestry.arboriculture.tiles.TileWood;
|
||||
import forestry.core.GuiHandlerBase;
|
||||
import forestry.core.blocks.BlockCore;
|
||||
import forestry.core.blocks.BlockCoreType;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.fluids.Fluids;
|
||||
@@ -87,7 +87,6 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
public static int modelIdLeaves;
|
||||
public static int modelIdPods;
|
||||
|
||||
private static MachineDefinition definitionChest;
|
||||
public static final List<Block> validFences = new ArrayList<>();
|
||||
|
||||
public static ItemRegistryArboriculture items;
|
||||
@@ -138,7 +137,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
WoodItemAccess.registerStairs(blocks.stairsFireproof, woodType, true);
|
||||
}
|
||||
|
||||
definitionChest = new MachineDefinition(BlockArboriculture.Type.ARBCHEST.ordinal(),
|
||||
MachineDefinition definitionChest = new MachineDefinition(BlockArboriculture.Type.ARBCHEST.ordinal(),
|
||||
"forestry.ArbChest", TileArboristChest.class, Proxies.render.getRenderChest("arbchest"))
|
||||
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||
blocks.arboriculture.addDefinition(definitionChest);
|
||||
@@ -170,7 +169,8 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
GameRegistry.registerTileEntity(TileLeaves.class, "forestry.Leaves");
|
||||
GameRegistry.registerTileEntity(TileWood.class, "forestry.Wood");
|
||||
GameRegistry.registerTileEntity(TileFruitPod.class, "forestry.Pods");
|
||||
definitionChest.register();
|
||||
|
||||
blocks.arboriculture.registerDefinitions();
|
||||
|
||||
if (Config.enableVillagers) {
|
||||
VillagerRegistry.instance().registerVillagerId(Constants.ID_VILLAGER_LUMBERJACK);
|
||||
@@ -320,7 +320,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
'#', "stickWood");
|
||||
|
||||
// ANALYZER
|
||||
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCore.Type.ANALYZER, 1),
|
||||
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCoreType.ANALYZER, 1),
|
||||
"XTX",
|
||||
" Y ",
|
||||
"X X",
|
||||
|
||||
@@ -33,7 +33,7 @@ import forestry.core.IPickupHandler;
|
||||
import forestry.core.ISaveEventHandler;
|
||||
import forestry.core.PickupHandlerCore;
|
||||
import forestry.core.SaveEventHandlerCore;
|
||||
import forestry.core.blocks.BlockCore;
|
||||
import forestry.core.blocks.BlockCoreType;
|
||||
import forestry.core.blocks.BlockRegistryCore;
|
||||
import forestry.core.blocks.BlockResourceOre;
|
||||
import forestry.core.blocks.BlockResourceStorage;
|
||||
@@ -66,13 +66,9 @@ import forestry.core.utils.ForestryModEnvWarningCallable;
|
||||
|
||||
@Plugin(pluginID = "Core", name = "Core", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.core.description")
|
||||
public class PluginCore extends ForestryPlugin {
|
||||
|
||||
private static MachineDefinition definitionEscritoire;
|
||||
|
||||
public static final RootCommand rootCommand = new RootCommand();
|
||||
public static ItemRegistryCore items;
|
||||
public static BlockRegistryCore blocks;
|
||||
static MachineDefinition definitionAnalyzer;
|
||||
|
||||
@Override
|
||||
protected void setupAPI() {
|
||||
@@ -106,11 +102,11 @@ public class PluginCore extends ForestryPlugin {
|
||||
rootCommand.addChildCommand(new CommandVersion());
|
||||
rootCommand.addChildCommand(new CommandPlugins());
|
||||
|
||||
definitionEscritoire = blocks.core.addDefinition(new MachineDefinition(BlockCore.Type.ESCRITOIRE.ordinal(), "forestry.Escritoire", TileEscritoire.class,
|
||||
Proxies.render.getRenderEscritoire()));
|
||||
|
||||
definitionAnalyzer = blocks.core.addDefinition(new MachineDefinition(BlockCore.Type.ANALYZER.ordinal(), "forestry.Analyzer", TileAnalyzer.class,
|
||||
PluginApiculture.proxy.getRendererAnalyzer(Constants.TEXTURE_PATH_BLOCKS + "/analyzer_")));
|
||||
blocks.core.addDefinitions(
|
||||
new MachineDefinition(BlockCoreType.ESCRITOIRE.ordinal(), "forestry.Escritoire", TileEscritoire.class, Proxies.render.getRenderEscritoire()),
|
||||
new MachineDefinition(BlockCoreType.ANALYZER.ordinal(), "forestry.Analyzer", TileAnalyzer.class,
|
||||
PluginApiculture.proxy.getRendererAnalyzer(Constants.TEXTURE_PATH_BLOCKS + "/analyzer_"))
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -119,7 +115,8 @@ public class PluginCore extends ForestryPlugin {
|
||||
|
||||
Proxies.render.init();
|
||||
|
||||
definitionEscritoire.register();
|
||||
blocks.core.registerDefinitions();
|
||||
|
||||
ForestryModEnvWarningCallable.register();
|
||||
|
||||
AlleleHelper.instance.init();
|
||||
@@ -128,13 +125,6 @@ public class PluginCore extends ForestryPlugin {
|
||||
RecipeSorter.register("forestry:shapelessrecipecustom", ShapelessRecipeCustom.class, RecipeSorter.Category.SHAPELESS, "before:minecraft:shapeless");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void postInit() {
|
||||
super.postInit();
|
||||
|
||||
definitionAnalyzer.register();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return true;
|
||||
|
||||
@@ -23,7 +23,6 @@ import forestry.core.config.Constants;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.core.tiles.MachineDefinition;
|
||||
import forestry.energy.GuiHandlerEnergy;
|
||||
import forestry.energy.blocks.BlockEngine;
|
||||
import forestry.energy.proxy.ProxyEnergy;
|
||||
@@ -37,9 +36,6 @@ public class PluginEnergy extends ForestryPlugin {
|
||||
|
||||
@SidedProxy(clientSide = "forestry.energy.proxy.ProxyEnergyClient", serverSide = "forestry.energy.proxy.ProxyEnergy")
|
||||
public static ProxyEnergy proxy;
|
||||
private static MachineDefinition definitionEnginePeat;
|
||||
private static MachineDefinition definitionEngineBiogas;
|
||||
private static MachineDefinition definitionEngineClockwork;
|
||||
|
||||
@Override
|
||||
protected void registerItemsAndBlocks() {
|
||||
@@ -50,23 +46,22 @@ public class PluginEnergy extends ForestryPlugin {
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
EngineDefinition definitionEnginePeat = new EngineDefinition(Constants.DEFINITION_ENGINE_PEAT_META, "forestry.EngineCopper", TileEnginePeat.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_copper_"));
|
||||
((BlockBase) ForestryBlock.engine.block()).addDefinition(definitionEnginePeat);
|
||||
|
||||
definitionEnginePeat = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_PEAT_META, "forestry.EngineCopper", TileEnginePeat.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_copper_")));
|
||||
definitionEngineBiogas = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_BIOGAS_META, "forestry.EngineBronze", TileEngineBiogas.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_bronze_")));
|
||||
definitionEngineClockwork = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_CLOCKWORK_META, "forestry.EngineClockwork", TileEngineClockwork.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_clock_")));
|
||||
EngineDefinition definitionEngineBiogas = new EngineDefinition(Constants.DEFINITION_ENGINE_BIOGAS_META, "forestry.EngineBronze", TileEngineBiogas.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_bronze_"));
|
||||
((BlockBase) ForestryBlock.engine.block()).addDefinition(definitionEngineBiogas);
|
||||
|
||||
EngineDefinition definitionEngineClockwork = new EngineDefinition(Constants.DEFINITION_ENGINE_CLOCKWORK_META, "forestry.EngineClockwork", TileEngineClockwork.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_clock_"));
|
||||
((BlockBase) ForestryBlock.engine.block()).addDefinition(definitionEngineClockwork);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doInit() {
|
||||
super.doInit();
|
||||
|
||||
definitionEnginePeat.register();
|
||||
definitionEngineBiogas.register();
|
||||
definitionEngineClockwork.register();
|
||||
((BlockBase) ForestryBlock.engine.block()).registerDefinitions();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,6 @@ package forestry.plugins;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -34,23 +33,18 @@ import forestry.api.recipes.ICraftingProvider;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.apiculture.items.ItemRegistryApiculture;
|
||||
import forestry.core.GuiHandlerBase;
|
||||
import forestry.core.blocks.BlockBase;
|
||||
import forestry.core.blocks.BlockCore;
|
||||
import forestry.core.blocks.BlockCoreType;
|
||||
import forestry.core.blocks.BlockSoil;
|
||||
import forestry.core.circuits.Circuit;
|
||||
import forestry.core.circuits.CircuitLayout;
|
||||
import forestry.core.circuits.EnumCircuitBoardType;
|
||||
import forestry.core.circuits.ItemCircuitBoard;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.core.items.EnumElectronTube;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import forestry.core.items.ItemBlockNBT;
|
||||
import forestry.core.items.ItemElectronTube;
|
||||
import forestry.core.items.ItemRegistryCore;
|
||||
import forestry.core.network.IPacketRegistry;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.core.recipes.craftguide.CraftGuideIntegration;
|
||||
import forestry.core.tiles.MachineDefinition;
|
||||
@@ -60,6 +54,9 @@ import forestry.core.utils.datastructures.FluidMap;
|
||||
import forestry.core.utils.datastructures.ItemStackMap;
|
||||
import forestry.factory.DummyManagers;
|
||||
import forestry.factory.GuiHandlerFactory;
|
||||
import forestry.factory.blocks.BlockFactoryPlainType;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.factory.blocks.BlockRegistryFactory;
|
||||
import forestry.factory.circuits.CircuitSpeedUpgrade;
|
||||
import forestry.factory.network.PacketRegistryFactory;
|
||||
import forestry.factory.recipes.CarpenterRecipeManager;
|
||||
@@ -70,17 +67,6 @@ import forestry.factory.recipes.FermenterRecipeManager;
|
||||
import forestry.factory.recipes.MoistenerRecipeManager;
|
||||
import forestry.factory.recipes.SqueezerRecipeManager;
|
||||
import forestry.factory.recipes.StillRecipeManager;
|
||||
import forestry.factory.tiles.TileBottler;
|
||||
import forestry.factory.tiles.TileCarpenter;
|
||||
import forestry.factory.tiles.TileCentrifuge;
|
||||
import forestry.factory.tiles.TileFabricator;
|
||||
import forestry.factory.tiles.TileFermenter;
|
||||
import forestry.factory.tiles.TileMillRainmaker;
|
||||
import forestry.factory.tiles.TileMoistener;
|
||||
import forestry.factory.tiles.TileRaintank;
|
||||
import forestry.factory.tiles.TileSqueezer;
|
||||
import forestry.factory.tiles.TileStill;
|
||||
import forestry.factory.tiles.TileWorktable;
|
||||
import forestry.factory.triggers.FactoryTriggers;
|
||||
|
||||
@Plugin(pluginID = "Factory", name = "Factory", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.factory.description")
|
||||
@@ -98,6 +84,8 @@ public class PluginFactory extends ForestryPlugin {
|
||||
private static MachineDefinition definitionRaintank;
|
||||
private static MachineDefinition definitionWorktable;
|
||||
|
||||
public static BlockRegistryFactory blocks;
|
||||
|
||||
@Override
|
||||
protected void setupAPI() {
|
||||
super.setupAPI();
|
||||
@@ -145,10 +133,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
|
||||
@Override
|
||||
protected void registerItemsAndBlocks() {
|
||||
super.registerItemsAndBlocks();
|
||||
|
||||
ForestryBlock.factoryTESR.registerBlock(new BlockBase(Material.iron, true), ItemBlockForestry.class, "factory");
|
||||
ForestryBlock.factoryPlain.registerBlock(new BlockBase(Material.iron), ItemBlockNBT.class, "factory2");
|
||||
blocks = new BlockRegistryFactory();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -208,42 +193,16 @@ public class PluginFactory extends ForestryPlugin {
|
||||
FuelManager.rainSubstrate.put(iodineCharge, new RainSubstrate(iodineCharge, Constants.RAINMAKER_RAIN_DURATION_IODINE, 0.01f));
|
||||
FuelManager.rainSubstrate.put(dissipationCharge, new RainSubstrate(dissipationCharge, 0.075f));
|
||||
|
||||
BlockBase factoryTESR = ((BlockBase) ForestryBlock.factoryTESR.block());
|
||||
for (BlockFactoryTesrType type : BlockFactoryTesrType.VALUES) {
|
||||
MachineDefinition machineDefinition = new MachineDefinition(type);
|
||||
blocks.factoryTESR.addDefinition(machineDefinition);
|
||||
}
|
||||
|
||||
definitionBottler = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_BOTTLER_META, "forestry.Bottler", TileBottler.class,
|
||||
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/bottler_")));
|
||||
|
||||
definitionCarpenter = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_CARPENTER_META, "forestry.Carpenter", TileCarpenter.class,
|
||||
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/carpenter_")));
|
||||
|
||||
definitionCentrifuge = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_CENTRIFUGE_META, "forestry.Centrifuge", TileCentrifuge.class,
|
||||
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/centrifuge_")));
|
||||
|
||||
definitionFermenter = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_FERMENTER_META, "forestry.Fermenter", TileFermenter.class,
|
||||
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/fermenter_")));
|
||||
|
||||
definitionMoistener = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_MOISTENER_META, "forestry.Moistener", TileMoistener.class,
|
||||
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/moistener_")));
|
||||
|
||||
definitionSqueezer = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_SQUEEZER_META, "forestry.Squeezer", TileSqueezer.class,
|
||||
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/squeezer_")));
|
||||
|
||||
definitionStill = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_STILL_META, "forestry.Still", TileStill.class,
|
||||
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/still_")));
|
||||
|
||||
definitionRainmaker = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_RAINMAKER_META, "forestry.Rainmaker", TileMillRainmaker.class,
|
||||
Proxies.render.getRenderMill(Constants.TEXTURE_PATH_BLOCKS + "/rainmaker_")));
|
||||
|
||||
BlockBase factoryPlain = ((BlockBase) ForestryBlock.factoryPlain.block());
|
||||
|
||||
definitionFabricator = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_FABRICATOR_META, "forestry.Fabricator", TileFabricator.class)
|
||||
.setFaces(0, 1, 2, 3, 4, 4));
|
||||
|
||||
definitionRaintank = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_RAINTANK_META, "forestry.Raintank", TileRaintank.class)
|
||||
.setFaces(0, 1, 0, 0, 0, 0));
|
||||
|
||||
definitionWorktable = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_WORKTABLE_META, "forestry.Worktable", TileWorktable.class)
|
||||
.setFaces(0, 1, 2, 3, 4, 4));
|
||||
blocks.factoryPlain.addDefinitions(
|
||||
new MachineDefinition(BlockFactoryPlainType.FABRICATOR).setFaces(0, 1, 2, 3, 4, 4),
|
||||
new MachineDefinition(BlockFactoryPlainType.RAINTANK).setFaces(0, 1, 0, 0, 0, 0),
|
||||
new MachineDefinition(BlockFactoryPlainType.WORKTABLE).setFaces(0, 1, 2, 3, 4, 4)
|
||||
);
|
||||
|
||||
ICircuitLayout layoutMachineUpgrade = new CircuitLayout("machine.upgrade", CircuitSocketType.MACHINE);
|
||||
ChipsetManager.circuitRegistry.registerLayout(layoutMachineUpgrade);
|
||||
@@ -259,17 +218,8 @@ public class PluginFactory extends ForestryPlugin {
|
||||
public void doInit() {
|
||||
super.doInit();
|
||||
|
||||
definitionBottler.register();
|
||||
definitionCarpenter.register();
|
||||
definitionCentrifuge.register();
|
||||
definitionFabricator.register();
|
||||
definitionFermenter.register();
|
||||
definitionMoistener.register();
|
||||
definitionRaintank.register();
|
||||
definitionSqueezer.register();
|
||||
definitionStill.register();
|
||||
definitionRainmaker.register();
|
||||
definitionWorktable.register();
|
||||
blocks.factoryTESR.registerDefinitions();
|
||||
blocks.factoryPlain.registerDefinitions();
|
||||
|
||||
Circuit.machineSpeedUpgrade1 = new CircuitSpeedUpgrade("machine.speed.boost.1", 0.125f, 0.05f, 4);
|
||||
Circuit.machineSpeedUpgrade2 = new CircuitSpeedUpgrade("machine.speed.boost.2", 0.250f, 0.10f, 4);
|
||||
@@ -385,7 +335,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
"###",
|
||||
'#', "logWood");
|
||||
RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEEDOIL.getFluid(500), null,
|
||||
PluginCore.blocks.core.get(BlockCore.Type.ESCRITOIRE, 1),
|
||||
PluginCore.blocks.core.get(BlockCoreType.ESCRITOIRE, 1),
|
||||
"# ",
|
||||
"###",
|
||||
"# #",
|
||||
@@ -499,7 +449,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
ChipsetManager.solderManager.addRecipe(layout, PluginCore.items.tubes.get(EnumElectronTube.BLAZE, 1), Circuit.machineSpeedUpgrade2);
|
||||
ChipsetManager.solderManager.addRecipe(layout, PluginCore.items.tubes.get(EnumElectronTube.GOLD, 1), Circuit.machineEfficiencyUpgrade1);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_BOTTLER_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryTESR.get(BlockFactoryTesrType.BOTTLER),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
@@ -507,7 +457,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'X', PluginFluids.items.canEmpty,
|
||||
'Y', PluginCore.items.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CARPENTER_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryTESR.get(BlockFactoryTesrType.CARPENTER),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
@@ -515,7 +465,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'X', "ingotBronze",
|
||||
'Y', PluginCore.items.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CENTRIFUGE_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryTESR.get(BlockFactoryTesrType.CENTRIFUGE),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
@@ -523,7 +473,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'X', "ingotCopper",
|
||||
'Y', PluginCore.items.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_FERMENTER_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryTESR.get(BlockFactoryTesrType.FERMENTER),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
@@ -531,7 +481,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'X', "gearBronze",
|
||||
'Y', PluginCore.items.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_MOISTENER_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryTESR.get(BlockFactoryTesrType.MOISTENER),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
@@ -539,7 +489,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'X', "gearCopper",
|
||||
'Y', PluginCore.items.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_SQUEEZER_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryTESR.get(BlockFactoryTesrType.SQUEEZER),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
@@ -547,7 +497,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'X', "ingotTin",
|
||||
'Y', PluginCore.items.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_STILL_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryTESR.get(BlockFactoryTesrType.STILL),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
@@ -555,7 +505,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'X', "dustRedstone",
|
||||
'Y', PluginCore.items.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_RAINMAKER_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryTESR.get(BlockFactoryTesrType.RAINMAKER),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
@@ -563,7 +513,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'X', "gearTin",
|
||||
'Y', PluginCore.items.hardenedCasing);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_FABRICATOR_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryPlain.get(BlockFactoryPlainType.FABRICATOR),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"XZX",
|
||||
@@ -572,7 +522,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'Y', PluginCore.items.sturdyCasing,
|
||||
'Z', "chestWood");
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_RAINTANK_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryPlain.get(BlockFactoryPlainType.RAINTANK),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
@@ -580,7 +530,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
'X', "ingotIron",
|
||||
'Y', PluginCore.items.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_WORKTABLE_META),
|
||||
RecipeUtil.addRecipe(blocks.factoryPlain.get(BlockFactoryPlainType.WORKTABLE),
|
||||
"B",
|
||||
"W",
|
||||
"C",
|
||||
|
||||
@@ -88,6 +88,11 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
public void preInit() {
|
||||
ButterflyBranchDefinition.createAlleles();
|
||||
AlleleButterflyEffect.createAlleles();
|
||||
|
||||
BlockBase lepidopterology = ((BlockBase) ForestryBlock.lepidopterology.block());
|
||||
MachineDefinition definitionChest = new MachineDefinition(Constants.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class, Proxies.render.getRenderChest("lepichest"))
|
||||
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||
lepidopterology.addDefinition(definitionChest);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -110,10 +115,7 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
MothDefinition.initMoths();
|
||||
ButterflyDefinition.initButterflies();
|
||||
|
||||
BlockBase lepidopterology = ((BlockBase) ForestryBlock.lepidopterology.block());
|
||||
MachineDefinition definitionChest = lepidopterology.addDefinition(new MachineDefinition(Constants.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class, Proxies.render.getRenderChest("lepichest"))
|
||||
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F));
|
||||
definitionChest.register();
|
||||
((BlockBase) ForestryBlock.lepidopterology.block()).registerDefinitions();
|
||||
|
||||
TreeManager.treeRoot.registerLeafTickHandler(new ButterflySpawner());
|
||||
|
||||
|
||||
@@ -40,18 +40,10 @@ import forestry.mail.commands.CommandMail;
|
||||
import forestry.mail.items.EnumStampDefinition;
|
||||
import forestry.mail.items.ItemRegistryMail;
|
||||
import forestry.mail.network.PacketRegistryMail;
|
||||
import forestry.mail.tiles.TileMailbox;
|
||||
import forestry.mail.tiles.TileStampCollector;
|
||||
import forestry.mail.tiles.TileTrader;
|
||||
import forestry.mail.triggers.MailTriggers;
|
||||
|
||||
@Plugin(pluginID = "Mail", name = "Mail", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.mail.description")
|
||||
public class PluginMail extends ForestryPlugin {
|
||||
|
||||
private static MachineDefinition definitionMailbox;
|
||||
private static MachineDefinition definitionTradestation;
|
||||
private static MachineDefinition definitionStampColletor;
|
||||
|
||||
public static ItemRegistryMail items;
|
||||
public static BlockRegistryMail blocks;
|
||||
|
||||
@@ -80,17 +72,11 @@ public class PluginMail extends ForestryPlugin {
|
||||
FMLCommonHandler.instance().bus().register(new TickHandlerMailClient());
|
||||
}
|
||||
|
||||
definitionMailbox = new MachineDefinition(BlockMailType.MAILBOX.ordinal(), "forestry.Mailbox", TileMailbox.class)
|
||||
.setFaces(0, 1, 2, 2, 2, 2, 0, 7);
|
||||
blocks.mail.addDefinition(definitionMailbox);
|
||||
|
||||
definitionTradestation = new MachineDefinition(BlockMailType.TRADE_STATION.ordinal(), "forestry.Tradestation", TileTrader.class)
|
||||
.setFaces(0, 1, 2, 3, 4, 4, 0, 7);
|
||||
blocks.mail.addDefinition(definitionTradestation);
|
||||
|
||||
definitionStampColletor = new MachineDefinition(BlockMailType.STAMP_COLLECTOR.ordinal(), "forestry.Philatelist", TileStampCollector.class)
|
||||
.setFaces(0, 1, 2, 3, 2, 2, 0, 7);
|
||||
blocks.mail.addDefinition(definitionStampColletor);
|
||||
blocks.mail.addDefinitions(
|
||||
new MachineDefinition(BlockMailType.MAILBOX).setFaces(0, 1, 2, 2, 2, 2, 0, 7),
|
||||
new MachineDefinition(BlockMailType.TRADESTATION).setFaces(0, 1, 2, 3, 4, 4, 0, 7),
|
||||
new MachineDefinition(BlockMailType.PHILATELIST).setFaces(0, 1, 2, 3, 2, 2, 0, 7)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -102,9 +88,7 @@ public class PluginMail extends ForestryPlugin {
|
||||
public void doInit() {
|
||||
super.doInit();
|
||||
|
||||
definitionMailbox.register();
|
||||
definitionTradestation.register();
|
||||
definitionStampColletor.register();
|
||||
blocks.mail.registerDefinitions();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -172,7 +156,7 @@ public class PluginMail extends ForestryPlugin {
|
||||
'X', "chestWood",
|
||||
'Y', PluginCore.items.sturdyCasing);
|
||||
|
||||
RecipeUtil.addRecipe(blocks.mail.get(BlockMailType.TRADE_STATION),
|
||||
RecipeUtil.addRecipe(blocks.mail.get(BlockMailType.TRADESTATION),
|
||||
"Z#Z",
|
||||
"#Y#",
|
||||
"XWX",
|
||||
|
||||
@@ -74,11 +74,6 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
|
||||
public static PluginIC2 instance;
|
||||
|
||||
// Forestry stuff
|
||||
private static MachineDefinition definitionGenerator;
|
||||
private static MachineDefinition definitionEngineElectric;
|
||||
|
||||
// IC2 stuff
|
||||
private static ItemStack plantBall;
|
||||
private static ItemStack compressedPlantBall;
|
||||
private static ItemStack wrench;
|
||||
@@ -127,11 +122,13 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
definitionEngineElectric = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_ELECTRIC_META, "forestry.EngineTin", TileEngineElectric.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_tin_")));
|
||||
EngineDefinition definitionEngineElectric = new EngineDefinition(Constants.DEFINITION_ENGINE_ELECTRIC_META, "forestry.EngineTin", TileEngineElectric.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_tin_"));
|
||||
((BlockBase) ForestryBlock.engine.block()).addDefinition(definitionEngineElectric);
|
||||
|
||||
definitionGenerator = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_GENERATOR_META, "forestry.Generator", TileGenerator.class,
|
||||
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/generator_")));
|
||||
MachineDefinition definitionGenerator = new MachineDefinition(Constants.DEFINITION_GENERATOR_META, "forestry.Generator", TileGenerator.class,
|
||||
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/generator_"));
|
||||
((BlockBase) ForestryBlock.engine.block()).addDefinition(definitionGenerator);
|
||||
|
||||
emptyCell = IC2Items.getItem("cell");
|
||||
if (emptyCell != null) {
|
||||
@@ -182,8 +179,7 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
Log.severe("IC2 Recipes.recyclerBlacklist not found.");
|
||||
}
|
||||
|
||||
definitionEngineElectric.register();
|
||||
definitionGenerator.register();
|
||||
((BlockBase) ForestryBlock.engine.block()).registerDefinitions();
|
||||
|
||||
Circuit.energyElectricChoke1 = new CircuitElectricChoke("electric.choke.1");
|
||||
Circuit.energyElectricEfficiency1 = new CircuitElectricEfficiency("electric.efficiency.1");
|
||||
|
||||
Reference in new issue
Block a user