Package org.rusherhack.client.api.system
Interface IInteractions
public interface IInteractions
Interface for InteractionUtils
-
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.world.phys.BlockHitResultgetBlockHitResult(net.minecraft.core.BlockPos blockPos, boolean strictDir, boolean raytrace, double maxRange) Calculates the best spot to reach a block@Nullable net.minecraft.world.phys.BlockHitResultgetBlockPlaceHitResult(net.minecraft.core.BlockPos blockPos, boolean strictDir, boolean raytrace, double maxRange) Calculates the best relative block that we can place on to place a block at the given positionbooleanplaceBlock(net.minecraft.core.BlockPos blockPos, net.minecraft.world.InteractionHand hand, boolean raytrace) Tries to place a block at the given positionbooleanuseBlock(net.minecraft.core.BlockPos pos, net.minecraft.world.InteractionHand hand, boolean strictDir, boolean raytrace) Tries to right click a blockbooleanuseBlock(net.minecraft.world.phys.BlockHitResult hitResult, net.minecraft.world.InteractionHand hand, boolean trySneaking) Right clicks a block
-
Method Details
-
placeBlock
boolean placeBlock(net.minecraft.core.BlockPos blockPos, net.minecraft.world.InteractionHand hand, boolean raytrace) Tries to place a block at the given position- Parameters:
blockPos-hand-raytrace-- Returns:
- false if unable to place a block at the given position
-
useBlock
boolean useBlock(net.minecraft.core.BlockPos pos, net.minecraft.world.InteractionHand hand, boolean strictDir, boolean raytrace) Tries to right click a block- Parameters:
pos- the position of the blockhand- the hand to useraytrace-- Returns:
- false if unable to use the block
-
useBlock
boolean useBlock(net.minecraft.world.phys.BlockHitResult hitResult, net.minecraft.world.InteractionHand hand, boolean trySneaking) Right clicks a block- Parameters:
hitResult- the hit result of the blockhand- the hand to usetrySneaking- should be true if you are trying to place a block- Returns:
- true if the action was consumed
-
getBlockPlaceHitResult
@Nullable @Nullable net.minecraft.world.phys.BlockHitResult getBlockPlaceHitResult(net.minecraft.core.BlockPos blockPos, boolean strictDir, boolean raytrace, double maxRange) Calculates the best relative block that we can place on to place a block at the given position- Parameters:
blockPos- The position we want to place the block- Returns:
- The best hit result
-
getBlockHitResult
@Nullable @Nullable net.minecraft.world.phys.BlockHitResult getBlockHitResult(net.minecraft.core.BlockPos blockPos, boolean strictDir, boolean raytrace, double maxRange) Calculates the best spot to reach a block- Parameters:
blockPos-raytrace-maxRange-- Returns:
-