Interface EnvironmentTickContext<T extends TemperatureAware & Soakable>
- Type Parameters:
T- The temperature aware type
- All Known Implementing Classes:
EnvironmentTickContextImpl
Context objects for general temperature ticking events on temperature awares and soakables
-
Method Summary
Modifier and TypeMethodDescriptionaffected()The temperature aware/soakable being tickednet.minecraft.core.component.DataComponentMapThe current environment components at the world and position.@NotNull net.minecraft.server.level.ServerLevellevel()The server level of the affected temperature aware/soakable@NotNull net.minecraft.core.BlockPospos()The block position of the affected temperature aware/soakable.default @NotNull net.minecraft.server.level.ServerLevelworld()Deprecated, for removal: This API element is subject to removal in a future version.This method was named based on Yarn Mappings.
-
Method Details
-
affected
The temperature aware/soakable being ticked -
world
@NotNull @Deprecated(since="8.1.0", forRemoval=true) default @NotNull net.minecraft.server.level.ServerLevel world()Deprecated, for removal: This API element is subject to removal in a future version.This method was named based on Yarn Mappings. Uselevel()to better conform to Official Mappings. -
level
@NotNull @NotNull net.minecraft.server.level.ServerLevel level()The server level of the affected temperature aware/soakable -
pos
@NotNull @NotNull net.minecraft.core.BlockPos pos()The block position of the affected temperature aware/soakable. This should be preferred over using methods such asEntity.blockPosition()since it can correct for being slightly sunk into blocks like mud or soul sand by taking the block position that is slightly above their actual position. -
components
net.minecraft.core.component.DataComponentMap components()The current environment components at the world and position.No key is guaranteed to be mapped to a value, be sure to always check the result or use
DataComponentMap.getOrDefault(DataComponentType, Object).Environment components are only looked up for players by default, for all other entity types this map is empty.
- Returns:
- Returns an
environment component map
-