mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 04:52:26 +00:00
Update for 1.11. Missing assets, unstable.
This commit is contained in:
1 parent
30d7365518
commit
9611ae08ae
1145 files changed
+15561
-18107
No files matched your search
@@ -5,39 +5,35 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.climate;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IClimateManager {
|
||||
|
||||
float getTemperature(World world, BlockPos pos);
|
||||
|
||||
|
||||
float getHumidity(World world, BlockPos pos);
|
||||
|
||||
@Nonnull
|
||||
|
||||
IClimateProvider getDefaultClimate(World world, BlockPos pos);
|
||||
|
||||
|
||||
void addRegion(IClimateRegion region);
|
||||
|
||||
|
||||
void removeRegion(IClimateRegion region);
|
||||
|
||||
|
||||
void addSource(IClimateSourceProvider source);
|
||||
|
||||
|
||||
void removeSource(IClimateSourceProvider source);
|
||||
|
||||
|
||||
@Nullable
|
||||
IClimatePosition getPosition(World world, BlockPos pos);
|
||||
|
||||
|
||||
@Nullable
|
||||
IClimateRegion getRegionForPos(World world, BlockPos pos);
|
||||
|
||||
@Nonnull
|
||||
|
||||
Map<Integer, List<IClimateRegion>> getRegions();
|
||||
|
||||
|
||||
}
|
||||
@@ -5,18 +5,14 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.climate;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.core.INbtReadable;
|
||||
import forestry.api.core.INbtWritable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public interface IClimatePosition extends INbtReadable, INbtWritable {
|
||||
|
||||
@Nonnull
|
||||
|
||||
IClimateRegion getClimateRegion();
|
||||
|
||||
@Nonnull
|
||||
|
||||
BlockPos getPos();
|
||||
|
||||
void setTemperature(float temperature);
|
||||
|
||||
@@ -8,38 +8,34 @@ package forestry.api.climate;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.api.core.INbtReadable;
|
||||
import forestry.api.core.INbtWritable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IClimateRegion extends INbtReadable, INbtWritable {
|
||||
|
||||
@Nonnull
|
||||
|
||||
World getWorld();
|
||||
|
||||
|
||||
/**
|
||||
* Update the climate in a region.
|
||||
*/
|
||||
void updateClimate(int ticks);
|
||||
|
||||
|
||||
int getTicksPerUpdate();
|
||||
|
||||
@Nonnull
|
||||
|
||||
Map<BlockPos, IClimatePosition> getPositions();
|
||||
|
||||
|
||||
void addSource(IClimateSource source);
|
||||
|
||||
|
||||
void removeSource(IClimateSource source);
|
||||
|
||||
|
||||
Collection<IClimateSource> getSources();
|
||||
|
||||
|
||||
Collection<BlockPos> getOtherPositions();
|
||||
|
||||
|
||||
float getTemperature();
|
||||
|
||||
|
||||
float getHumidity();
|
||||
|
||||
|
||||
}
|
||||
@@ -5,6 +5,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.climate;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* A climate source is used to change the climate in a region.
|
||||
*/
|
||||
@@ -21,7 +23,8 @@ public interface IClimateSource {
|
||||
* @return The ticks that are required for one change.
|
||||
*/
|
||||
int getTicksForChange(IClimateRegion region);
|
||||
|
||||
|
||||
@Nullable
|
||||
IClimateSourceProvider getProvider();
|
||||
|
||||
}
|
||||
@@ -3,7 +3,12 @@
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
@API(apiVersion = "2.1.0", owner = "Forestry", provides = "ForestryAPI|climate")
|
||||
package forestry.api.climate;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
import net.minecraftforge.fml.common.API;
|
||||
Reference in new issue
Block a user