MCPlayerEntity
This class was added by a mod with mod-id crafttweaker
. So you need to have this mod installed if you want to use this feature.
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker.api.player.MCPlayerEntity;
Extending MCLivingEntity
MCPlayerEntity extends MCLivingEntity. That means all methods available in MCLivingEntity are also available in MCPlayerEntity
Methods
canUseCommandBlock
Return Type: boolean
MCPlayerEntity.canUseCommandBlock() as boolean
myMCPlayerEntity.canUseCommandBlock();
drop
Return Type: boolean
MCPlayerEntity.drop(p_225609_1_ as boolean) as boolean
Parameter | Type | Description |
---|
p_225609_1_ | boolean | No Description Provided |
getLuck
Return Type: float
MCPlayerEntity.getLuck() as float
myMCPlayerEntity.getLuck();
getMaxInPortalTime
Return Type: int
MCPlayerEntity.getMaxInPortalTime() as int
myMCPlayerEntity.getMaxInPortalTime();
getPortalCooldown
Return Type: int
MCPlayerEntity.getPortalCooldown() as int
myMCPlayerEntity.getPortalCooldown();
getSleepTimer
Return Type: int
MCPlayerEntity.getSleepTimer() as int
myMCPlayerEntity.getSleepTimer();
isCreative
Return Type: boolean
MCPlayerEntity.isCreative() as boolean
myMCPlayerEntity.isCreative();
isFake
Return Type: boolean
MCPlayerEntity.isFake() as boolean
myMCPlayerEntity.isFake();
isPushedByWater
Return Type: boolean
MCPlayerEntity.isPushedByWater() as boolean
myMCPlayerEntity.isPushedByWater();
isSecondaryUseActive
Return Type: boolean
MCPlayerEntity.isSecondaryUseActive() as boolean
myMCPlayerEntity.isSecondaryUseActive();
isSpectator
Return Type: boolean
MCPlayerEntity.isSpectator() as boolean
myMCPlayerEntity.isSpectator();
isSwimming
Return Type: boolean
MCPlayerEntity.isSwimming() as boolean
myMCPlayerEntity.isSwimming();
isUser
Return Type: boolean
MCPlayerEntity.isUser() as boolean
myMCPlayerEntity.isUser();
sendMessage
Return Type: void
MCPlayerEntity.sendMessage(text as MCTextComponent) as void
unlockRecipes
Return Type: void
MCPlayerEntity.unlockRecipes(p_193102_1_ as MCResourceLocation[]) as void
wakeUp
Return Type: void
MCPlayerEntity.wakeUp() as void
myMCPlayerEntity.wakeUp();
Properties
Name | Type | Has Getter | Has Setter |
---|
fake | boolean | true | false |