Package net.minecraft.client.network
Class ClientPlayerInteractionManager
java.lang.Object
net.minecraft.client.network.ClientPlayerInteractionManager
@Environment(CLIENT) public class ClientPlayerInteractionManager extends Object
-
Field Summary
Fields Modifier and Type Field Description private intblockBreakingCooldownprivate floatblockBreakingSoundCooldownprivate booleanbreakingBlockprivate MinecraftClientclientprivate BlockPoscurrentBreakingPosprivate floatcurrentBreakingProgressprivate GameModegameModeprivate intlastSelectedSlotprivate static LoggerLOGGERprivate ClientPlayNetworkHandlernetworkHandlerprivate GameModepreviousGameModeprivate ItemStackselectedStackprivate Object2ObjectLinkedOpenHashMap<com.mojang.datafixers.util.Pair<BlockPos,PlayerActionC2SPacket.Action>,Vec3d>unacknowledgedPlayerActions -
Constructor Summary
Constructors Constructor Description ClientPlayerInteractionManager(MinecraftClient client, ClientPlayNetworkHandler networkHandler) -
Method Summary
-
Field Details
-
LOGGER
-
client
-
networkHandler
-
currentBreakingPos
-
selectedStack
-
currentBreakingProgress
private float currentBreakingProgress -
blockBreakingSoundCooldown
private float blockBreakingSoundCooldown -
blockBreakingCooldown
private int blockBreakingCooldown -
breakingBlock
private boolean breakingBlock -
gameMode
-
previousGameMode
-
unacknowledgedPlayerActions
private final Object2ObjectLinkedOpenHashMap<com.mojang.datafixers.util.Pair<BlockPos,PlayerActionC2SPacket.Action>,Vec3d> unacknowledgedPlayerActions -
lastSelectedSlot
private int lastSelectedSlot
-
-
Constructor Details
-
ClientPlayerInteractionManager
public ClientPlayerInteractionManager(MinecraftClient client, ClientPlayNetworkHandler networkHandler)
-
-
Method Details
-
copyAbilities
-
method_32790
-
setGameMode
-
hasStatusBars
public boolean hasStatusBars() -
breakBlock
-
attackBlock
-
cancelBlockBreaking
public void cancelBlockBreaking() -
updateBlockBreakingProgress
-
getReachDistance
public float getReachDistance() -
tick
public void tick() -
isCurrentlyBreaking
-
syncSelectedSlot
private void syncSelectedSlot() -
interactBlock
public ActionResult interactBlock(ClientPlayerEntity player, ClientWorld world, Hand hand, BlockHitResult hitResult) -
interactItem
-
createPlayer
public ClientPlayerEntity createPlayer(ClientWorld world, StatHandler statHandler, ClientRecipeBook recipeBook) -
createPlayer
public ClientPlayerEntity createPlayer(ClientWorld world, StatHandler statHandler, ClientRecipeBook recipeBook, boolean lastSneaking, boolean lastSprinting) -
attackEntity
-
interactEntity
-
interactEntityAtLocation
public ActionResult interactEntityAtLocation(PlayerEntity player, Entity entity, EntityHitResult hitResult, Hand hand) -
clickSlot
public ItemStack clickSlot(int syncId, int slotId, int clickData, SlotActionType actionType, PlayerEntity player) -
clickRecipe
-
clickButton
public void clickButton(int syncId, int buttonId) -
clickCreativeStack
-
dropCreativeStack
-
stopUsingItem
-
hasExperienceBar
public boolean hasExperienceBar() -
hasLimitedAttackSpeed
public boolean hasLimitedAttackSpeed() -
hasCreativeInventory
public boolean hasCreativeInventory() -
hasExtendedReach
public boolean hasExtendedReach() -
hasRidingInventory
public boolean hasRidingInventory() -
isFlyingLocked
public boolean isFlyingLocked() -
getPreviousGameMode
-
getCurrentGameMode
-
isBreakingBlock
public boolean isBreakingBlock() -
pickFromInventory
public void pickFromInventory(int slot) -
sendPlayerAction
private void sendPlayerAction(PlayerActionC2SPacket.Action action, BlockPos pos, Direction direction) -
processPlayerActionResponse
public void processPlayerActionResponse(ClientWorld world, BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved)
-