mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 19:29:17 +00:00
Add greenhouse recipes
This commit is contained in:
1 parent
b3a2d6cf84
commit
cbcadfbba7
8 files changed
+141
-8
No files matched your search
@@ -18,7 +18,6 @@ import forestry.arboriculture.WoodHelper.WoodMeshDefinition;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import net.minecraft.block.BlockFenceGate;
|
||||
import net.minecraft.block.BlockPlanks.EnumType;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -29,9 +28,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockArbFenceGate extends BlockFenceGate implements IWoodTyped, IItemModelRegister, IStateMapperRegister {
|
||||
public static final PropertyBool OPEN = PropertyBool.create("open");
|
||||
public static final PropertyBool POWERED = PropertyBool.create("powered");
|
||||
public static final PropertyBool IN_WALL = PropertyBool.create("in_wall");
|
||||
|
||||
private final boolean fireproof;
|
||||
private final EnumWoodType woodType;
|
||||
|
||||
@@ -23,7 +23,7 @@ import forestry.api.core.IModelManager;
|
||||
|
||||
public class ItemCraftingMaterial extends ItemForestry {
|
||||
|
||||
private final String[] definition = new String[]{"pulsatingDust", "pulsatingMesh", "silkWisp", "wovenSilk", "dissipationCharge", "iceShard", "scentedPaneling"};
|
||||
private final String[] definition = new String[]{"pulsatingDust", "pulsatingMesh", "silkWisp", "wovenSilk", "dissipationCharge", "iceShard", "scentedPaneling", "camouflagedPaneling" };
|
||||
|
||||
public ItemCraftingMaterial() {
|
||||
super();
|
||||
@@ -61,7 +61,7 @@ public class ItemCraftingMaterial extends ItemForestry {
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
for (int i = 0; i < definition.length; i++) {
|
||||
itemList.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
}
|
||||
@@ -93,4 +93,8 @@ public class ItemCraftingMaterial extends ItemForestry {
|
||||
public ItemStack getScentedPaneling() {
|
||||
return new ItemStack(this, 1, 6);
|
||||
}
|
||||
|
||||
public ItemStack getCamouflagedPaneling() {
|
||||
return new ItemStack(this, 1, 7);
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,17 @@
|
||||
******************************************************************************/
|
||||
package forestry.greenhouse;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.greenhouse.GreenhouseManager;
|
||||
import forestry.api.greenhouse.IGreenhouseAccess;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.PluginCore;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.core.items.EnumElectronTube;
|
||||
import forestry.core.network.IPacketRegistry;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.greenhouse.blocks.BlockGreenhouseType;
|
||||
import forestry.greenhouse.blocks.BlockRegistryGreenhouse;
|
||||
import forestry.greenhouse.logics.GreenhouseLogicGreenhouseDoor;
|
||||
import forestry.greenhouse.logics.GreenhouseLogicGreenhouseEffect;
|
||||
@@ -57,6 +64,119 @@ public class PluginGreenhouse extends BlankForestryPlugin {
|
||||
blocks = new BlockRegistryGreenhouse();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerRecipes() {
|
||||
|
||||
ItemStack greenhousePlainBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.PLAIN);
|
||||
RecipeUtil.addRecipe(greenhousePlainBlock,
|
||||
"###",
|
||||
"#X#",
|
||||
"###",
|
||||
'X', Blocks.brick_block,
|
||||
'#', PluginCore.items.craftingMaterial.getCamouflagedPaneling());
|
||||
|
||||
ItemStack greenhouseGlassBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.GLASS);
|
||||
RecipeUtil.addRecipe(greenhouseGlassBlock,
|
||||
"###",
|
||||
"#X#",
|
||||
"###",
|
||||
'X', "blockGlass",
|
||||
'#', PluginCore.items.craftingMaterial.getCamouflagedPaneling());
|
||||
|
||||
ItemStack greenhouseHatchInputBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.HATCH_INPUT);
|
||||
RecipeUtil.addRecipe(greenhouseHatchInputBlock,
|
||||
"TXT",
|
||||
"#H#",
|
||||
'X', blocks.getGreenhouseBlock(BlockGreenhouseType.PLAIN),
|
||||
'H', Blocks.trapdoor,
|
||||
'#', "gearTin",
|
||||
'T', PluginCore.items.tubes.get(EnumElectronTube.BRONZE, 1));
|
||||
|
||||
ItemStack greenhouseHatchOutputBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.HATCH_OUTPUT);
|
||||
RecipeUtil.addRecipe(greenhouseHatchOutputBlock,
|
||||
"#H#",
|
||||
"TXT",
|
||||
'X', blocks.getGreenhouseBlock(BlockGreenhouseType.PLAIN),
|
||||
'H', Blocks.trapdoor,
|
||||
'#', "gearTin",
|
||||
'T', PluginCore.items.tubes.get(EnumElectronTube.BRONZE, 1));
|
||||
|
||||
ItemStack greenhouseControlBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.CONTROL);
|
||||
RecipeUtil.addRecipe(greenhouseControlBlock,
|
||||
" X ",
|
||||
"#T#",
|
||||
'X', blocks.getGreenhouseBlock(BlockGreenhouseType.PLAIN),
|
||||
'#', "dustRedstone",
|
||||
'T', PluginCore.items.tubes.get(EnumElectronTube.GOLD, 1));
|
||||
|
||||
ItemStack greenhouseGearBoxBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.GEARBOX);
|
||||
RecipeUtil.addRecipe(greenhouseGearBoxBlock,
|
||||
" X ",
|
||||
"###",
|
||||
'X', blocks.getGreenhouseBlock(BlockGreenhouseType.PLAIN),
|
||||
'#', "gearTin");
|
||||
|
||||
ItemStack greenhouseValveBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.VALVE);
|
||||
RecipeUtil.addRecipe(greenhouseValveBlock,
|
||||
" X ",
|
||||
"#G#",
|
||||
'X', blocks.getGreenhouseBlock(BlockGreenhouseType.PLAIN),
|
||||
'#', "blockGlass",
|
||||
'G', "gearTin");
|
||||
|
||||
ItemStack greenhouseHeaterBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.HEATER);
|
||||
RecipeUtil.addRecipe(greenhouseHeaterBlock,
|
||||
"T#T",
|
||||
"#X#",
|
||||
"T#T",
|
||||
'X', blocks.getGreenhouseBlock(BlockGreenhouseType.PLAIN),
|
||||
'#', "ingotGold",
|
||||
'T', PluginCore.items.tubes.get(EnumElectronTube.GOLD, 1));
|
||||
|
||||
ItemStack greenhouseFanlock = blocks.getGreenhouseBlock(BlockGreenhouseType.FAN);
|
||||
RecipeUtil.addRecipe(greenhouseFanlock,
|
||||
"T#T",
|
||||
"#X#",
|
||||
"T#T",
|
||||
'X', blocks.getGreenhouseBlock(BlockGreenhouseType.PLAIN),
|
||||
'#', "ingotTin",
|
||||
'T', PluginCore.items.tubes.get(EnumElectronTube.TIN, 1));
|
||||
|
||||
ItemStack greenhouseDryerBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.DRYER);
|
||||
RecipeUtil.addRecipe(greenhouseDryerBlock,
|
||||
"T#T",
|
||||
"#X#",
|
||||
"T#T",
|
||||
'X', blocks.getGreenhouseBlock(BlockGreenhouseType.PLAIN),
|
||||
'#', "ingotBronze",
|
||||
'T', PluginCore.items.tubes.get(EnumElectronTube.BLAZE, 1));
|
||||
|
||||
ItemStack greenhouseSprinklerBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.SPRINKLER);
|
||||
RecipeUtil.addRecipe(greenhouseSprinklerBlock,
|
||||
"TXT",
|
||||
" I ",
|
||||
"III",
|
||||
'X', blocks.getGreenhouseBlock(BlockGreenhouseType.GLASS),
|
||||
'I', "ingotIron",
|
||||
'T', PluginCore.items.tubes.get(EnumElectronTube.LAPIS, 1));
|
||||
|
||||
ItemStack greenhouseDoorBlock = blocks.getGreenhouseBlock(BlockGreenhouseType.DOOR);
|
||||
RecipeUtil.addRecipe(greenhouseDoorBlock,
|
||||
true,
|
||||
"GG ",
|
||||
"GG ",
|
||||
"GG ",
|
||||
'G', blocks.getGreenhouseBlock(BlockGreenhouseType.GLASS));
|
||||
if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.FACTORY)) {
|
||||
RecipeManagers.carpenterManager.addRecipe(50, Fluids.BIOMASS.getFluid(500), null, PluginCore.items.craftingMaterial.getCamouflagedPaneling(),
|
||||
" A ", "###", "RPR",
|
||||
'#', "plankWood",
|
||||
'A', "dustAsh",
|
||||
'R', "dustRedstone",
|
||||
'P', "pulpWood");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doInit() {
|
||||
super.doInit();
|
||||
|
||||
@@ -103,7 +103,7 @@ public enum BlockGreenhouseType {
|
||||
case GEARBOX:
|
||||
return sprites.get(BlockGreenhouseSprites.GEARS);
|
||||
case VALVE:
|
||||
return sprites.get(BlockGreenhouseSprites.VALUES);
|
||||
return sprites.get(BlockGreenhouseSprites.VALVE);
|
||||
case FAN:
|
||||
if(state == null || state.getValue(BlockGreenhouse.STATE) == State.OFF) {
|
||||
return sprites.get(BlockGreenhouseSprites.FAN_OFF);
|
||||
|
||||
Reference in new issue
Block a user