Package net.minecraft.server.management
Class PlayerInteractionManager
- java.lang.Object
-
- net.minecraft.server.management.PlayerInteractionManager
-
- Direct Known Subclasses:
DemoPlayerInteractionManager
public class PlayerInteractionManager extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private BlockPos
delayedDestroyPos
private int
delayedTickStart
private BlockPos
destroyPos
private int
destroyProgressStart
private GameType
gameModeForPlayer
private int
gameTicks
private boolean
hasDelayedDestroy
private boolean
isDestroyingBlock
private int
lastSentState
ServerWorld
level
private static org.apache.logging.log4j.Logger
LOGGER
ServerPlayerEntity
player
private GameType
previousGameModeForPlayer
-
Constructor Summary
Constructors Constructor Description PlayerInteractionManager(ServerWorld p_i50702_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroyAndAck(BlockPos p_229860_1_, CPlayerDiggingPacket.Action p_229860_2_, java.lang.String p_229860_3_)
boolean
destroyBlock(BlockPos p_180237_1_)
GameType
getGameModeForPlayer()
GameType
getPreviousGameModeForPlayer()
void
handleBlockBreakAction(BlockPos p_225416_1_, CPlayerDiggingPacket.Action p_225416_2_, Direction p_225416_3_, int p_225416_4_)
private float
incrementDestroyProgress(BlockState p_229859_1_, BlockPos p_229859_2_, int p_229859_3_)
boolean
isCreative()
boolean
isSurvival()
private boolean
removeBlock(BlockPos p_180235_1_, boolean canHarvest)
void
setGameModeForPlayer(GameType p_73076_1_)
void
setGameModeForPlayer(GameType p_241820_1_, GameType p_241820_2_)
void
setLevel(ServerWorld p_73080_1_)
void
tick()
void
updateGameMode(GameType p_73077_1_)
ActionResultType
useItem(ServerPlayerEntity p_187250_1_, World p_187250_2_, ItemStack p_187250_3_, Hand p_187250_4_)
ActionResultType
useItemOn(ServerPlayerEntity p_219441_1_, World p_219441_2_, ItemStack p_219441_3_, Hand p_219441_4_, BlockRayTraceResult p_219441_5_)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
level
public ServerWorld level
-
player
public ServerPlayerEntity player
-
gameModeForPlayer
private GameType gameModeForPlayer
-
previousGameModeForPlayer
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
-
-
Constructor Detail
-
PlayerInteractionManager
public PlayerInteractionManager(ServerWorld p_i50702_1_)
-
-
Method Detail
-
setGameModeForPlayer
public void setGameModeForPlayer(GameType p_73076_1_)
-
getGameModeForPlayer
public GameType getGameModeForPlayer()
-
getPreviousGameModeForPlayer
public GameType getPreviousGameModeForPlayer()
-
isSurvival
public boolean isSurvival()
-
isCreative
public boolean isCreative()
-
updateGameMode
public void updateGameMode(GameType p_73077_1_)
-
tick
public void tick()
-
incrementDestroyProgress
private float incrementDestroyProgress(BlockState p_229859_1_, BlockPos p_229859_2_, int p_229859_3_)
-
handleBlockBreakAction
public void handleBlockBreakAction(BlockPos p_225416_1_, CPlayerDiggingPacket.Action p_225416_2_, Direction p_225416_3_, int p_225416_4_)
-
destroyAndAck
public void destroyAndAck(BlockPos p_229860_1_, CPlayerDiggingPacket.Action p_229860_2_, java.lang.String p_229860_3_)
-
destroyBlock
public boolean destroyBlock(BlockPos p_180237_1_)
-
removeBlock
private boolean removeBlock(BlockPos p_180235_1_, boolean canHarvest)
-
useItem
public ActionResultType useItem(ServerPlayerEntity p_187250_1_, World p_187250_2_, ItemStack p_187250_3_, Hand p_187250_4_)
-
useItemOn
public ActionResultType useItemOn(ServerPlayerEntity p_219441_1_, World p_219441_2_, ItemStack p_219441_3_, Hand p_219441_4_, BlockRayTraceResult p_219441_5_)
-
setLevel
public void setLevel(ServerWorld p_73080_1_)
-
-