Package de.z0rdak.yawp.api.visualization
Class VisualizationUtil
java.lang.Object
de.z0rdak.yawp.api.visualization.VisualizationUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.nbt.CompoundTagbuildBlockDisplayTag(String regionName, BlockDisplayProperties properties) static net.minecraft.nbt.CompoundTagbuildTeleportAnchorTextDisplayTag(String regionName, TextDisplayProperties properties) SEE: https://minecraft.wiki/w/Display#Data_valuesstatic Optional<net.minecraft.world.entity.Entity> createBlockDisplayEntity(net.minecraft.server.level.ServerLevel level, String regionName, net.minecraft.core.BlockPos pos, BlockDisplayProperties displayProperties) static net.minecraft.world.entity.EntitycreateBlockDisplayRecursive(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.nbt.CompoundTag displayTag) Deprecated.static Optional<net.minecraft.world.entity.Entity> createDisplayEntity(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.nbt.CompoundTag displayTag) Creates an entity in the level at the specified position with the provided tag.static Optional<net.minecraft.world.entity.Entity> createTextDisplayEntity(net.minecraft.server.level.ServerLevel level, String regionName, net.minecraft.core.BlockPos pos, TextDisplayProperties displayProperties) static voidupdateDisplayBlock(net.minecraft.world.entity.Entity blockDisplayEntity, net.minecraft.resources.ResourceLocation blockRl) static voidupdateDisplayGlow(net.minecraft.world.entity.Entity blockDisplayEntity, boolean glow) static voidupdateDisplayLightLevel(net.minecraft.world.entity.Entity blockDisplayEntity, int lightLevel) static voidupdateDisplayProperties(net.minecraft.world.entity.Entity blockDisplayEntity, BlockDisplayProperties properties)
-
Method Details
-
updateDisplayBlock
public static void updateDisplayBlock(net.minecraft.world.entity.Entity blockDisplayEntity, net.minecraft.resources.ResourceLocation blockRl) -
updateDisplayGlow
public static void updateDisplayGlow(net.minecraft.world.entity.Entity blockDisplayEntity, boolean glow) -
updateDisplayLightLevel
public static void updateDisplayLightLevel(net.minecraft.world.entity.Entity blockDisplayEntity, int lightLevel) -
updateDisplayProperties
public static void updateDisplayProperties(net.minecraft.world.entity.Entity blockDisplayEntity, BlockDisplayProperties properties) -
createBlockDisplayRecursive
@Deprecated public static net.minecraft.world.entity.Entity createBlockDisplayRecursive(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.nbt.CompoundTag displayTag) Deprecated. -
createDisplayEntity
public static Optional<net.minecraft.world.entity.Entity> createDisplayEntity(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.nbt.CompoundTag displayTag) Creates an entity in the level at the specified position with the provided tag.- Parameters:
level- level in which to spawn the entitypos- position at which to spawn the display entitydisplayTag- tag which provides data about the entity (e.g. text or block display entity)- Returns:
- an optional with the entity inside if spawning was successfully, empty otherwise
-
createTextDisplayEntity
public static Optional<net.minecraft.world.entity.Entity> createTextDisplayEntity(net.minecraft.server.level.ServerLevel level, String regionName, net.minecraft.core.BlockPos pos, TextDisplayProperties displayProperties) - Parameters:
regionName- a marker, stored in custom entity data for identification later
-
createBlockDisplayEntity
public static Optional<net.minecraft.world.entity.Entity> createBlockDisplayEntity(net.minecraft.server.level.ServerLevel level, String regionName, net.minecraft.core.BlockPos pos, BlockDisplayProperties displayProperties) - Parameters:
regionName- a marker, stored in custom entity data for identification later
-
buildTeleportAnchorTextDisplayTag
public static net.minecraft.nbt.CompoundTag buildTeleportAnchorTextDisplayTag(String regionName, TextDisplayProperties properties) SEE: https://minecraft.wiki/w/Display#Data_values -
buildBlockDisplayTag
public static net.minecraft.nbt.CompoundTag buildBlockDisplayTag(String regionName, BlockDisplayProperties properties)
-