From 252a08f4166708c1edf0b82f15943cd73dc2fdeb Mon Sep 17 00:00:00 2001 From: Nedelosk Date: Fri, 18 Mar 2016 23:56:20 +0100 Subject: [PATCH] Add missing files --- .../java/forestry/api/core/ICamouflageHandler.java | 10 +++++++--- .../java/forestry/api/core/ICamouflagedBlock.java | 9 +++++++-- .../forestry/api/greenhouse/GreenhouseManager.java | 2 ++ .../forestry/api/greenhouse/IGreenhouseHousing.java | 13 +++++++++++-- .../java/forestry/greenhouse/PluginGreenhouse.java | 1 + .../multiblock/FakeGreenhouseController.java | 6 ++++++ .../multiblock/IGreenhouseControllerInternal.java | 3 +++ 7 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/main/java/forestry/api/core/ICamouflageHandler.java b/src/main/java/forestry/api/core/ICamouflageHandler.java index 8f1c3f315..925b960e9 100644 --- a/src/main/java/forestry/api/core/ICamouflageHandler.java +++ b/src/main/java/forestry/api/core/ICamouflageHandler.java @@ -4,16 +4,20 @@ * This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details. ******************************************************************************/ package forestry.api.core; - -import forestry.core.tiles.ILocatable; import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; -public interface ICamouflageHandler extends ILocatable { +public interface ICamouflageHandler{ ItemStack getCamouflageBlock(EnumCamouflageType type); ItemStack getDefaultCamouflageBlock(EnumCamouflageType type); void setCamouflageBlock(EnumCamouflageType type, ItemStack camouflageBlock); + + BlockPos getCoordinates(); + + World getWorld(); } diff --git a/src/main/java/forestry/api/core/ICamouflagedBlock.java b/src/main/java/forestry/api/core/ICamouflagedBlock.java index ac5b0e1d1..ddb85d373 100644 --- a/src/main/java/forestry/api/core/ICamouflagedBlock.java +++ b/src/main/java/forestry/api/core/ICamouflagedBlock.java @@ -5,10 +5,15 @@ ******************************************************************************/ package forestry.api.core; -import forestry.core.tiles.ILocatable; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; -public interface ICamouflagedBlock extends ILocatable { +public interface ICamouflagedBlock { EnumCamouflageType getCamouflageType(); + BlockPos getCoordinates(); + + World getWorld(); + } diff --git a/src/main/java/forestry/api/greenhouse/GreenhouseManager.java b/src/main/java/forestry/api/greenhouse/GreenhouseManager.java index 004443db5..11b635b10 100644 --- a/src/main/java/forestry/api/greenhouse/GreenhouseManager.java +++ b/src/main/java/forestry/api/greenhouse/GreenhouseManager.java @@ -12,6 +12,8 @@ public class GreenhouseManager { public static IGreenhouseAccess greenhouseAccess; + public static IGreenhouseHelper greenhouseHelper; + public static List> greenhouseLogics = new ArrayList(); } diff --git a/src/main/java/forestry/api/greenhouse/IGreenhouseHousing.java b/src/main/java/forestry/api/greenhouse/IGreenhouseHousing.java index 13cfefb52..b16b8d953 100644 --- a/src/main/java/forestry/api/greenhouse/IGreenhouseHousing.java +++ b/src/main/java/forestry/api/greenhouse/IGreenhouseHousing.java @@ -5,13 +5,22 @@ ******************************************************************************/ package forestry.api.greenhouse; +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; import forestry.api.core.IErrorLogicSource; -import forestry.core.tiles.IClimatised; import net.minecraft.util.BlockPos; import net.minecraft.world.World; -public interface IGreenhouseHousing extends IErrorLogicSource, IClimatised { +public interface IGreenhouseHousing extends IErrorLogicSource { + EnumTemperature getTemperature(); + + EnumHumidity getHumidity(); + + float getExactTemperature(); + + float getExactHumidity(); + World getWorld(); boolean isInGreenhouse(BlockPos pos); diff --git a/src/main/java/forestry/greenhouse/PluginGreenhouse.java b/src/main/java/forestry/greenhouse/PluginGreenhouse.java index 9bc8619d6..3c5185d92 100644 --- a/src/main/java/forestry/greenhouse/PluginGreenhouse.java +++ b/src/main/java/forestry/greenhouse/PluginGreenhouse.java @@ -48,6 +48,7 @@ public class PluginGreenhouse extends BlankForestryPlugin { @Override public void setupAPI() { GreenhouseManager.greenhouseAccess = new GreenhouseAccess(); + GreenhouseManager.greenhouseHelper = new GreenhouseHelper(); } @Override diff --git a/src/main/java/forestry/greenhouse/multiblock/FakeGreenhouseController.java b/src/main/java/forestry/greenhouse/multiblock/FakeGreenhouseController.java index 2b71c9b80..ccef36bb3 100644 --- a/src/main/java/forestry/greenhouse/multiblock/FakeGreenhouseController.java +++ b/src/main/java/forestry/greenhouse/multiblock/FakeGreenhouseController.java @@ -16,6 +16,7 @@ import java.util.List; import forestry.api.core.EnumCamouflageType; import forestry.api.greenhouse.EnumGreenhouseChangeType; import forestry.api.greenhouse.IGreenhouseLogic; +import forestry.api.greenhouse.IGreenhouseState; import forestry.core.fluids.FakeTankManager; import forestry.core.fluids.ITankManager; import forestry.core.inventory.FakeInventoryAdapter; @@ -92,4 +93,9 @@ public class FakeGreenhouseController extends FakeMultiblockController implement public void addHumidityChange(float change, float boundaryDown, float boundaryUp) { } + @Override + public IGreenhouseState createState() { + return null; + } + } diff --git a/src/main/java/forestry/greenhouse/multiblock/IGreenhouseControllerInternal.java b/src/main/java/forestry/greenhouse/multiblock/IGreenhouseControllerInternal.java index 675b1ff39..42b8d0046 100644 --- a/src/main/java/forestry/greenhouse/multiblock/IGreenhouseControllerInternal.java +++ b/src/main/java/forestry/greenhouse/multiblock/IGreenhouseControllerInternal.java @@ -12,6 +12,7 @@ package forestry.greenhouse.multiblock; import javax.annotation.Nullable; +import forestry.api.greenhouse.IGreenhouseState; import forestry.api.multiblock.IGreenhouseController; import forestry.core.access.IRestrictedAccess; import forestry.core.fluids.ITankManager; @@ -29,6 +30,8 @@ public interface IGreenhouseControllerInternal extends IGreenhouseController, IM @Nullable EnergyManager getEnergyManager(); + IGreenhouseState createState(); + void createLogics(); }