Class GlobalPosHelper
java.lang.Object
me.desht.pneumaticcraft.common.util.GlobalPosHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.GlobalPosfromJson(com.google.gson.JsonObject json) static net.minecraft.core.GlobalPosfromNBT(net.minecraft.nbt.CompoundTag tag) static net.minecraft.world.level.block.entity.BlockEntitygetTileEntity(net.minecraft.core.GlobalPos globalPos) Get the block entity at the given global pos.static net.minecraft.server.level.ServerLevelgetWorldForGlobalPos(net.minecraft.core.GlobalPos pos) static booleanisSameWorld(net.minecraft.core.GlobalPos pos, net.minecraft.world.level.Level world) static net.minecraft.core.GlobalPosmakeGlobalPos(net.minecraft.world.level.Level w, net.minecraft.core.BlockPos pos) static StringprettyPrint(net.minecraft.core.GlobalPos pos) static com.google.gson.JsonElementtoJson(net.minecraft.core.GlobalPos pos) static net.minecraft.nbt.TagtoNBT(net.minecraft.core.GlobalPos globalPos)
-
Constructor Details
-
GlobalPosHelper
public GlobalPosHelper()
-
-
Method Details
-
toNBT
public static net.minecraft.nbt.Tag toNBT(net.minecraft.core.GlobalPos globalPos) -
fromNBT
public static net.minecraft.core.GlobalPos fromNBT(net.minecraft.nbt.CompoundTag tag) -
toJson
public static com.google.gson.JsonElement toJson(net.minecraft.core.GlobalPos pos) -
fromJson
public static net.minecraft.core.GlobalPos fromJson(com.google.gson.JsonObject json) -
getWorldForGlobalPos
public static net.minecraft.server.level.ServerLevel getWorldForGlobalPos(net.minecraft.core.GlobalPos pos) -
makeGlobalPos
public static net.minecraft.core.GlobalPos makeGlobalPos(net.minecraft.world.level.Level w, net.minecraft.core.BlockPos pos) -
isSameWorld
public static boolean isSameWorld(net.minecraft.core.GlobalPos pos, net.minecraft.world.level.Level world) -
prettyPrint
-
getTileEntity
public static net.minecraft.world.level.block.entity.BlockEntity getTileEntity(net.minecraft.core.GlobalPos globalPos) Get the block entity at the given global pos. This will not force-load the dimension or chunks.- Parameters:
globalPos- the global pos- Returns:
- the block entity, if any
-