Package com.hammy275.immersivemc.client
Class ClientUtil
java.lang.Object
com.hammy275.immersivemc.client.ClientUtil
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static ImmersiveConfigScreenInfo
createConfigScreenInfo
(String keyName, Supplier<net.minecraft.world.item.ItemStack> optionItem, Function<ActiveConfig, Boolean> configGetter, BiConsumer<ActiveConfig, Boolean> configSetter) static <I extends ImmersiveInfo>
IfindImmersive
(Immersive<I, ?> immersive, net.minecraft.core.BlockPos pos) static net.minecraft.core.Direction
getClosestDirection
(net.minecraft.world.phys.Vec3 velocity) Get Direction best represented by the velocity of a controllerstatic PlacementMode
static PlacementMode
getPlacementModeIndirect
(boolean leftClickAlreadyDoesSomething) static net.minecraft.util.Tuple<net.minecraft.world.phys.Vec3,
net.minecraft.world.phys.Vec3> getStartAndEndOfLookTrace
(net.minecraft.world.entity.player.Player player) static void
openBag
(net.minecraft.world.entity.player.Player player) static net.minecraft.world.phys.Vec3
Gets player position while accounting for partial ticks (getFrameTime())static void
setRightClickCooldown
(int amount)
-
Field Details
-
maxLight
public static final int maxLight -
immersiveLeftClickCooldown
public static int immersiveLeftClickCooldown
-
-
Constructor Details
-
ClientUtil
public ClientUtil()
-
-
Method Details
-
clearDisabledImmersives
public static void clearDisabledImmersives() -
createConfigScreenInfo
public static ImmersiveConfigScreenInfo createConfigScreenInfo(String keyName, Supplier<net.minecraft.world.item.ItemStack> optionItem, Function<ActiveConfig, Boolean> configGetter, BiConsumer<ActiveConfig, Boolean> configSetter) -
playerPos
public static net.minecraft.world.phys.Vec3 playerPos()Gets player position while accounting for partial ticks (getFrameTime())- Returns:
- Player position while accounting for partial ticks
-
getStartAndEndOfLookTrace
public static net.minecraft.util.Tuple<net.minecraft.world.phys.Vec3,net.minecraft.world.phys.Vec3> getStartAndEndOfLookTrace(net.minecraft.world.entity.player.Player player) -
setRightClickCooldown
public static void setRightClickCooldown(int amount) -
getPlacementModeIndirect
-
getPlacementModeIndirect
-
getClosestDirection
public static net.minecraft.core.Direction getClosestDirection(net.minecraft.world.phys.Vec3 velocity) Get Direction best represented by the velocity of a controller- Parameters:
velocity
- Velocity from getVelocity()- Returns:
- A Direction best representing the current direction of the velocity.
-
openBag
public static void openBag(net.minecraft.world.entity.player.Player player) -
findImmersive
@Nullable public static <I extends ImmersiveInfo> I findImmersive(Immersive<I, ?> immersive, net.minecraft.core.BlockPos pos)
-