Package net.minecraft.client.multiplayer
Class MultiPlayerGameMode
java.lang.Object
net.minecraft.client.multiplayer.MultiPlayerGameMode
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private final ClientPacketListener
private BlockPos
private int
private ItemStack
private float
private float
private boolean
private GameType
private static final org.slf4j.Logger
private static final int
private final Minecraft
private GameType
private final it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<com.mojang.datafixers.util.Pair<BlockPos,
ServerboundPlayerActionPacket.Action>, Vec3> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustPlayer
(Player p_105222_) void
boolean
boolean
continueDestroyBlock
(BlockPos p_105284_, Direction p_105285_) createPlayer
(ClientLevel p_105247_, StatsCounter p_105248_, ClientRecipeBook p_105249_) createPlayer
(ClientLevel p_105251_, StatsCounter p_105252_, ClientRecipeBook p_105253_, boolean p_105254_, boolean p_105255_) boolean
destroyBlock
(BlockPos p_105268_) private void
float
void
handleBlockBreakAck
(ClientLevel p_105257_, BlockPos p_105258_, BlockState p_105259_, ServerboundPlayerActionPacket.Action p_105260_, boolean p_105261_) void
handleCreativeModeItemAdd
(ItemStack p_105242_, int p_105243_) void
handleCreativeModeItemDrop
(ItemStack p_105240_) void
handleInventoryButtonClick
(int p_105209_, int p_105210_) void
handleInventoryMouseClick
(int p_171800_, int p_171801_, int p_171802_, ClickType p_171803_, Player p_171804_) void
handlePickItem
(int p_105207_) void
handlePlaceRecipe
(int p_105218_, Recipe<?> p_105219_, boolean p_105220_) boolean
boolean
boolean
boolean
interact
(Player p_105227_, Entity p_105228_, InteractionHand p_105229_) interactAt
(Player p_105231_, Entity p_105232_, EntityHitResult p_105233_, InteractionHand p_105234_) boolean
boolean
boolean
void
releaseUsingItem
(Player p_105278_) private boolean
sameDestroyTarget
(BlockPos p_105282_) private void
sendBlockAction
(ServerboundPlayerActionPacket.Action p_105273_, BlockPos p_105274_, Direction p_105275_) void
setLocalMode
(GameType p_105280_) void
setLocalMode
(GameType p_171806_, GameType p_171807_) boolean
startDestroyBlock
(BlockPos p_105270_, Direction p_105271_) void
void
tick()
useItem
(Player p_105236_, Level p_105237_, InteractionHand p_105238_) useItemOn
(LocalPlayer p_105263_, ClientLevel p_105264_, InteractionHand p_105265_, BlockHitResult p_105266_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
minecraft
-
connection
-
destroyBlockPos
-
destroyingItem
-
destroyProgress
private float destroyProgress -
destroyTicks
private float destroyTicks -
destroyDelay
private int destroyDelay -
isDestroying
private boolean isDestroying -
localPlayerMode
-
previousLocalPlayerMode
-
unAckedActions
private final it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<com.mojang.datafixers.util.Pair<BlockPos,ServerboundPlayerActionPacket.Action>, unAckedActionsVec3> -
MAX_ACTIONS_SIZE
private static final int MAX_ACTIONS_SIZE- See Also:
-
carriedIndex
private int carriedIndex
-
-
Constructor Details
-
MultiPlayerGameMode
-
-
Method Details
-
adjustPlayer
-
setLocalMode
-
setLocalMode
-
canHurtPlayer
public boolean canHurtPlayer() -
destroyBlock
-
startDestroyBlock
-
stopDestroyBlock
public void stopDestroyBlock() -
continueDestroyBlock
-
getPickRange
public float getPickRange() -
tick
public void tick() -
sameDestroyTarget
-
ensureHasSentCarriedItem
private void ensureHasSentCarriedItem() -
useItemOn
public InteractionResult useItemOn(LocalPlayer p_105263_, ClientLevel p_105264_, InteractionHand p_105265_, BlockHitResult p_105266_) -
useItem
-
createPlayer
public LocalPlayer createPlayer(ClientLevel p_105247_, StatsCounter p_105248_, ClientRecipeBook p_105249_) -
createPlayer
public LocalPlayer createPlayer(ClientLevel p_105251_, StatsCounter p_105252_, ClientRecipeBook p_105253_, boolean p_105254_, boolean p_105255_) -
attack
-
interact
-
interactAt
public InteractionResult interactAt(Player p_105231_, Entity p_105232_, EntityHitResult p_105233_, InteractionHand p_105234_) -
handleInventoryMouseClick
-
handlePlaceRecipe
-
handleInventoryButtonClick
public void handleInventoryButtonClick(int p_105209_, int p_105210_) -
handleCreativeModeItemAdd
-
handleCreativeModeItemDrop
-
releaseUsingItem
-
hasExperience
public boolean hasExperience() -
hasMissTime
public boolean hasMissTime() -
hasInfiniteItems
public boolean hasInfiniteItems() -
hasFarPickRange
public boolean hasFarPickRange() -
isServerControlledInventory
public boolean isServerControlledInventory() -
isAlwaysFlying
public boolean isAlwaysFlying() -
getPreviousPlayerMode
-
getPlayerMode
-
isDestroying
public boolean isDestroying() -
handlePickItem
public void handlePickItem(int p_105207_) -
sendBlockAction
private void sendBlockAction(ServerboundPlayerActionPacket.Action p_105273_, BlockPos p_105274_, Direction p_105275_) -
handleBlockBreakAck
public void handleBlockBreakAck(ClientLevel p_105257_, BlockPos p_105258_, BlockState p_105259_, ServerboundPlayerActionPacket.Action p_105260_, boolean p_105261_)
-