mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 04:52:26 +00:00
Improve greenhouse and add new greenhouse gui texture
This commit is contained in:
1 parent
ea976ebb2f
commit
d4f9c69538
66 files changed
+565
-394
No files matched your search
@@ -2,6 +2,6 @@ package forestry.api.climate;
|
||||
|
||||
public enum EnumClimatiserModes {
|
||||
|
||||
POSITIVE, NEGATIVE, NONE
|
||||
POSITIVE, NEGATIVE, BOTH
|
||||
|
||||
}
|
||||
@@ -2,6 +2,6 @@ package forestry.api.climate;
|
||||
|
||||
public enum EnumClimatiserTypes {
|
||||
|
||||
TEMPERATURE, HUMIDITY, NONE
|
||||
TEMPERATURE, HUMIDITY, BOTH
|
||||
|
||||
}
|
||||
@@ -7,6 +7,10 @@ package forestry.api.climate;
|
||||
|
||||
public interface IClimateControl {
|
||||
|
||||
IClimateInfo getControlClimate();
|
||||
|
||||
void setControlClimate(IClimateInfo climateInfo);
|
||||
|
||||
float getControlTemperature();
|
||||
|
||||
float getControlHumidity();
|
||||
|
||||
@@ -9,6 +9,8 @@ import forestry.api.core.ILocatable;
|
||||
|
||||
public interface IClimateControlProvider extends ILocatable {
|
||||
|
||||
IClimateControl getClimateControl();
|
||||
IClimateInfo getControlClimate();
|
||||
|
||||
void setControlClimate(IClimateInfo climateControl);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package forestry.api.climate;
|
||||
|
||||
public interface IClimateInfo {
|
||||
|
||||
float getTemperature();
|
||||
|
||||
float getHumidity();
|
||||
|
||||
}
|
||||
@@ -14,9 +14,9 @@ import net.minecraft.world.World;
|
||||
|
||||
public interface IClimateManager {
|
||||
|
||||
float getTemperature(World world, BlockPos pos);
|
||||
|
||||
float getHumidity(World world, BlockPos pos);
|
||||
IClimateInfo createInfo(float temperature, float humidity);
|
||||
|
||||
IClimateInfo getInfo(World world, BlockPos pos);
|
||||
|
||||
IClimateProvider getDefaultClimate(World world, BlockPos pos);
|
||||
|
||||
|
||||
@@ -29,5 +29,7 @@ public interface IClimatePosition extends INbtReadable, INbtWritable {
|
||||
void addHumidity(float humidity);
|
||||
|
||||
float getHumidity();
|
||||
|
||||
IClimateInfo getInfo();
|
||||
|
||||
}
|
||||
@@ -9,10 +9,12 @@ public class CamouflageManager {
|
||||
|
||||
public static ICamouflageAccess camouflageAccess;
|
||||
|
||||
public static final String DEFAULT = "default";
|
||||
public static final String BLOCK = "block";
|
||||
|
||||
public static final String GLASS = "glass";
|
||||
|
||||
public static final String DOOR = "door";
|
||||
|
||||
public static final String NONE = "none";
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.core;
|
||||
|
||||
import forestry.core.utils.ClimateUtil;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
@@ -71,7 +72,7 @@ public enum EnumTemperature {
|
||||
if (BiomeHelper.isBiomeHellish(biome)) {
|
||||
return HELLISH;
|
||||
}
|
||||
float temperature = ForestryAPI.climateManager.getTemperature(world, pos);
|
||||
float temperature = ClimateUtil.getTemperature(world, pos);
|
||||
return getFromValue(temperature);
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,8 @@ public interface ICamouflageAccess {
|
||||
|
||||
boolean isItemBlackListed(String type, ItemStack camouflageBlock);
|
||||
|
||||
@Nullable
|
||||
ICamouflageItemHandler getNoneItemHandler();
|
||||
|
||||
ICamouflageItemHandler getHandlerFromItem(ItemStack stack);
|
||||
|
||||
}
|
||||
@@ -45,4 +45,12 @@ public class DefaultGreenhouseLogic implements IGreenhouseLogic {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMachineAssembled() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMachineDisassembled() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,11 @@ public interface IGreenhouseLogic extends INbtWritable, INbtReadable {
|
||||
void work();
|
||||
|
||||
void onEvent(EnumGreenhouseEventType type, Object event);
|
||||
|
||||
void onMachineAssembled();
|
||||
|
||||
void onMachineDisassembled();
|
||||
|
||||
IGreenhouseController getController();
|
||||
|
||||
String getName();
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package forestry.api.greenhouse;
|
||||
|
||||
import forestry.api.climate.IClimateInfo;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
public interface ITerrainRecipe {
|
||||
|
||||
IBlockState getInput();
|
||||
|
||||
IBlockState getResult();
|
||||
|
||||
IClimateInfo getMinClimate();
|
||||
|
||||
IClimateInfo getMaxClimate();
|
||||
|
||||
}
|
||||
@@ -5,7 +5,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.multiblock;
|
||||
|
||||
import forestry.api.climate.IClimateControl;
|
||||
import forestry.api.climate.IClimateControlProvider;
|
||||
import forestry.api.climate.IClimateSourceProvider;
|
||||
import forestry.api.climate.IClimatiserDefinition;
|
||||
@@ -24,8 +23,6 @@ public interface IGreenhouseComponent<T extends IMultiblockLogicGreenhouse> exte
|
||||
|
||||
interface ClimateControl extends IGreenhouseComponent, IClimateControlProvider {
|
||||
|
||||
@Override
|
||||
IClimateControl getClimateControl();
|
||||
}
|
||||
|
||||
interface Door extends IGreenhouseComponent {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
package forestry.api.multiblock;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import forestry.api.climate.IClimateControlProvider;
|
||||
import forestry.api.climate.IClimateRegion;
|
||||
@@ -13,6 +14,7 @@ import forestry.api.core.ICamouflageHandler;
|
||||
import forestry.api.greenhouse.EnumGreenhouseEventType;
|
||||
import forestry.api.greenhouse.IGreenhouseHousing;
|
||||
import forestry.api.greenhouse.IGreenhouseLogic;
|
||||
import forestry.api.greenhouse.IInternalBlock;
|
||||
|
||||
public interface IGreenhouseController extends IMultiblockController, IGreenhouseHousing, ICamouflageHandler, IClimateControlProvider {
|
||||
|
||||
@@ -25,6 +27,11 @@ public interface IGreenhouseController extends IMultiblockController, IGreenhous
|
||||
* @return The logics of the greenhouse.
|
||||
*/
|
||||
List<IGreenhouseLogic> getLogics();
|
||||
|
||||
/**
|
||||
* @return All internal blocks of the greenhouse.
|
||||
*/
|
||||
Set<IInternalBlock> getInternalBlocks();
|
||||
|
||||
IClimateRegion getRegion();
|
||||
|
||||
|
||||
Reference in new issue
Block a user