Class ChestInfo

java.lang.Object
com.hammy275.immersivemc.client.immersive.info.AbstractImmersiveInfo
com.hammy275.immersivemc.client.immersive.info.ChestInfo
All Implemented Interfaces:
ImmersiveInfo

public class ChestInfo extends AbstractImmersiveInfo
  • Field Details

    • chest

      public net.minecraft.world.level.block.entity.BlockEntity chest
    • otherChest

      public net.minecraft.world.level.block.entity.BlockEntity otherChest
    • otherPos

      public net.minecraft.core.BlockPos otherPos
    • forward

      public net.minecraft.core.Direction forward
    • rowNum

      protected int rowNum
    • openCloseHitboxes

      public List<BoundingBox> openCloseHitboxes
    • openClosePosition

      public net.minecraft.world.phys.Vec3 openClosePosition
    • light

      public int light
  • Constructor Details

    • ChestInfo

      public ChestInfo(net.minecraft.world.level.block.entity.BlockEntity chest, net.minecraft.world.level.block.entity.BlockEntity otherChest)
  • Method Details

    • nextRow

      public void nextRow()
    • getNextRow

      public int getNextRow(int rowIn)
    • getRowNum

      public int getRowNum()
    • getAllHitboxes

      public List<HitboxItemPair> getAllHitboxes()
      Specified by:
      getAllHitboxes in interface ImmersiveInfo
      Overrides:
      getAllHitboxes in class AbstractImmersiveInfo
      Returns:
      The list of all hitboxes this Immersive uses. This can contain null elements, and can return an immutable list implementation if desired.
    • hasHitboxes

      public boolean hasHitboxes()
      Description copied from interface: ImmersiveInfo
      Whether this ImmersiveInfo contains valid hitboxes that are ready for use by users in-game. ImmersiveInfo.getAllHitboxes() will not be called if this method returns false for a given tick.
      Specified by:
      hasHitboxes in interface ImmersiveInfo
      Overrides:
      hasHitboxes in class AbstractImmersiveInfo
      Returns:
      Whether ImmersiveInfo.getAllHitboxes() can be safely called and contains expected data.
    • isOpen

      public boolean isOpen()
    • setOpennessStorage

      public void setOpennessStorage(ChestOpennessStorage opennessStorage)
    • getForcedOpenness

      public float getForcedOpenness()
    • takeControl

      public boolean takeControl(ChestOpennessStorage.AnimationState animationState)
    • syncOpennessToServerIfDirty

      public void syncOpennessToServerIfDirty()
    • setForcedOpenness

      public void setForcedOpenness(float forcedOpenness)
    • getDirectOpenness

      public float getDirectOpenness()
      Gets the openness from the chest, ignoring the forced openness. Mainly useful since the non-VR code path for opening/closing chests doesn't modify forcedOpenness.
      Returns:
      The openness of the chest as rendered in-world.