public interface IClimateTransformer extends ILocatable
IWorldClimateHolder.getClimate(long).
IClimateTransformer have to be registered with IWorldClimateHolder.updateTransformer(IClimateTransformer)
and IWorldClimateHolder.removeTransformer(IClimateTransformer) has to be called after the block that contains
the transformer gets harvested / replaced.
IWorldClimateHolder.updateTransformer(IClimateTransformer) has to be called after every change of the climate,
the range or the circular state of the transformer.
| Modifier and Type | Method and Description |
|---|---|
IClimateManipulatorBuilder |
createManipulator(ClimateType type)
A helper interface that can be usd to manipulate the state of this logic.
|
int |
getArea() |
float |
getAreaModifier() |
float |
getCostModifier() |
IClimateState |
getCurrent() |
IClimateState |
getDefault() |
IClimateHousing |
getHousing() |
int |
getRange() |
float |
getSpeedModifier() |
IClimateState |
getTarget() |
boolean |
isCircular() |
void |
removeTransformer()
Removes the transformer from the world.
|
void |
setCircular(boolean circular)
Sets the circular state of the transformer.
|
void |
setCurrent(IClimateState state)
Sets the current value of the transformer.
|
void |
setRange(int range)
Sets the range of this transformer.
|
void |
setTarget(IClimateState target)
Sets the targeted state of this transformer.
|
void |
update()
Updates the transformer and adds it to the world at the first time this method gets called.
|
getCoordinates, getWorldObjvoid update()
void removeTransformer()
IClimateHousing getHousing()
int getRange()
void setRange(int range)
void setCircular(boolean circular)
boolean isCircular()
int getArea()
float getAreaModifier()
getCostModifier() and getSpeedModifier() to multiply the cost and the speed based on the
size of the area that the transformer transforms.float getCostModifier()
getAreaModifier()float getSpeedModifier()
getAreaModifier()IClimateState getTarget()
void setTarget(IClimateState target)
The state automatically gets clamped between 0.0F and 2.0F and transformed into a immutable IClimateState.
IClimateState getCurrent()
void setCurrent(IClimateState state)
The state automatically gets clamped between 0.0F and 2.0F and transformed into a immutable IClimateState.
IClimateState getDefault()
IClimateState of the biome in that the transformer is located.IClimateManipulatorBuilder createManipulator(ClimateType type)