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 TypeMethodDescriptionintGets the number of ticks that the player has had an open GUI while in a nether portalbooleanTells whether player has open GUI.booleanReal onGround value, which isn't affected by the client packet.voidsetBlockCollisions(boolean blockCollisions) Sets whether player has block collisions.voidsetEntityCollisions(boolean entityCollisions) Sets whether player has entity collisions (e.voidsetGuiOpenInPortalTicks(int ticks) Sets the number of ticks that the player has had an open GUI while in a nether portalvoidsetOpenGui(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:
isNearGroundin 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:
setBlockCollisionsin 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:
setEntityCollisionsin 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:
setOpenGuiin 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:
hasOpenGuiin 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:
getGuiOpenInPortalTicksin 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:
setGuiOpenInPortalTicksin interfaceGolfer- Parameters:
ticks-
-