Class ChestInfo
java.lang.Object
com.hammy275.immersivemc.client.immersive.info.AbstractImmersiveInfo
com.hammy275.immersivemc.client.immersive.info.AbstractBlockBasedImmersiveInfo
com.hammy275.immersivemc.client.immersive.info.ChestInfo
- All Implemented Interfaces:
BlockBasedImmersiveInfo, ImmersiveInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionnet.minecraft.world.level.block.entity.BlockEntitynet.minecraft.core.Directionintnet.minecraft.world.phys.Vec3net.minecraft.world.level.block.entity.BlockEntitynet.minecraft.core.BlockPosprotected intFields inherited from class AbstractBlockBasedImmersiveInfo
posFields inherited from class AbstractImmersiveInfo
hitboxes, slotsHovered, ticksExisted -
Constructor Summary
ConstructorsConstructorDescriptionChestInfo(net.minecraft.world.level.block.entity.BlockEntity chest, net.minecraft.world.level.block.entity.BlockEntity otherChest) -
Method Summary
Modifier and TypeMethodDescriptionfloatGets the openness from the chest, ignoring the forced openness.floatintgetNextRow(int rowIn) intbooleanWhether this ImmersiveInfo contains valid hitboxes that are ready for use by users in-game.booleanisOpen()voidnextRow()voidsetForcedOpenness(float forcedOpenness) voidsetOpennessStorage(ChestOpennessStorage opennessStorage) voidbooleantakeControl(ChestOpennessStorage.AnimationState animationState) Methods inherited from class AbstractBlockBasedImmersiveInfo
getBlockPositionMethods inherited from class AbstractImmersiveInfo
getSlotHovered, getTicksExisted, isSlotHovered, setSlotHovered, tickMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ImmersiveInfo
getSlotHovered, getTicksExisted, setSlotHovered
-
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
-
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
- Specified by:
getAllHitboxesin interfaceImmersiveInfo- Overrides:
getAllHitboxesin classAbstractImmersiveInfo- 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:ImmersiveInfoWhether 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:
hasHitboxesin interfaceImmersiveInfo- Overrides:
hasHitboxesin classAbstractImmersiveInfo- Returns:
- Whether
ImmersiveInfo.getAllHitboxes()can be safely called and contains expected data.
-
isOpen
public boolean isOpen() -
setOpennessStorage
-
getForcedOpenness
public float getForcedOpenness() -
takeControl
-
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.
-