Add GreenhouseLogicTerrain and adding multiblock error renderer

This commit is contained in:
Nedelosk committed 2016-12-30 03:44:41 +01:00
1 parent 02f5c7121d
commit 55919a135e
27 files changed
+392 -63

No files matched your search

@@ -8,7 +8,10 @@ package forestry.api.greenhouse;
import javax.annotation.Nullable;
import java.util.List;
import forestry.api.climate.IClimateInfo;
import forestry.api.multiblock.IGreenhouseController;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -20,8 +23,14 @@ public interface IGreenhouseHelper {
@Nullable
IGreenhouseController getGreenhouseController(World world, BlockPos pos);
void addGreenhouseLogic(Class<? extends IGreenhouseLogic> logic);
void registerGreenhouseLogic(Class<? extends IGreenhouseLogic> logic);
List<Class<? extends IGreenhouseLogic>> getGreenhouseLogics();
void registerTerrainRecipe(Block inputBlock, IBlockState outputState, IClimateInfo minClimate, IClimateInfo maxClimate, float chance);
void registerTerrainRecipe(IBlockState inputState, IBlockState outputState, IClimateInfo minClimate, IClimateInfo maxClimate, float chance);
ITerrainRecipe getValidTerrainRecipe(IBlockState blockState, IClimateInfo climateInfo);
}
@@ -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.greenhouse;
import forestry.api.climate.IClimateInfo;
public interface IOvergrowth {
IClimateInfo getMinClimate();
IClimateInfo getMaxClimate();
float getChance();
}
@@ -1,3 +1,8 @@
/*******************************************************************************
* Copyright 2011-2014 SirSengir
*
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
******************************************************************************/
package forestry.api.greenhouse;
import forestry.api.climate.IClimateInfo;
@@ -5,12 +10,14 @@ import net.minecraft.block.state.IBlockState;
public interface ITerrainRecipe {
IBlockState getInput();
boolean matches(IBlockState blockState);
IBlockState getResult();
IClimateInfo getMinClimate();
IClimateInfo getMaxClimate();
float getChance();
}
@@ -6,6 +6,9 @@
package forestry.api.multiblock;
import javax.annotation.Nullable;
import net.minecraft.util.math.BlockPos;
import java.util.Collection;
/**
@@ -33,6 +36,9 @@ public interface IMultiblockController {
*/
@Nullable
String getLastValidationError();
@Nullable
BlockPos getLastValidationErrorPosition();
/**
* @return all the multiblock components attached to this controller