类 ServerPlayerGameMode

java.lang.Object
net.minecraft.server.level.ServerPlayerGameMode
直接已知子类:
DemoMode

public class ServerPlayerGameMode extends Object
  • 字段详细资料

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • level

      protected ServerLevel level
    • player

      protected final ServerPlayer player
    • gameModeForPlayer

      private GameType gameModeForPlayer
    • previousGameModeForPlayer

      @Nullable private GameType previousGameModeForPlayer
    • isDestroyingBlock

      private boolean isDestroyingBlock
    • destroyProgressStart

      private int destroyProgressStart
    • destroyPos

      private BlockPos destroyPos
    • gameTicks

      private int gameTicks
    • hasDelayedDestroy

      private boolean hasDelayedDestroy
    • delayedDestroyPos

      private BlockPos delayedDestroyPos
    • delayedTickStart

      private int delayedTickStart
    • lastSentState

      private int lastSentState
  • 构造器详细资料

    • ServerPlayerGameMode

      public ServerPlayerGameMode(ServerPlayer pPlayer)
  • 方法详细资料

    • changeGameModeForPlayer

      public boolean changeGameModeForPlayer(GameType pGameModeForPlayer)
    • setGameModeForPlayer

      protected void setGameModeForPlayer(GameType pGameModeForPlayer, @Nullable GameType pPreviousGameModeForPlayer)
    • getGameModeForPlayer

      public GameType getGameModeForPlayer()
    • getPreviousGameModeForPlayer

      @Nullable public GameType getPreviousGameModeForPlayer()
    • isSurvival

      public boolean isSurvival()
    • isCreative

      public boolean isCreative()
    • tick

      public void tick()
    • incrementDestroyProgress

      private float incrementDestroyProgress(BlockState pState, BlockPos pPos, int p_9279_)
    • debugLogging

      private void debugLogging(BlockPos p_215126_, boolean p_215127_, int p_215128_, String p_215129_)
    • handleBlockBreakAction

      public void handleBlockBreakAction(BlockPos pPos, ServerboundPlayerActionPacket.Action pAction, Direction pFace, int pMaxBuildHeight, int pSequence)
    • destroyAndAck

      public void destroyAndAck(BlockPos pPos, int p_215118_, String p_215119_)
    • destroyBlock

      public boolean destroyBlock(BlockPos pPos)
    • removeBlock

      private boolean removeBlock(BlockPos p_180235_1_, boolean canHarvest)
    • useItem

      public InteractionResult useItem(ServerPlayer pPlayer, Level pLevel, ItemStack pStack, InteractionHand pHand)
    • useItemOn

      public InteractionResult useItemOn(ServerPlayer pPlayer, Level pLevel, ItemStack pStack, InteractionHand pHand, BlockHitResult pHitResult)
    • setLevel

      public void setLevel(ServerLevel pServerLevel)