ImmersiveLogicHelpers, but the player is always assumed to be the local player, and the world/level is
the one that player occupies. This also contains methods not found in ImmersiveLogicHelpers, as they
should only run on the client.
Sets both the vanilla, right-click cooldown and ImmersiveMC's VR cooldown for interacting with Immersives
(if the player is in VR) to some number of ticks.
Methods inherited from interface com.hammy275.immersivemc.api.common.ImmersiveLogicHelpers
An ImmersiveClientLogicHelpers instance to access API functions. All details of this object not
mentioned in this file are assumed to be an implementation detail, and may change at any time.
setCooldown
voidsetCooldown(int cooldown)
Sets both the vanilla, right-click cooldown and ImmersiveMC's VR cooldown for interacting with Immersives
(if the player is in VR) to some number of ticks. You likely don't need this, as the value returned from
Immersive.handleHitboxInteract(ImmersiveInfo, LocalPlayer, int, InteractionHand) is set as the cooldown
where appropriate. This is mainly useful if you're working outside of ImmersiveMC's hitbox system.
Parameters:
cooldown - The cooldown to set in ticks.
sendSwapPacket
voidsendSwapPacket(net.minecraft.core.BlockPos pos,
int slot,
net.minecraft.world.InteractionHand hand)
Given the local player and the position of an immersive block, returns the best direction the block should face
to be looking towards the player. This is most commonly used for blocks like the crafting table which don't face
a direction to come up with a good estimation. This method will always return NORTH, EAST, SOUTH, or WEST.
Parameters:
blockPos - The block to determine the facing direction of.
Returns:
A direction the block is facing, excluding UP and DOWN.
getLight
intgetLight(net.minecraft.core.BlockPos pos)
Get the intended light level to render with at the given position as packed sky light and block light. This
may not necessarily return the actual light level at the given block, though it should be treated as such.
Parameters:
pos - The position to get the intended light level for rendering at.
Get the intended light level to render with given several positions. The value returned is a packed sky light
and block light, and intentionally may not necessarily return data consistent with all the positions, though
should be treated as such.
Parameters:
positions - The positions to get the intended light rendering for.