Finish work

This commit is contained in:
Nedelosk committed 2016-06-12 20:42:09 +02:00
1 parent 2cd76bdad7
commit cc53894473
17 files changed
+156 -45

No files matched your search

@@ -24,10 +24,17 @@ public interface IClimateManager {
void removeRegion(IClimateRegion region);
void addSource(IClimateSource source);
void removeSource(IClimateSource source);
@Nullable
IClimateRegion getRegionForPos(World world, BlockPos pos);
@Nonnull
Map<Integer, List<IClimateRegion>> getRegions();
@Nonnull
Map<Integer, List<IClimateSource>> getSources();
}
@@ -19,6 +19,9 @@ public interface IClimateRegion extends INbtReadable, INbtWritable {
@Nonnull
World getWorld();
/**
* Update the climate in a region, all 20 world ticks.
*/
void updateClimate();
@Nonnull
@@ -5,6 +5,19 @@
******************************************************************************/
package forestry.api.core.climate;
import net.minecraft.util.math.BlockPos;
/**
* A climate source is used to change the climate in a region.
*/
public interface IClimateSource {
/**
* @param tickCount The current tick count.
* @param region The climate region, in that the source stands.
*/
void changeClimate(int tickCount, IClimateRegion region);
BlockPos getPos();
}
@@ -10,12 +10,12 @@ import forestry.api.multiblock.IGreenhouseController;
public interface IGreenhouseListener {
/**
* Called before the greenhouse work.
* Called before the greenhouse update the climate system.
*
* @param greenhouse The greenhouse multiblock.
* @param greenhouse The greenhouse of the listener.
* @param canWork The actual {@link Boolean} value.
* @return True if the greenhouse can work.
* @return True if the greenhouse can update the climate.
*/
<G extends IGreenhouseController & IGreenhouseHousing> boolean canWork(G greenhouse, boolean canWork);
boolean canWork(IGreenhouseController greenhouse, boolean canWork);
}
@@ -5,6 +5,7 @@
******************************************************************************/
package forestry.api.multiblock;
import forestry.api.core.climate.IClimateSource;
import forestry.api.greenhouse.IGreenhouseListener;
import forestry.api.lepidopterology.IButterflyCocoon;
import net.minecraft.item.ItemStack;
@@ -20,8 +21,7 @@ public interface IGreenhouseComponent<T extends IMultiblockLogicGreenhouse> exte
interface Door extends IGreenhouseComponent {
}
interface Climatiser extends IGreenhouseComponent {
void changeClimate(int tickCount, IGreenhouseController controller);
interface Climatiser extends IGreenhouseComponent, IClimateSource {
}
interface ButterflyHatch extends IGreenhouseComponent {