MCPlayerEntity
Link to mcplayerentity
Importare la Classe
Link to importare-la-classe
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.
ZenScript Copyimport crafttweaker.api.player.MCPlayerEntity;
Extending MCLivingEntity
Link to extending-mclivingentity
MCPlayerEntity extends MCLivingEntity. That means all methods available in MCLivingEntity are also available in MCPlayerEntity
Metodi
Link to metodi
Name: addExhaustion
Return Type: void
ZenScript CopyMCPlayerEntity.addExhaustion(exhaustion as float) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro exhaustion | Tipo float | Descrizione No Description Provided |
Name: addExperienceLevels
Return Type: void
ZenScript CopyMCPlayerEntity.addExperienceLevels(levels as int) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro levels | Tipo int | Descrizione No Description Provided |
Name: canUseCommandBlock
Return Type: boolean
ZenScript Copy// MCPlayerEntity.canUseCommandBlock() as boolean
myMCPlayerEntity.canUseCommandBlock();
Name: drop
Return Type: boolean
ZenScript CopyMCPlayerEntity.drop(p_225609_1_ as boolean) as boolean
Parametro | Tipo | Descrizione |
---|---|---|
Parametro p_225609_1_ | Tipo boolean | Descrizione No Description Provided |
Name: getCurrentItem
Return Type: IItemStack
ZenScript Copy// MCPlayerEntity.getCurrentItem() as IItemStack
myMCPlayerEntity.getCurrentItem();
Name: getExperience
Return Type: float
ZenScript Copy// MCPlayerEntity.getExperience() as float
myMCPlayerEntity.getExperience();
Name: getExperienceLevel
Return Type: int
ZenScript Copy// MCPlayerEntity.getExperienceLevel() as int
myMCPlayerEntity.getExperienceLevel();
Name: getExperienceTotal
Return Type: int
ZenScript Copy// MCPlayerEntity.getExperienceTotal() as int
myMCPlayerEntity.getExperienceTotal();
Name: getFoodLevel
Return Type: int
ZenScript Copy// MCPlayerEntity.getFoodLevel() as int
myMCPlayerEntity.getFoodLevel();
Name: getHeldItem
Return Type: IItemStack
ZenScript CopyMCPlayerEntity.getHeldItem(hand as MCHand) as IItemStack
Parametro | Tipo | Descrizione |
---|---|---|
Parametro hand | Tipo MCHand | Descrizione No Description Provided |
Name: getInventory
Return Type: PlayerInventory
ZenScript Copy// MCPlayerEntity.getInventory() as PlayerInventory
myMCPlayerEntity.getInventory();
Name: getInventoryItemStack
Return Type: IItemStack
ZenScript CopyMCPlayerEntity.getInventoryItemStack(slotIndex as int) as IItemStack
Parametro | Tipo | Descrizione |
---|---|---|
Parametro slotIndex | Tipo int | Descrizione No Description Provided |
Name: getLuck
Return Type: float
ZenScript Copy// MCPlayerEntity.getLuck() as float
myMCPlayerEntity.getLuck();
Name: getMaxInPortalTime
Return Type: int
ZenScript Copy// MCPlayerEntity.getMaxInPortalTime() as int
myMCPlayerEntity.getMaxInPortalTime();
Name: getName
Return Type: MCTextComponent
ZenScript Copy// MCPlayerEntity.getName() as MCTextComponent
myMCPlayerEntity.getName();
Name: getPersistentData
Gets the persisted NBT tag that is saved between deaths. Many mods use this to keep track of if they have given the player an item or not.
Return Type: MapData
ZenScript Copy// MCPlayerEntity.getPersistentData() as MapData
myMCPlayerEntity.getPersistentData();
Name: getPortalCooldown
Return Type: int
ZenScript Copy// MCPlayerEntity.getPortalCooldown() as int
myMCPlayerEntity.getPortalCooldown();
Name: getSaturationLevel
Return Type: float
ZenScript Copy// MCPlayerEntity.getSaturationLevel() as float
myMCPlayerEntity.getSaturationLevel();
Name: getSleepTimer
Return Type: int
ZenScript Copy// MCPlayerEntity.getSleepTimer() as int
myMCPlayerEntity.getSleepTimer();
Name: give
Return Type: void
ZenScript CopyMCPlayerEntity.give(stack as IItemStack) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro stack | Tipo IItemStack | Descrizione No Description Provided |
Name: giveExperiencePoints
Return Type: void
ZenScript CopyMCPlayerEntity.giveExperiencePoints(experience as int) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro experience | Tipo int | Descrizione No Description Provided |
Name: isCreative
Return Type: boolean
ZenScript Copy// MCPlayerEntity.isCreative() as boolean
myMCPlayerEntity.isCreative();
Name: isFake
Return Type: boolean
ZenScript Copy// MCPlayerEntity.isFake() as boolean
myMCPlayerEntity.isFake();
Name: isPushedByWater
Return Type: boolean
ZenScript Copy// MCPlayerEntity.isPushedByWater() as boolean
myMCPlayerEntity.isPushedByWater();
Name: isSecondaryUseActive
Return Type: boolean
ZenScript Copy// MCPlayerEntity.isSecondaryUseActive() as boolean
myMCPlayerEntity.isSecondaryUseActive();
Name: isSpectator
Return Type: boolean
ZenScript Copy// MCPlayerEntity.isSpectator() as boolean
myMCPlayerEntity.isSpectator();
Name: isSwimming
Return Type: boolean
ZenScript Copy// MCPlayerEntity.isSwimming() as boolean
myMCPlayerEntity.isSwimming();
Name: isUser
Return Type: boolean
ZenScript Copy// MCPlayerEntity.isUser() as boolean
myMCPlayerEntity.isUser();
Name: needFood
Return Type: boolean
ZenScript Copy// MCPlayerEntity.needFood() as boolean
myMCPlayerEntity.needFood();
Name: sendMessage
Return Type: void
ZenScript CopyMCPlayerEntity.sendMessage(text as MCTextComponent) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro testo | Tipo MCTextComponent | Descrizione No Description Provided |
Name: sendStatusMessage
Return Type: void
ZenScript CopyMCPlayerEntity.sendStatusMessage(text as MCTextComponent, actionBar as boolean) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro testo | Tipo MCTextComponent | Descrizione No Description Provided |
Parametro actionBar | Tipo boolean | Descrizione No Description Provided |
Name: setFoodLevel
Return Type: void
ZenScript CopyMCPlayerEntity.setFoodLevel(value as int) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro valore | Tipo int | Descrizione No Description Provided |
Name: swing
Return Type: void
ZenScript CopyMCPlayerEntity.swing(hand as MCHand, updateSelf as boolean) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro hand | Tipo MCHand | Descrizione No Description Provided |
Parametro updateSelf | Tipo boolean | Descrizione No Description Provided |
Name: unlockRecipes
Return Type: void
ZenScript CopyMCPlayerEntity.unlockRecipes(p_193102_1_ as MCResourceLocation[]) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro p_193102_1_ | Tipo MCResourceLocation[] | Descrizione No Description Provided |
Name: updatePersistentData
Updates the player's persisted data that is saved between deaths.
Return Type: void
ZenScript CopyMCPlayerEntity.updatePersistentData(data as MapData) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro data | Tipo MapData | Descrizione No Description Provided |
Name: wakeUp
Return Type: void
ZenScript Copy// MCPlayerEntity.wakeUp() as void
myMCPlayerEntity.wakeUp();
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter | Descrizione |
---|---|---|---|---|
Nome experience | Tipo float | Ha Getter sì | Ha Setter no | Descrizione No Description Provided |
Nome experienceLevel | Tipo int | Ha Getter sì | Ha Setter no | Descrizione No Description Provided |
Nome experienceTotal | Tipo int | Ha Getter sì | Ha Setter no | Descrizione No Description Provided |
Nome fake | Tipo boolean | Ha Getter sì | Ha Setter no | Descrizione No Description Provided |
Nome foodLevel | Tipo int | Ha Getter sì | Ha Setter sì | Descrizione No Description Provided |
Nome inventory | Tipo PlayerInventory | Ha Getter sì | Ha Setter no | Descrizione No Description Provided |
Nome nome | Tipo MCTextComponent | Ha Getter sì | Ha Setter no | Descrizione No Description Provided |
Nome saturationLevel | Tipo float | Ha Getter sì | Ha Setter no | Descrizione No Description Provided |