public class ClimateListener extends java.lang.Object implements IClimateListener
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
needsClimateUpdate |
protected net.minecraft.util.math.BlockPos |
pos |
static int |
SERVER_UPDATE |
protected net.minecraft.world.World |
world |
| Constructor and Description |
|---|
ClimateListener(java.lang.Object locationProvider) |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.world.biome.Biome |
getBiome() |
IClimateState |
getClimateState() |
net.minecraft.util.math.BlockPos |
getCoordinates() |
float |
getExactHumidity() |
float |
getExactTemperature() |
EnumHumidity |
getHumidity() |
EnumTemperature |
getTemperature() |
net.minecraft.world.World |
getWorldObj() |
void |
markLocatableDirty() |
void |
setClimateState(IClimateState climateState)
Sets the cached state to the given state.
|
void |
syncToClient()
Sends a packet if needed to all players that are currently "watching" the chunk that the listener is located in.
|
void |
syncToClient(net.minecraft.entity.player.EntityPlayerMP player)
Sends a packet to the given players.
|
void |
updateClientSide(boolean spawnParticles)
Updates the listener on the client side.
|
public static final int SERVER_UPDATE
@Nullable protected net.minecraft.world.World world
@Nullable protected net.minecraft.util.math.BlockPos pos
protected boolean needsClimateUpdate
public void updateClientSide(boolean spawnParticles)
IClimateListenerupdateClientSide in interface IClimateListenerspawnParticles - If the listener should spawn particles around its location.public net.minecraft.world.biome.Biome getBiome()
getBiome in interface IClimateProviderpublic EnumTemperature getTemperature()
getTemperature in interface IClimateProviderpublic EnumHumidity getHumidity()
getHumidity in interface IClimateProviderpublic float getExactTemperature()
getExactTemperature in interface IClimateListenerpublic float getExactHumidity()
getExactHumidity in interface IClimateListenerpublic IClimateState getClimateState()
getClimateState in interface IClimateListenerpublic void setClimateState(IClimateState climateState)
IClimateListenersetClimateState in interface IClimateListenerpublic void syncToClient()
IClimateListenersyncToClient in interface IClimateListenerpublic void syncToClient(net.minecraft.entity.player.EntityPlayerMP player)
IClimateListenersyncToClient in interface IClimateListenerpublic net.minecraft.util.math.BlockPos getCoordinates()
getCoordinates in interface ILocatablepublic net.minecraft.world.World getWorldObj()
getWorldObj in interface ILocatablepublic void markLocatableDirty()
markLocatableDirty in interface IClimateListener