Class EmptyEnvironmentController
java.lang.Object
com.github.thedeathlycow.thermoo.api.temperature.EmptyEnvironmentController
- All Implemented Interfaces:
EnvironmentController
@Deprecated
public final class EmptyEnvironmentController
extends Object
implements EnvironmentController
Deprecated.
Replaced with the environment datapack registry
The most basic concrete implementation of the environment controller. All methods return either
0,
false, or null.-
Method Summary
Modifier and TypeMethodDescriptiondoublegetBaseValueForAttribute(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, net.minecraft.world.entity.LivingEntity entity) Deprecated.intgetFloorTemperature(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.level.Level world, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos) Deprecated.Gets the amount of warmth generated by a floor block state for a given entity.intgetHeatAtLocation(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Deprecated.Calculates the passive warmth nearby heat sources at a location in a world.intgetHeatFromBlockState(net.minecraft.world.level.block.state.BlockState state) Deprecated.Calculates the heat produced by a block state.intgetLocalTemperatureChange(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Deprecated.Computes the local temperature change from the environment at a given position in a world.intgetSoakChange(Soakable soakable) Deprecated.Gets the wetness increase for aSoakablethis tickintgetTemperatureEffectsChange(net.minecraft.world.entity.LivingEntity entity) Deprecated.Computes temperature changes forLivingEntitys from heat effects.booleanisAreaHeated(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Deprecated.Check if a position in a world is heatedbooleanisColdSource(net.minecraft.world.level.block.state.BlockState state) Deprecated.Checks if a block state is a cold source, as defined by this controller.booleanisHeatSource(net.minecraft.world.level.block.state.BlockState state) Deprecated.Checks if a block state is a heat source, as defined by this controller.toString()Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.thedeathlycow.thermoo.api.temperature.EnvironmentController
applyAwareHeat, getDecorated, getEnvironmentTemperatureForPlayer, getMaxWetTicks
-
Method Details
-
getLocalTemperatureChange
public int getLocalTemperatureChange(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Deprecated.Description copied from interface:EnvironmentControllerComputes the local temperature change from the environment at a given position in a world.- Specified by:
getLocalTemperatureChangein interfaceEnvironmentController- Parameters:
world- The worldpos- The position in that world- Returns:
- The passive temperature change at
posinworld.
-
getBaseValueForAttribute
@Deprecated public double getBaseValueForAttribute(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, net.minecraft.world.entity.LivingEntity entity) Deprecated.Description copied from interface:EnvironmentControllerGets the base value for one of theThermooAttributes. If the return of this method is non-zero, then this value will be applied as an attribute modifier to theentitywhen the entity is created, with the addition operation. This method is called for each of the Thermoo attributes.- Specified by:
getBaseValueForAttributein interfaceEnvironmentController- Parameters:
attribute- The attribute to get the base value for. Strictly the attributes inThermooAttributes.entity- The entity to apply the attribute to.- Returns:
- Returns the base value for the attribute to apply to the entity.
-
getTemperatureEffectsChange
public int getTemperatureEffectsChange(net.minecraft.world.entity.LivingEntity entity) Deprecated.Description copied from interface:EnvironmentControllerComputes temperature changes forLivingEntitys from heat effects. For example, being on fire or freezing in powder snow- Specified by:
getTemperatureEffectsChangein interfaceEnvironmentController- Parameters:
entity- The entity to tick warmth effects for- Returns:
- Returns the temperature change that should be applied
-
getFloorTemperature
public int getFloorTemperature(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.level.Level world, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos) Deprecated.Description copied from interface:EnvironmentControllerGets the amount of warmth generated by a floor block state for a given entity.Hot floor is different from
EnvironmentController.getHeatFromBlockState(BlockState), as it ONLY applies to entities stepping on the block - it does not affect the area around the block. An example implementation would be to provide warmth fromBlocks.MAGMA_BLOCK, but not provide area heat.You can also use this for blocks that are cold to step on.
- Specified by:
getFloorTemperaturein interfaceEnvironmentController- Parameters:
entity- The entity that is stepping on the givenstateworld- The world/level where the floor is locatedstate- The state of the floor. This is exactly the state at theposin theworldpos- The position of the world in the world- Returns:
- Returns the heat to apply each tick to entities standing on the block state
-
getSoakChange
Deprecated.Description copied from interface:EnvironmentControllerGets the wetness increase for aSoakablethis tick- Specified by:
getSoakChangein interfaceEnvironmentController- Parameters:
soakable- The soakable to compute increase for- Returns:
- Returns the soaking change for the player.
-
getHeatAtLocation
public int getHeatAtLocation(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Deprecated.Description copied from interface:EnvironmentControllerCalculates the passive warmth nearby heat sources at a location in a world. 'Heat sources' being things that exist in the world that produce heat around them. For example, this could include artificial light producing sources, such as torches, campfires, lit furnaces, glowstone, and more.This can also be negative, to indicate a cold position.
- Specified by:
getHeatAtLocationin interfaceEnvironmentController- Parameters:
world- The world the temperature aware is inpos- The position to check- Returns:
- Returns the temperature change that should be applied from nearby temperature sources.
-
getHeatFromBlockState
public int getHeatFromBlockState(net.minecraft.world.level.block.state.BlockState state) Deprecated.Description copied from interface:EnvironmentControllerCalculates the heat produced by a block state. May be negative, indicating a cold source.- Specified by:
getHeatFromBlockStatein interfaceEnvironmentController- Parameters:
state- The block state heat source- Returns:
- The warmth that the state produces around it
-
isHeatSource
public boolean isHeatSource(net.minecraft.world.level.block.state.BlockState state) Deprecated.Description copied from interface:EnvironmentControllerChecks if a block state is a heat source, as defined by this controller.- Specified by:
isHeatSourcein interfaceEnvironmentController- Parameters:
state- The block state to check- Returns:
- Returns if a block state is a heat source
- See Also:
-
isColdSource
public boolean isColdSource(net.minecraft.world.level.block.state.BlockState state) Deprecated.Description copied from interface:EnvironmentControllerChecks if a block state is a cold source, as defined by this controller.- Specified by:
isColdSourcein interfaceEnvironmentController- Parameters:
state- The block state to check- Returns:
- Returns true if a block state is a cold source
- See Also:
-
isAreaHeated
public boolean isAreaHeated(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Deprecated.Description copied from interface:EnvironmentControllerCheck if a position in a world is heated- Specified by:
isAreaHeatedin interfaceEnvironmentController- Parameters:
world- The world of the positionpos- The position to check- Returns:
- Returns if the location in the world is heated
- See Also:
-
toString
Deprecated.
-