Class MultiPlayerGameMode
java.lang.Object
net.minecraft.client.multiplayer.MultiPlayerGameMode
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustPlayer(Player player) voidbooleanbooleancontinueDestroyBlock(BlockPos pos, Direction direction) createPlayer(ClientLevel level, StatsCounter stats, ClientRecipeBook recipeBook) createPlayer(ClientLevel level, StatsCounter stats, ClientRecipeBook recipeBook, Input lastSentInput, boolean wasSprinting) booleandestroyBlock(BlockPos pos) private voidint@Nullable GameTypevoidhandleContainerInput(int containerId, int slotNum, int buttonNum, ContainerInput containerInput, Player player) voidhandleCreativeModeItemAdd(ItemStack clicked, int slot) voidhandleCreativeModeItemDrop(ItemStack clicked) voidhandleInventoryButtonClick(int containerId, int buttonId) voidhandlePickItemFromBlock(BlockPos pos, boolean includeData) voidhandlePickItemFromEntity(Entity entity, boolean includeData) voidhandlePlaceRecipe(int containerId, RecipeDisplayId recipe, boolean useMaxItems) voidhandleSlotStateChanged(int slotId, int containerId, boolean newState) booleanbooleaninteract(Player player, Entity entity, EntityHitResult hitResult, InteractionHand hand) booleanbooleanbooleanprivate InteractionResultperformUseItemOn(LocalPlayer player, InteractionHand hand, BlockHitResult blockHit) voidpiercingAttack(PiercingWeapon weapon) voidreleaseUsingItem(Player player) private booleanvoidsetLocalMode(GameType mode) voidsetLocalMode(GameType mode, @Nullable GameType previousMode) voidbooleanstartDestroyBlock(BlockPos pos, Direction direction) private voidstartPrediction(ClientLevel level, PredictiveAction predictiveAction) voidvoidtick()useItem(Player player, InteractionHand hand) useItemOn(LocalPlayer player, InteractionHand hand, BlockHitResult blockHit)
-
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
-
carriedIndex
private int carriedIndex
-
-
Constructor Details
-
MultiPlayerGameMode
-
-
Method Details
-
adjustPlayer
-
setLocalMode
-
setLocalMode
-
canHurtPlayer
public boolean canHurtPlayer() -
destroyBlock
-
startDestroyBlock
-
stopDestroyBlock
public void stopDestroyBlock() -
continueDestroyBlock
-
startPrediction
-
tick
public void tick() -
sameDestroyTarget
-
ensureHasSentCarriedItem
private void ensureHasSentCarriedItem() -
useItemOn
public InteractionResult useItemOn(LocalPlayer player, InteractionHand hand, BlockHitResult blockHit) -
performUseItemOn
private InteractionResult performUseItemOn(LocalPlayer player, InteractionHand hand, BlockHitResult blockHit) -
useItem
-
createPlayer
-
createPlayer
public LocalPlayer createPlayer(ClientLevel level, StatsCounter stats, ClientRecipeBook recipeBook, Input lastSentInput, boolean wasSprinting) -
attack
-
spectate
-
interact
public InteractionResult interact(Player player, Entity entity, EntityHitResult hitResult, InteractionHand hand) -
handleContainerInput
public void handleContainerInput(int containerId, int slotNum, int buttonNum, ContainerInput containerInput, Player player) -
handlePlaceRecipe
-
handleInventoryButtonClick
public void handleInventoryButtonClick(int containerId, int buttonId) -
handleCreativeModeItemAdd
-
handleCreativeModeItemDrop
-
releaseUsingItem
-
piercingAttack
-
hasExperience
public boolean hasExperience() -
hasMissTime
public boolean hasMissTime() -
isServerControlledInventory
public boolean isServerControlledInventory() -
isSpectator
public boolean isSpectator() -
getPreviousPlayerMode
-
getPlayerMode
-
isDestroying
public boolean isDestroying() -
getDestroyStage
public int getDestroyStage() -
handlePickItemFromBlock
-
handlePickItemFromEntity
-
handleSlotStateChanged
public void handleSlotStateChanged(int slotId, int containerId, boolean newState)
-