mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 20:42:35 +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
@@ -29,7 +29,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry.IVillageCreationHandler;
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler;
|
||||
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.apiculture.blocks.BlockApiculture;
|
||||
import forestry.apiculture.blocks.BlockApicultureType;
|
||||
import forestry.apiculture.genetics.BeeDefinition;
|
||||
import forestry.apiculture.worldgen.ComponentVillageBeeHouse;
|
||||
import forestry.core.utils.Log;
|
||||
@@ -54,7 +54,7 @@ public class VillageHandlerApiculture implements IVillageCreationHandler, IVilla
|
||||
ItemStack randomComb = PluginApiculture.items.beeComb.getRandomComb(1, random, false);
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Items.wheat, 2), randomComb));
|
||||
|
||||
ItemStack apiary = PluginApiculture.blocks.apiculture.get(BlockApiculture.Type.APIARY, 1);
|
||||
ItemStack apiary = PluginApiculture.blocks.apiculture.get(BlockApicultureType.APIARY, 1);
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Blocks.log, 24, OreDictionary.WILDCARD_VALUE), apiary));
|
||||
|
||||
ItemStack provenFrames = PluginApiculture.items.frameProven.getItemStack(6);
|
||||
|
||||
@@ -17,11 +17,6 @@ import forestry.api.core.Tabs;
|
||||
import forestry.core.blocks.BlockBase;
|
||||
|
||||
public class BlockApiculture extends BlockBase {
|
||||
public enum Type {
|
||||
APIARY,
|
||||
APIARIST_CHEST_LEGACY,
|
||||
BEEHOUSE;
|
||||
}
|
||||
|
||||
public BlockApiculture(Material material) {
|
||||
super(material);
|
||||
@@ -29,7 +24,7 @@ public class BlockApiculture extends BlockBase {
|
||||
setHarvestLevel("axe", 0);
|
||||
}
|
||||
|
||||
public ItemStack get(Type type, int amount) {
|
||||
public ItemStack get(BlockApicultureType type, int amount) {
|
||||
return new ItemStack(this, amount, type.ordinal());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*******************************************************************************
|
||||
* 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.apiculture.blocks;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import forestry.apiculture.tiles.TileApiaristChest;
|
||||
import forestry.apiculture.tiles.TileApiary;
|
||||
import forestry.apiculture.tiles.TileBeehouse;
|
||||
import forestry.core.blocks.IMachineProperties;
|
||||
import forestry.core.tiles.TileForestry;
|
||||
|
||||
public enum BlockApicultureType implements IMachineProperties {
|
||||
APIARY(TileApiary.class),
|
||||
APIARIST_CHEST_LEGACY(TileApiaristChest.class, "ApiaristChest"),
|
||||
BEEHOUSE(TileBeehouse.class);
|
||||
|
||||
public static final BlockApicultureType[] VALUES = values();
|
||||
|
||||
private final String teIdent;
|
||||
private final Class<? extends TileForestry> teClass;
|
||||
|
||||
BlockApicultureType(Class<? extends TileForestry> teClass) {
|
||||
String name = toString().toLowerCase(Locale.ENGLISH);
|
||||
this.teIdent = "forestry." + WordUtils.capitalize(name);
|
||||
this.teClass = teClass;
|
||||
}
|
||||
|
||||
BlockApicultureType(Class<? extends TileForestry> teClass, String name) {
|
||||
this.teIdent = "forestry." + name;
|
||||
this.teClass = teClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMeta() {
|
||||
return ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTeIdent() {
|
||||
return teIdent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends TileForestry> getTeClass() {
|
||||
return teClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGfxBase() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ import forestry.api.apiculture.IHiveFrame;
|
||||
import forestry.apiculture.ApiaryBeeListener;
|
||||
import forestry.apiculture.ApiaryBeeModifier;
|
||||
import forestry.apiculture.IApiary;
|
||||
import forestry.apiculture.blocks.BlockApiculture;
|
||||
import forestry.apiculture.blocks.BlockApicultureType;
|
||||
import forestry.apiculture.inventory.IApiaryInventory;
|
||||
import forestry.apiculture.inventory.InventoryApiary;
|
||||
import forestry.core.config.Config;
|
||||
@@ -80,7 +80,7 @@ public class EntityMinecartApiary extends EntityMinecartBeeHousingBase implement
|
||||
|
||||
@Override
|
||||
public int getDisplayTileData() {
|
||||
return BlockApiculture.Type.APIARY.ordinal();
|
||||
return BlockApicultureType.APIARY.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,7 +23,7 @@ import forestry.api.apiculture.IBeeListener;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.apiculture.BeehouseBeeModifier;
|
||||
import forestry.apiculture.InventoryBeeHousing;
|
||||
import forestry.apiculture.blocks.BlockApiculture;
|
||||
import forestry.apiculture.blocks.BlockApicultureType;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.inventory.IInventoryAdapter;
|
||||
import forestry.core.network.GuiId;
|
||||
@@ -62,7 +62,7 @@ public class EntityMinecartBeehouse extends EntityMinecartBeeHousingBase {
|
||||
|
||||
@Override
|
||||
public int getDisplayTileData() {
|
||||
return BlockApiculture.Type.BEEHOUSE.ordinal();
|
||||
return BlockApicultureType.BEEHOUSE.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,14 +38,14 @@ import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IFlower;
|
||||
import forestry.apiculture.blocks.BlockApiculture;
|
||||
import forestry.apiculture.blocks.BlockApicultureType;
|
||||
import forestry.apiculture.inventory.InventoryApiary;
|
||||
import forestry.apiculture.tiles.TileApiary;
|
||||
import forestry.arboriculture.worldgen.BlockTypeLog;
|
||||
import forestry.arboriculture.worldgen.BlockTypeVanillaStairs;
|
||||
import forestry.arboriculture.worldgen.BlockTypeWood;
|
||||
import forestry.arboriculture.worldgen.BlockTypeWoodStairs;
|
||||
import forestry.core.blocks.BlockCore;
|
||||
import forestry.core.blocks.BlockCoreType;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.tiles.TileUtil;
|
||||
import forestry.core.worldgen.BlockType;
|
||||
@@ -182,7 +182,7 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
|
||||
|
||||
// Escritoire
|
||||
if (random.nextInt(2) == 0) {
|
||||
IBlockType escritoireBlock = new BlockTypeTileForestry(PluginCore.blocks.core, BlockCore.Type.ESCRITOIRE.ordinal());
|
||||
IBlockType escritoireBlock = new BlockTypeTileForestry(PluginCore.blocks.core, BlockCoreType.ESCRITOIRE.ordinal());
|
||||
escritoireBlock.setDirection(getRotatedDirection(ForgeDirection.EAST));
|
||||
placeBlockAtCurrentPosition(world, escritoireBlock, 1, 1, 3, structBoundingBox);
|
||||
}
|
||||
@@ -294,7 +294,7 @@ public class ComponentVillageBeeHouse extends StructureVillagePieces.House1 {
|
||||
return;
|
||||
}
|
||||
|
||||
world.setBlock(xCoord, yCoord, zCoord, PluginApiculture.blocks.apiculture, BlockApiculture.Type.APIARY.ordinal(), Constants.FLAG_BLOCK_SYNCH);
|
||||
world.setBlock(xCoord, yCoord, zCoord, PluginApiculture.blocks.apiculture, BlockApicultureType.APIARY.ordinal(), Constants.FLAG_BLOCK_SYNCH);
|
||||
PluginApiculture.blocks.apiculture.onBlockAdded(world, xCoord, yCoord, zCoord);
|
||||
|
||||
TileApiary apiary = TileUtil.getTile(world, xCoord, yCoord, zCoord, TileApiary.class);
|
||||
|
||||
@@ -65,7 +65,13 @@ public class BlockBase extends BlockForestry {
|
||||
this.lightOpacity = this.isOpaqueCube() ? 255 : 0;
|
||||
}
|
||||
|
||||
public MachineDefinition addDefinition(MachineDefinition definition) {
|
||||
public void addDefinitions(MachineDefinition... definitions) {
|
||||
for (MachineDefinition definition : definitions) {
|
||||
addDefinition(definition);
|
||||
}
|
||||
}
|
||||
|
||||
public void addDefinition(MachineDefinition definition) {
|
||||
definition.setBlock(this);
|
||||
|
||||
while (definitions.size() <= definition.getMeta()) {
|
||||
@@ -73,8 +79,6 @@ public class BlockBase extends BlockForestry {
|
||||
}
|
||||
|
||||
definitions.set(definition.getMeta(), definition);
|
||||
|
||||
return definition;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -243,6 +247,12 @@ public class BlockBase extends BlockForestry {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public void registerDefinitions() {
|
||||
for (MachineDefinition def : definitions) {
|
||||
def.register();
|
||||
}
|
||||
}
|
||||
|
||||
/* TEXTURES */
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
|
||||
@@ -14,16 +14,12 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BlockCore extends BlockBase {
|
||||
public enum Type {
|
||||
ANALYZER,
|
||||
ESCRITOIRE;
|
||||
}
|
||||
|
||||
public BlockCore(Material material, boolean hasTESR) {
|
||||
super(material, hasTESR);
|
||||
}
|
||||
|
||||
public ItemStack get(Type type, int amount) {
|
||||
public ItemStack get(BlockCoreType type, int amount) {
|
||||
return new ItemStack(this, amount, type.ordinal());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* 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.core.blocks;
|
||||
|
||||
public enum BlockCoreType {
|
||||
ANALYZER,
|
||||
ESCRITOIRE;
|
||||
|
||||
public static final BlockCoreType[] VALUES = values();
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*******************************************************************************
|
||||
* 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.core.blocks;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import forestry.core.tiles.TileForestry;
|
||||
|
||||
public interface IMachineProperties {
|
||||
int getMeta();
|
||||
|
||||
String getTeIdent();
|
||||
|
||||
Class<? extends TileForestry> getTeClass();
|
||||
|
||||
@Nullable
|
||||
String getGfxBase();
|
||||
}
|
||||
@@ -55,19 +55,6 @@ public class Constants implements IForestryConstants {
|
||||
public static final int DEFINITION_GENERATOR_META = 3;
|
||||
public static final int DEFINITION_ENGINE_CLOCKWORK_META = 4;
|
||||
|
||||
public static final int DEFINITION_BOTTLER_META = 0;
|
||||
public static final int DEFINITION_CARPENTER_META = 1;
|
||||
public static final int DEFINITION_CENTRIFUGE_META = 2;
|
||||
public static final int DEFINITION_FERMENTER_META = 3;
|
||||
public static final int DEFINITION_MOISTENER_META = 4;
|
||||
public static final int DEFINITION_SQUEEZER_META = 5;
|
||||
public static final int DEFINITION_STILL_META = 6;
|
||||
public static final int DEFINITION_RAINMAKER_META = 7;
|
||||
|
||||
public static final int DEFINITION_FABRICATOR_META = 0;
|
||||
public static final int DEFINITION_RAINTANK_META = 1;
|
||||
public static final int DEFINITION_WORKTABLE_META = 2;
|
||||
|
||||
public static final int DEFINITION_LEPICHEST_META = 0;
|
||||
|
||||
// Item Ids
|
||||
|
||||
@@ -35,8 +35,6 @@ import forestry.plugins.PluginManager.Stage;
|
||||
*/
|
||||
public enum ForestryBlock {
|
||||
engine,
|
||||
factoryTESR,
|
||||
factoryPlain,
|
||||
lepidopterology;
|
||||
private Block block;
|
||||
|
||||
|
||||
@@ -89,6 +89,9 @@ public class ProxyRenderClient extends ProxyRender {
|
||||
|
||||
@Override
|
||||
public IBlockRenderer getRenderDefaultMachine(String gfxBase) {
|
||||
if (gfxBase == null) {
|
||||
return null;
|
||||
}
|
||||
return new RenderMachine(gfxBase);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.core.blocks.IMachineProperties;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.render.IBlockRenderer;
|
||||
import forestry.core.render.TextureManager;
|
||||
@@ -54,6 +55,10 @@ public class MachineDefinition {
|
||||
this(meta, teIdent, teClass, null);
|
||||
}
|
||||
|
||||
public MachineDefinition(IMachineProperties properties) {
|
||||
this(properties.getMeta(), properties.getTeIdent(), properties.getTeClass(), Proxies.render.getRenderDefaultMachine(properties.getGfxBase()));
|
||||
}
|
||||
|
||||
public MachineDefinition(int meta, String teIdent, Class<? extends TileForestry> teClass, IBlockRenderer renderer) {
|
||||
this.meta = meta;
|
||||
this.teIdent = teIdent;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*******************************************************************************
|
||||
* 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.factory.blocks;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.core.blocks.BlockBase;
|
||||
|
||||
public class BlockFactoryPlain extends BlockBase {
|
||||
public BlockFactoryPlain() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
public ItemStack get(BlockFactoryPlainType type) {
|
||||
return new ItemStack(this, 1, type.ordinal());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*******************************************************************************
|
||||
* 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.factory.blocks;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import forestry.core.blocks.IMachineProperties;
|
||||
import forestry.core.tiles.TileForestry;
|
||||
import forestry.factory.tiles.TileFabricator;
|
||||
import forestry.factory.tiles.TileRaintank;
|
||||
import forestry.factory.tiles.TileWorktable;
|
||||
|
||||
public enum BlockFactoryPlainType implements IMachineProperties {
|
||||
FABRICATOR(TileFabricator.class),
|
||||
RAINTANK(TileRaintank.class),
|
||||
WORKTABLE(TileWorktable.class);
|
||||
|
||||
public static final BlockFactoryPlainType[] VALUES = values();
|
||||
|
||||
private final String teIdent;
|
||||
private final Class<? extends TileForestry> teClass;
|
||||
|
||||
BlockFactoryPlainType(Class<? extends TileForestry> teClass) {
|
||||
String name = toString().toLowerCase(Locale.ENGLISH);
|
||||
this.teIdent = "forestry." + WordUtils.capitalize(name);
|
||||
this.teClass = teClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMeta() {
|
||||
return ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTeIdent() {
|
||||
return teIdent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends TileForestry> getTeClass() {
|
||||
return teClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGfxBase() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*******************************************************************************
|
||||
* 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.factory.blocks;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.core.blocks.BlockBase;
|
||||
|
||||
public class BlockFactoryTesr extends BlockBase {
|
||||
public BlockFactoryTesr() {
|
||||
super(Material.iron, true);
|
||||
}
|
||||
|
||||
public ItemStack get(BlockFactoryTesrType type) {
|
||||
return new ItemStack(this, 1, type.ordinal());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*******************************************************************************
|
||||
* 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.factory.blocks;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import forestry.core.blocks.IMachineProperties;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.tiles.TileForestry;
|
||||
import forestry.factory.tiles.TileBottler;
|
||||
import forestry.factory.tiles.TileCarpenter;
|
||||
import forestry.factory.tiles.TileCentrifuge;
|
||||
import forestry.factory.tiles.TileFermenter;
|
||||
import forestry.factory.tiles.TileMillRainmaker;
|
||||
import forestry.factory.tiles.TileMoistener;
|
||||
import forestry.factory.tiles.TileSqueezer;
|
||||
import forestry.factory.tiles.TileStill;
|
||||
|
||||
public enum BlockFactoryTesrType implements IMachineProperties {
|
||||
BOTTLER(TileBottler.class),
|
||||
CARPENTER(TileCarpenter.class),
|
||||
CENTRIFUGE(TileCentrifuge.class),
|
||||
FERMENTER(TileFermenter.class),
|
||||
MOISTENER(TileMoistener.class),
|
||||
SQUEEZER(TileSqueezer.class),
|
||||
STILL(TileStill.class),
|
||||
RAINMAKER(TileMillRainmaker.class);
|
||||
|
||||
public static final BlockFactoryTesrType[] VALUES = values();
|
||||
|
||||
private final String teIdent;
|
||||
private final Class<? extends TileForestry> teClass;
|
||||
private final String gfxBase;
|
||||
|
||||
BlockFactoryTesrType(Class<? extends TileForestry> teClass) {
|
||||
String name = toString().toLowerCase(Locale.ENGLISH);
|
||||
this.teIdent = "forestry." + WordUtils.capitalize(name);
|
||||
this.teClass = teClass;
|
||||
this.gfxBase = Constants.TEXTURE_PATH_BLOCKS + "/" + name + "_";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMeta() {
|
||||
return ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTeIdent() {
|
||||
return teIdent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends TileForestry> getTeClass() {
|
||||
return teClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGfxBase() {
|
||||
return gfxBase;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*******************************************************************************
|
||||
* 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.factory.blocks;
|
||||
|
||||
import forestry.core.blocks.BlockRegistry;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import forestry.core.items.ItemBlockNBT;
|
||||
|
||||
public class BlockRegistryFactory extends BlockRegistry {
|
||||
public final BlockFactoryTesr factoryTESR;
|
||||
public final BlockFactoryPlain factoryPlain;
|
||||
|
||||
public BlockRegistryFactory() {
|
||||
factoryTESR = registerBlock(new BlockFactoryTesr(), ItemBlockForestry.class, "factory");
|
||||
factoryPlain = registerBlock(new BlockFactoryPlain(), ItemBlockNBT.class, "factory2");
|
||||
}
|
||||
}
|
||||
@@ -14,9 +14,9 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.factory.recipes.BottlerRecipe;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
@@ -39,12 +39,11 @@ public class CraftGuideBottler implements RecipeProvider {
|
||||
|
||||
@Override
|
||||
public void generateRecipes(RecipeGenerator generator) {
|
||||
|
||||
if (ForestryBlock.factoryTESR.block() == null) {
|
||||
if (PluginFactory.blocks.factoryTESR == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack machine = ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_BOTTLER_META);
|
||||
ItemStack machine = PluginFactory.blocks.factoryTESR.get(BlockFactoryTesrType.BOTTLER);
|
||||
RecipeTemplate template = generator.createRecipeTemplate(slots, machine);
|
||||
|
||||
for (FluidContainerRegistry.FluidContainerData container : FluidContainerRegistry.getRegisteredFluidContainerData()) {
|
||||
|
||||
@@ -14,9 +14,9 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.ICarpenterRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
@@ -43,12 +43,11 @@ public class CraftGuideCarpenter implements RecipeProvider {
|
||||
|
||||
@Override
|
||||
public void generateRecipes(RecipeGenerator generator) {
|
||||
|
||||
if (ForestryBlock.factoryTESR.block() == null) {
|
||||
if (PluginFactory.blocks.factoryTESR == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack machine = ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CARPENTER_META);
|
||||
ItemStack machine = PluginFactory.blocks.factoryTESR.get(BlockFactoryTesrType.CARPENTER);
|
||||
RecipeTemplate template = generator.createRecipeTemplate(slots, machine);
|
||||
|
||||
for (ICarpenterRecipe recipe : RecipeManagers.carpenterManager.recipes()) {
|
||||
|
||||
@@ -18,8 +18,8 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.ICentrifugeRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
import uristqwerty.CraftGuide.api.ChanceSlot;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
@@ -46,11 +46,11 @@ public class CraftGuideCentrifuge implements RecipeProvider {
|
||||
@Override
|
||||
public void generateRecipes(RecipeGenerator generator) {
|
||||
|
||||
if (ForestryBlock.factoryTESR.block() == null) {
|
||||
if (PluginFactory.blocks.factoryTESR == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack machine = ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CENTRIFUGE_META);
|
||||
ItemStack machine = PluginFactory.blocks.factoryTESR.get(BlockFactoryTesrType.CENTRIFUGE);
|
||||
RecipeTemplate template = generator.createRecipeTemplate(slots, machine);
|
||||
|
||||
for (ICentrifugeRecipe recipe : RecipeManagers.centrifugeManager.recipes()) {
|
||||
|
||||
@@ -14,8 +14,8 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.IFabricatorRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.factory.blocks.BlockFactoryPlainType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
@@ -42,12 +42,11 @@ public class CraftGuideFabricator implements RecipeProvider {
|
||||
|
||||
@Override
|
||||
public void generateRecipes(RecipeGenerator generator) {
|
||||
|
||||
if (ForestryBlock.factoryTESR.block() == null) {
|
||||
if (PluginFactory.blocks.factoryPlain == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack machine = ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_FABRICATOR_META);
|
||||
ItemStack machine = PluginFactory.blocks.factoryPlain.get(BlockFactoryPlainType.FABRICATOR);
|
||||
RecipeTemplate template = generator.createRecipeTemplate(slots, machine);
|
||||
|
||||
for (IFabricatorRecipe recipe : RecipeManagers.fabricatorManager.recipes()) {
|
||||
|
||||
@@ -20,8 +20,8 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.api.recipes.IFermenterRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
@@ -46,11 +46,11 @@ public class CraftGuideFermenter implements RecipeProvider {
|
||||
@Override
|
||||
public void generateRecipes(RecipeGenerator generator) {
|
||||
|
||||
if (ForestryBlock.factoryTESR.block() == null) {
|
||||
if (PluginFactory.blocks.factoryTESR == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack machine = ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_FERMENTER_META);
|
||||
ItemStack machine = PluginFactory.blocks.factoryTESR.get(BlockFactoryTesrType.FERMENTER);
|
||||
RecipeTemplate template = generator.createRecipeTemplate(slots, machine);
|
||||
List<Object> fuels = new ArrayList<Object>(FuelManager.fermenterFuel.keySet());
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.ISqueezerRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
import uristqwerty.CraftGuide.api.ChanceSlot;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
@@ -44,11 +44,11 @@ public class CraftGuideSqueezer implements RecipeProvider {
|
||||
@Override
|
||||
public void generateRecipes(RecipeGenerator generator) {
|
||||
|
||||
if (ForestryBlock.factoryTESR.block() == null) {
|
||||
if (PluginFactory.blocks.factoryTESR == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack machine = ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_SQUEEZER_META);
|
||||
ItemStack machine = PluginFactory.blocks.factoryTESR.get(BlockFactoryTesrType.SQUEEZER);
|
||||
RecipeTemplate template = generator.createRecipeTemplate(slots, machine);
|
||||
|
||||
for (ISqueezerRecipe recipe : RecipeManagers.squeezerManager.recipes()) {
|
||||
|
||||
@@ -14,8 +14,8 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.IStillRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
@@ -37,12 +37,11 @@ public class CraftGuideStill implements RecipeProvider {
|
||||
|
||||
@Override
|
||||
public void generateRecipes(RecipeGenerator generator) {
|
||||
|
||||
if (ForestryBlock.factoryTESR.block() == null) {
|
||||
if (PluginFactory.blocks.factoryTESR == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStack machine = ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_STILL_META);
|
||||
ItemStack machine = PluginFactory.blocks.factoryTESR.get(BlockFactoryTesrType.STILL);
|
||||
RecipeTemplate template = generator.createRecipeTemplate(slots, machine);
|
||||
|
||||
for (IStillRecipe recipe : RecipeManagers.stillManager.recipes()) {
|
||||
|
||||
@@ -10,10 +10,49 @@
|
||||
******************************************************************************/
|
||||
package forestry.mail.blocks;
|
||||
|
||||
public enum BlockMailType {
|
||||
MAILBOX,
|
||||
TRADE_STATION,
|
||||
STAMP_COLLECTOR;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import forestry.core.blocks.IMachineProperties;
|
||||
import forestry.core.tiles.TileForestry;
|
||||
import forestry.mail.tiles.TileMailbox;
|
||||
import forestry.mail.tiles.TileStampCollector;
|
||||
import forestry.mail.tiles.TileTrader;
|
||||
|
||||
public enum BlockMailType implements IMachineProperties {
|
||||
MAILBOX(TileMailbox.class),
|
||||
TRADESTATION(TileTrader.class),
|
||||
PHILATELIST(TileStampCollector.class);
|
||||
|
||||
public static final BlockMailType[] VALUES = values();
|
||||
|
||||
private final String teIdent;
|
||||
private final Class<? extends TileForestry> teClass;
|
||||
|
||||
BlockMailType(Class<? extends TileForestry> teClass) {
|
||||
String name = toString().toLowerCase(Locale.ENGLISH);
|
||||
this.teIdent = "forestry." + WordUtils.capitalize(name);
|
||||
this.teClass = teClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMeta() {
|
||||
return ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTeIdent() {
|
||||
return teIdent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends TileForestry> getTeClass() {
|
||||
return teClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGfxBase() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -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