Adding Greenhouse windows and climate control and improve recipes

This commit is contained in:
Nedelosk committed 2016-08-24 00:33:53 +02:00
1 parent 27d932ee34
commit a20fbbe60f
121 files changed
+3088 -802

No files matched your search

@@ -7,11 +7,11 @@ package forestry.api.apiculture;
import javax.annotation.Nonnull;
import forestry.api.core.IClimateProvider;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import com.mojang.authlib.GameProfile;
import forestry.api.climate.IClimateProvider;
import forestry.api.core.IErrorLogicSource;
import forestry.api.genetics.IHousing;
@@ -0,0 +1,7 @@
package forestry.api.climate;
public enum EnumClimatiserModes {
POSITIVE, NEGATIVE, NONE
}
@@ -0,0 +1,7 @@
package forestry.api.climate;
public enum EnumClimatiserTypes {
TEMPERATURE, HUMIDITY, NONE
}
@@ -0,0 +1,18 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
public interface IClimateControl {
float getControlTemperature();
float getControlHumidity();
void setControlTemperature(float temperature);
void setControlHumidity(float humidity);
}
@@ -0,0 +1,19 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IClimateControlProvider {
IClimateControl getClimateControl();
World getWorld();
BlockPos getCoordinates();
}
@@ -3,7 +3,7 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.core.climate;
package forestry.api.climate;
public interface IClimateControlled {
/**
@@ -3,7 +3,7 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.core.climate;
package forestry.api.climate;
import java.util.List;
import java.util.Map;
@@ -11,7 +11,6 @@ import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import forestry.api.core.IClimateProvider;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -27,9 +26,9 @@ public interface IClimateManager {
void removeRegion(IClimateRegion region);
void addSource(IClimateSource source);
void addSource(IClimateSourceProvider source);
void removeSource(IClimateSource source);
void removeSource(IClimateSourceProvider source);
@Nullable
IClimateRegion getRegionForPos(World world, BlockPos pos);
@@ -37,7 +36,4 @@ public interface IClimateManager {
@Nonnull
Map<Integer, List<IClimateRegion>> getRegions();
@Nonnull
Map<Integer, Map<BlockPos, IClimateSource>> getSources();
}
@@ -3,7 +3,7 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.core.climate;
package forestry.api.climate;
import javax.annotation.Nonnull;
@@ -0,0 +1,18 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import net.minecraft.world.biome.Biome;
public interface IClimateProvider {
Biome getBiome();
EnumTemperature getTemperature();
EnumHumidity getHumidity();
}
@@ -3,9 +3,9 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.core.climate;
package forestry.api.climate;
import java.util.List;
import java.util.Collection;
import java.util.Map;
import javax.annotation.Nonnull;
@@ -21,15 +21,25 @@ public interface IClimateRegion extends INbtReadable, INbtWritable {
World getWorld();
/**
* Update the climate in a region, all 20 world ticks.
* Update the climate in a region.
*/
void updateClimate();
void updateClimate(int ticks);
int getTicksPerUpdate();
@Nonnull
Map<BlockPos, IClimatePosition> getPositions();
int getTicksPerUpdate();
void addSource(IClimateSource source);
List<BlockPos> getOtherPositions();
void removeSource(IClimateSource source);
Collection<IClimateSource> getSources();
Collection<BlockPos> getOtherPositions();
float getTemperature();
float getHumidity();
}
@@ -3,10 +3,7 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.core.climate;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
package forestry.api.climate;
/**
* A climate source is used to change the climate in a region.
@@ -24,8 +21,6 @@ public interface IClimateSource {
*/
int getTicksForChange(IClimateRegion region);
World getWorld();
BlockPos getPos();
IClimateSourceProvider getProvider();
}
@@ -0,0 +1,19 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IClimateSourceProvider {
IClimateSource getClimateSource();
World getWorld();
BlockPos getCoordinates();
}
@@ -0,0 +1,18 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.climate;
public interface IClimatiserDefinition {
float getChange();
double getRange();
EnumClimatiserModes getMode();
EnumClimatiserTypes getType();
}
@@ -0,0 +1,9 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
@API(apiVersion = "2.1.0", owner = "Forestry", provides = "ForestryAPI|climate")
package forestry.api.climate;
import net.minecraftforge.fml.common.API;
@@ -7,7 +7,7 @@ package forestry.api.core;
import java.util.Set;
import forestry.api.core.climate.IClimateManager;
import forestry.api.climate.IClimateManager;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -30,4 +30,6 @@ public interface ICamouflageAccess {
boolean isItemBlackListed(@Nonnull String type, @Nonnull ItemStack camouflageBlock);
ICamouflageItemHandler getHandlerFromItem(ItemStack stack);
}
@@ -15,7 +15,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public interface ICamouflageItemHandler {
boolean canHandle(ItemStack stack, ICamouflageHandler camouflageHandler);
boolean canHandle(ItemStack stack);
String getType();
@@ -1,11 +0,0 @@
package forestry.api.core;
import net.minecraft.world.biome.Biome;
public interface IClimateProvider {
Biome getBiome();
EnumTemperature getTemperature();
EnumHumidity getHumidity();
}
@@ -5,7 +5,7 @@
******************************************************************************/
package forestry.api.genetics;
import forestry.api.core.IClimateProvider;
import forestry.api.climate.IClimateProvider;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -3,7 +3,7 @@
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
@API(apiVersion = "5.0.0", owner = "ForestryAPI|core", provides = "ForestryAPI|greenhouse")
@API(apiVersion = "5.2.0", owner = "ForestryAPI|core", provides = "ForestryAPI|greenhouse")
package forestry.api.greenhouse;
import net.minecraftforge.fml.common.API;
@@ -5,7 +5,7 @@
******************************************************************************/
package forestry.api.lepidopterology;
import forestry.api.core.IClimateProvider;
import forestry.api.climate.IClimateProvider;
import forestry.api.genetics.IHousing;
import forestry.api.genetics.IIndividual;
@@ -7,7 +7,7 @@ package forestry.api.multiblock;
import forestry.api.apiculture.IBeeListener;
import forestry.api.apiculture.IBeeModifier;
import forestry.api.core.climate.IClimateControlled;
import forestry.api.climate.IClimateControlled;
/**
* Needs to be implemented by TileEntities that want to be part of an alveary.
@@ -5,7 +5,10 @@
******************************************************************************/
package forestry.api.multiblock;
import forestry.api.core.climate.IClimateSource;
import forestry.api.climate.IClimateControl;
import forestry.api.climate.IClimateControlProvider;
import forestry.api.climate.IClimateSourceProvider;
import forestry.api.climate.IClimatiserDefinition;
import forestry.api.greenhouse.IGreenhouseListener;
import forestry.api.lepidopterology.IButterflyCocoon;
import net.minecraft.item.ItemStack;
@@ -18,10 +21,17 @@ public interface IGreenhouseComponent<T extends IMultiblockLogicGreenhouse> exte
IGreenhouseListener getGreenhouseListener();
}
interface ClimateControl extends IGreenhouseComponent, IClimateControlProvider {
@Override
IClimateControl getClimateControl();
}
interface Door extends IGreenhouseComponent {
}
interface Climatiser extends IGreenhouseComponent, IClimateSource {
interface Climatiser extends IGreenhouseComponent, IClimateSourceProvider {
IClimatiserDefinition getDefinition();
}
interface ButterflyHatch extends IGreenhouseComponent {
@@ -7,15 +7,18 @@ package forestry.api.multiblock;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import forestry.api.climate.IClimateControl;
import forestry.api.climate.IClimateControlProvider;
import forestry.api.climate.IClimateRegion;
import forestry.api.core.ICamouflageHandler;
import forestry.api.core.climate.IClimateRegion;
import forestry.api.greenhouse.EnumGreenhouseEventType;
import forestry.api.greenhouse.IGreenhouseHousing;
import forestry.api.greenhouse.IGreenhouseLogic;
public interface IGreenhouseController extends IMultiblockController, IGreenhouseHousing, ICamouflageHandler {
public interface IGreenhouseController extends IMultiblockController, IGreenhouseHousing, ICamouflageHandler, IClimateControlProvider {
/**
* Handle change events.
@@ -29,5 +32,9 @@ public interface IGreenhouseController extends IMultiblockController, IGreenhous
@Nullable
IClimateRegion getRegion();
@Override
@Nonnull
IClimateControl getClimateControl();
}