Class GlobalPosHelper

java.lang.Object
me.desht.pneumaticcraft.common.util.GlobalPosHelper

public class GlobalPosHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.core.GlobalPos
    fromJson(com.google.gson.JsonObject json)
     
    static net.minecraft.core.GlobalPos
    fromNBT(net.minecraft.nbt.CompoundTag tag)
     
    static net.minecraft.world.level.block.entity.BlockEntity
    getTileEntity(net.minecraft.core.GlobalPos globalPos)
    Get the block entity at the given global pos.
    static net.minecraft.server.level.ServerLevel
    getWorldForGlobalPos(net.minecraft.core.GlobalPos pos)
     
    static boolean
    isSameWorld(net.minecraft.core.GlobalPos pos, net.minecraft.world.level.Level world)
     
    static net.minecraft.core.GlobalPos
    makeGlobalPos(net.minecraft.world.level.Level w, net.minecraft.core.BlockPos pos)
     
    static String
    prettyPrint(net.minecraft.core.GlobalPos pos)
     
    static com.google.gson.JsonElement
    toJson(net.minecraft.core.GlobalPos pos)
     
    static net.minecraft.nbt.Tag
    toNBT(net.minecraft.core.GlobalPos globalPos)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static String prettyPrint(net.minecraft.core.GlobalPos pos)
    • 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