Class AbstractBlockBasedImmersiveInfo

java.lang.Object
com.hammy275.immersivemc.client.immersive.info.AbstractImmersiveInfo
com.hammy275.immersivemc.client.immersive.info.AbstractBlockBasedImmersiveInfo
All Implemented Interfaces:
BlockBasedImmersiveInfo, ImmersiveInfo
Direct Known Subclasses:
BeaconInfo, ChestInfo

public class AbstractBlockBasedImmersiveInfo extends AbstractImmersiveInfo implements BlockBasedImmersiveInfo
  • Field Details

    • pos

      protected final net.minecraft.core.BlockPos pos
  • Constructor Details

    • AbstractBlockBasedImmersiveInfo

      public AbstractBlockBasedImmersiveInfo(net.minecraft.core.BlockPos pos)
  • Method Details

    • getBlockPosition

      public net.minecraft.core.BlockPos getBlockPosition()
      Description copied from interface: BlockBasedImmersiveInfo
      Gets the block position of the block this ImmersiveInfo represents. This function should always return the same value for an individual ImmersiveInfo instance, and this function may be called after the block at this position no longer matches the Immersive it represents.
      For example, if this ImmersiveInfo was used to represent a furnace that was initially placed at x=1, y=2, and z=3, this function should always return the position x=1, y=2, and z=3, even after the furnace is destroyed or replaced by some other block.
      Specified by:
      getBlockPosition in interface BlockBasedImmersiveInfo
      Returns:
      The position of the block this ImmersiveInfo represents.