Package net.minecraft.server.level
Class DemoMode
java.lang.Object
net.minecraft.server.level.ServerPlayerGameMode
net.minecraft.server.level.DemoMode
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
private int
private boolean
private boolean
private int
static final int
Fields inherited from class net.minecraft.server.level.ServerPlayerGameMode
level, player
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleBlockBreakAction
(BlockPos p_140753_, ServerboundPlayerActionPacket.Action p_140754_, Direction p_140755_, int p_140756_) private void
void
tick()
useItem
(ServerPlayer p_140742_, Level p_140743_, ItemStack p_140744_, InteractionHand p_140745_) useItemOn
(ServerPlayer p_140747_, Level p_140748_, ItemStack p_140749_, InteractionHand p_140750_, BlockHitResult p_140751_) Methods inherited from class net.minecraft.server.level.ServerPlayerGameMode
changeGameModeForPlayer, destroyAndAck, destroyBlock, getGameModeForPlayer, getPreviousGameModeForPlayer, isCreative, isSurvival, setGameModeForPlayer, setLevel
-
Field Details
-
DEMO_DAYS
public static final int DEMO_DAYS- See Also:
-
TOTAL_PLAY_TICKS
public static final int TOTAL_PLAY_TICKS- See Also:
-
displayedIntro
private boolean displayedIntro -
demoHasEnded
private boolean demoHasEnded -
demoEndedReminder
private int demoEndedReminder -
gameModeTicks
private int gameModeTicks
-
-
Constructor Details
-
DemoMode
-
-
Method Details
-
tick
public void tick()- Overrides:
tick
in classServerPlayerGameMode
-
outputDemoReminder
private void outputDemoReminder() -
handleBlockBreakAction
public void handleBlockBreakAction(BlockPos p_140753_, ServerboundPlayerActionPacket.Action p_140754_, Direction p_140755_, int p_140756_) - Overrides:
handleBlockBreakAction
in classServerPlayerGameMode
-
useItem
public InteractionResult useItem(ServerPlayer p_140742_, Level p_140743_, ItemStack p_140744_, InteractionHand p_140745_) - Overrides:
useItem
in classServerPlayerGameMode
-
useItemOn
public InteractionResult useItemOn(ServerPlayer p_140747_, Level p_140748_, ItemStack p_140749_, InteractionHand p_140750_, BlockHitResult p_140751_) - Overrides:
useItemOn
in classServerPlayerGameMode
-