Package org.samo_lego.golfiv.mixin
Class ServerPlayerEntityMixinCast_Golfer
java.lang.Object
org.samo_lego.golfiv.mixin.ServerPlayerEntityMixinCast_Golfer
- All Implemented Interfaces:
Golfer
Additional methods and fields for PlayerEntities.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the number of ticks that the player has had an open GUI while in a nether portalboolean
Tells whether player has open GUI.boolean
Real onGround value, which isn't affected by the client packet.void
setBlockCollisions
(boolean blockCollisions) Sets whether player has block collisions.void
setEntityCollisions
(boolean entityCollisions) Sets whether player has entity collisions (e.void
setGuiOpenInPortalTicks
(int ticks) Sets the number of ticks that the player has had an open GUI while in a nether portalvoid
setOpenGui
(boolean openGui) Sets whether player has opened GUI.
-
Field Details
-
server
public net.minecraft.server.MinecraftServer server
-
-
Constructor Details
-
ServerPlayerEntityMixinCast_Golfer
public ServerPlayerEntityMixinCast_Golfer()
-
-
Method Details
-
isNearGround
public boolean isNearGround()Real onGround value, which isn't affected by the client packet.- Specified by:
isNearGround
in interfaceGolfer
- Returns:
- true if player is near ground (0.5001 block tolerance), otherwise false.
-
setBlockCollisions
public void setBlockCollisions(boolean blockCollisions) Sets whether player has block collisions.- Specified by:
setBlockCollisions
in interfaceGolfer
- Parameters:
blockCollisions
- whether player has block collisions.
-
setEntityCollisions
public void setEntityCollisions(boolean entityCollisions) Sets whether player has entity collisions (e. g. boat collisions).- Specified by:
setEntityCollisions
in interfaceGolfer
- Parameters:
entityCollisions
- whether player has entity collisions.
-
setOpenGui
public void setOpenGui(boolean openGui) Sets whether player has opened GUI. Doesn't catch opening their own inventory.- Specified by:
setOpenGui
in interfaceGolfer
- Parameters:
openGui
- whether player has opened the GUI.
-
hasOpenGui
public boolean hasOpenGui()Tells whether player has open GUI. Doesn't catch their own inventory being open.- Specified by:
hasOpenGui
in interfaceGolfer
- Returns:
- true if player has open GUI, otherwise false
-
getGuiOpenInPortalTicks
public int getGuiOpenInPortalTicks()Gets the number of ticks that the player has had an open GUI while in a nether portal- Specified by:
getGuiOpenInPortalTicks
in interfaceGolfer
- Returns:
- number of ticks, greater than or equal to 0
-
setGuiOpenInPortalTicks
public void setGuiOpenInPortalTicks(int ticks) Sets the number of ticks that the player has had an open GUI while in a nether portal- Specified by:
setGuiOpenInPortalTicks
in interfaceGolfer
- Parameters:
ticks
-
-