public class NPCTrainer extends NPCEntity
| Modifier and Type | Field and Description |
|---|---|
BattleController |
battleController
The battle the Trainer is in.
|
BattleRules |
battleRules |
boolean |
canEngage
Whether players can engage this NPC or not.
|
java.util.ArrayList<java.lang.String> |
forfeitCommands
Commands to execute when the Player forfeits.
|
java.lang.String |
greeting
The Trainer's messages at the start and end of battle.
|
boolean |
isGymLeader
Whether the Trainer is a gym leader.
|
java.util.ArrayList<java.lang.String> |
loseCommands
Commands to execute when the NPC Trainer loses.
|
java.lang.String |
loseMessage
The Trainer's messages at the start and end of battle.
|
java.util.HashMap<java.util.UUID,java.lang.Long> |
playerEncounters
The players battled by the NPC Trainer and when they were last battled.
|
int |
pokemonLevel
The base pokemonLevel of the Trainer's Pokémon.
|
java.util.ArrayList<java.lang.String> |
preBattleCommands
Commands to execute when the Player begins a battle with an NPC.
|
boolean |
usingDefaultGreeting
Whether to use randomly generated fields for the Trainer's messages.
|
boolean |
usingDefaultLose
Whether to use randomly generated fields for the Trainer's messages.
|
boolean |
usingDefaultName
Whether to use randomly generated fields for the Trainer's messages.
|
boolean |
usingDefaultWin
Whether to use randomly generated fields for the Trainer's messages.
|
java.util.ArrayList<java.lang.String> |
winCommands
Commands to execute when the NPC Trainer wins.
|
java.lang.String |
winMessage
The Trainer's messages at the start and end of battle.
|
int |
winMoney
The base amount of money won upon defeating the Trainer.
|
chatIndex, dataSyncManager, despawnCounter, interactCommands, intMaxTicksToDespawn, intMinTicksToDespawn, npcLocation, ONE, SMALLER, SYNC_CUSTOM_STEVE_TEXTURE, SYNC_MODEL, SYNC_NAME, SYNC_NICKNAME, SYNC_PROFESSION, SYNC_TEXTURE_INDEX, TICKSPERSECOND, trainerambientSoundTime, armorDropChances, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelector, xpRewardanimationPosition, animationSpeed, animationSpeedOld, animStep, animStepO, attackAnim, attackStrengthTicker, autoSpinAttackTicks, brain, DATA_HEALTH_ID, DATA_LIVING_ENTITY_FLAGS, dead, deathScore, deathTime, fallFlyTicks, flyingSpeed, hurtDir, hurtDuration, hurtTime, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerTime, lerpHeadSteps, lerpSteps, lerpX, lerpXRot, lerpY, lerpYRot, lerpZ, lyHeadRot, noActionTime, noJumpDelay, oAttackAnim, oRun, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, swinging, swingingArm, swingTime, timeOffs, useItem, useItemRemaining, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zzablocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, ENTITY_COUNTER, entityData, fallDistance, firstTick, fluidHeight, fluidOnEyes, forcedLoading, glowing, hasImpulse, horizontalCollision, hurtMarked, inChunk, invulnerableTime, isInsidePortal, level, LOGGER, maxUpStep, moveDist, noCulling, noPhysics, onGround, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, type, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld| Constructor and Description |
|---|
NPCTrainer(net.minecraft.entity.EntityType<NPCTrainer> type,
net.minecraft.world.World par1World)
Sets up the Trainer and its data watcher attributes.
|
NPCTrainer(net.minecraft.world.World world) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt) |
Quadstate |
calculateGen()
Works out and sets which generation this Trainer is for.
|
boolean |
canStartBattle(net.minecraft.entity.player.PlayerEntity opponent,
boolean printMessages)
Checks if the NPC can start a new battle.
|
net.minecraft.util.ActionResultType |
checkAndHandleImportantInteractions(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand hand) |
protected void |
checkForRarityDespawn()
Keeps track of when to despawn the NPC.
|
void |
clearGreetings() |
protected void |
defineSynchedData() |
BattleAIMode |
getBattleAIMode()
Gets the Trainer's battle AI mode.
|
BattleController |
getBattleController()
Gets the NPC's battle controller.
|
BattleType |
getBattleType()
Gets the Trainer's battle type.
|
BossTier |
getBossTier()
Gets the boss tier of the NPC.
|
TrainerChat |
getChat(java.lang.String langCode)
Gets the Trainer's translated dialogue.
|
java.lang.String |
getDisplayText()
Gets the text that displays above the NPC.
|
EnumEncounterMode |
getEncounterMode()
Gets the Trainer's encounter mode.
|
int |
getEngageDistance()
Gets the Trainer's engage distance in blocks for if they're in an engage AI mode
|
net.minecraft.entity.MobEntity |
getEntity()
Gets the NPC entity.
|
java.lang.String |
getGreeting(java.lang.String langCode)
Gets the translated Trainer's greeting.
|
java.lang.String |
getLoseMessage(java.lang.String langCode)
Gets the translated Trainer's loss message.
|
EnumMegaItemsUnlocked |
getMegaItem() |
java.lang.String |
getName(java.lang.String langCode)
Gets the translated Trainer's name.
|
java.util.UUID |
getNextPokemonUUID()
Gets the ID of the next available Pokémon that the NPC can send out.
|
EnumOldGenMode |
getOldGen() |
TrainerPartyStorage |
getPokemonStorage()
Gets the NPC's Pokémon party.
|
java.lang.String |
getSubTitleText()
Gets the subtitle for the text that displays above the NPC.
|
int |
getTrainerLevel()
Gets the Trainer's displayed pokemonLevel.
|
java.lang.String |
getWinMessage(java.lang.String langCode)
Gets the translated Trainer's victory message.
|
int |
getWinMoney()
Gets the amount of PokeDollars given to the player if they win
|
net.minecraft.item.ItemStack[] |
getWinnings()
Gets the winnings from the NPC Trainer.
|
void |
healAllPokemon()
Heals the NPC's Pokémon.
|
void |
init(BaseTrainer trainer)
Initializes the Trainer's fields.
|
void |
initAI()
Initializes the NPC's AI.
|
void |
initDefaultAI()
Initializes the NPC's AI to stand still.
|
boolean |
interactWithNPC(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand hand)
Handles a player interacting with the NPC.
|
boolean |
isPickable() |
boolean |
isPushable() |
void |
loadPokemon(java.util.ArrayList<Pokemon> pokemonList)
Loads the Trainer's Pokémon.
|
void |
loseBattle(java.util.ArrayList<BattleParticipant> opponents)
Handles events when the NPC loses a battle.
|
void |
onSyncedDataUpdated(net.minecraft.network.datasync.DataParameter<?> key) |
void |
push(double par1,
double par3,
double par5) |
void |
randomisePokemon(net.minecraft.entity.player.PlayerEntity player)
Generates a new party for the Trainer.
|
void |
readAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt) |
PixelmonEntity |
releasePokemon(java.util.UUID newPokemonUUID)
Sends out one of the NPC's Pokémon.
|
void |
restoreAllFriendship()
Restores the trainer's pokemon friendship pokemonLevel to full (for benefit of moves requiring high levels of friendship)
|
void |
setAttackTargetPix(net.minecraft.entity.LivingEntity entity)
Sets an entity for the NPC to target.
|
void |
setBattleAIMode(BattleAIMode mode)
Sets the Trainer's battle AI mode.
|
void |
setBattleController(BattleController battleController)
Sets the NPC's battle controller.
|
void |
setBossTier(BossTier tier)
Sets the boss tier for the Trainer.
|
void |
setEncounterMode(EnumEncounterMode mode)
Sets the Trainer's encounter mode.
|
void |
setEngageDistance(int engageDistance)
Sets the Trainer's engage distance in blocks for if they're in an engage AI mode
|
void |
setMegaItem(EnumMegaItemsUnlocked megaItem) |
void |
setOldGenMode(EnumOldGenMode mode) |
void |
setPokemonLevel(int pokemonLevel) |
void |
setStartRotationYaw(float f)
Sets the rotation of the Trainer.
|
void |
setTrainerType(BaseTrainer model,
net.minecraft.entity.player.PlayerEntity player)
Sets the Trainer's model.
|
void |
startBattle(BattleParticipant battleParticipant)
Starts a battle with the NPC.
|
void |
tick() |
void |
tickLeash() |
void |
update(SetTrainerData p)
Updates the Trainer's data.
|
void |
updateDrops(net.minecraft.item.ItemStack[] drops)
Updates the winnings from the NPC Trainer.
|
void |
updateTrainerLevel()
Updates the Trainer's pokemonLevel based on average pokemonLevel of his/her party
Pokémon.
|
void |
winBattle(java.util.ArrayList<BattleParticipant> opponents)
Handles events when the NPC wins a battle.
|
bindTexture, canBeLeashed, checkSpawnRules, customServerAiStep, define, getAIMode, getBaseTrainer, getCustomSteveTexture, getMaxSpawnClusterSize, getModelScale, getName, getNickName, getNPCID, getNPCInventory, getProfession, getTexture, getTextureIndex, hasItemToPlant, hurt, init, initVilagerAI, initWanderingAI, interactAt, isFarmItemInInventory, locateNPCClient, locateNPCServer, locateNPCServer, pickUpItem, playersNearby, removeWhenFarAway, save, setAIMode, setBaseTrainer, setCustomSteveTexture, setName, setNickName, setProfession, setSlot, setTextureIndex, shouldSave, unloadEntityfollowLeashSpeed, getWalkTargetValue, getWalkTargetValue, isPathFinding, onLeashDistanceaiStep, ate, baseTick, canAttack, canAttackType, canBeControlledByRider, canCutCorner, canFireProjectileWeapon, canHoldItem, canPickUpLoot, canReplaceCurrentItem, canReplaceEqualItem, canTakeItem, checkDespawn, checkMobSpawnRules, checkSpawnObstruction, convertTo, createBodyControl, createLootContext, createMobAttributes, createNavigation, doHurtTarget, dropCustomDeathLoot, dropFromLootTable, dropLeash, enchantSpawnedArmor, enchantSpawnedWeapon, equipItemIfPossible, finalizeSpawn, getAmbientSound, getAmbientSoundInterval, getArmorSlots, getDefaultLootTable, getEquipmentDropChance, getEquipmentForSlot, getEquipmentSlotForItem, getExperienceReward, getHandSlots, getHeadRotSpeed, getItemBySlot, getJumpControl, getLeashHolder, getLookControl, getLootTable, getMainArm, getMaxFallDistance, getMaxHeadXRot, getMaxHeadYRot, getMoveControl, getNavigation, getPathfindingMalus, getRestrictCenter, getRestrictRadius, getSensing, getTarget, handleEntityEvent, hasRestriction, interact, isAggressive, isControlledByLocalInstance, isEffectiveAi, isLeashed, isLeftHanded, isMaxGroupSizeReached, isNoAi, isPersistenceRequired, isSunBurnTick, isValidSlotForItem, isWithinRestriction, isWithinRestriction, jumpInLiquid, lookAt, mobInteract, onOffspringSpawnedFromEgg, playAmbientSound, playHurtSound, populateDefaultEquipmentEnchantments, populateDefaultEquipmentSlots, registerGoals, removeAfterChangingDimensions, requiresCustomPersistence, restrictTo, sendDebugPackets, serverAiStep, setAggressive, setBaby, setCanPickUpLoot, setDelayedLeashHolderId, setDropChance, setGuaranteedDrop, setItemSlot, setItemSlotAndDropWhenKilled, setLeashedTo, setLeftHanded, setNoAi, setPathfindingMalus, setPersistenceRequired, setSpeed, setTarget, setXxa, setYya, setZza, shouldDespawnInPeaceful, shouldPassengersInheritMalus, spawnAnim, startRiding, tickHeadTurn, updateControlFlags, wantsToPickUpactuallyHurt, addEffect, animateHurt, areAllEffectsAmbient, attackable, blockedByShield, blockUsingShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canBeAffected, canBreatheUnderwater, canSee, canSpawnSoulSpeedParticle, canStandOnFluid, causeFallDamage, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, curePotionEffects, decreaseAirSupply, die, doAutoAttackOnTouch, doPush, dropAllDeathLoot, dropEquipment, dropExperience, eat, forceAddEffect, getAbsorptionAmount, getActiveEffects, getActiveEffectsMap, getAddEntityPacket, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBlockSpeedFactor, getBoundingBoxForCulling, getBrain, getCapability, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDeathSound, getDimensions, getDismountPoses, getDrinkingSound, getEatingSound, getEffect, getEyeHeight, getFallDamageSound, getFallFlyingTicks, getFeetBlockState, getFluidFallingAdjustedMovement, getHealth, getHurtSound, getItemInHand, getJumpPower, getKillCredit, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getMainHandItem, getMaxHealth, getMobType, getNoActionTime, getOffhandItem, getProjectile, getRandom, getRelativePortalPosition, getScale, getSleepingPos, getSoundVolume, getSpeed, getStandingEyeHeight, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, heal, hurtArmor, hurtCurrentlyUsedShield, increaseAirSupply, invalidateCaps, isAffectedByFluids, isAffectedByPotions, isAlive, isAlwaysExperienceDropper, isAutoSpinAttack, isBaby, isBlocking, isDeadOrDying, isFallFlying, isHolding, isHolding, isImmobile, isInvertedHealAndHarm, isInWall, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpFromGround, kill, knockback, lerpHeadTo, lerpTo, lookAt, makeBrain, markHurt, onChangedBlock, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onItemPickup, onLeaveCombat, onSoulSpeedBlock, outOfWorld, playBlockFallSound, playEquipSound, push, pushEntities, randomTeleport, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, rideableUnderWater, rideTick, setAbsorptionAmount, setArrowCount, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setOnGround, setRecordPlayingNearby, setSleepingPos, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDropExperience, shouldDropLoot, shouldRemoveSoulSpeed, shouldRiderFaceForward, shouldShowName, spawnSoulSpeedParticle, startAutoSpinAttack, startSleeping, startUsingItem, stopRiding, stopSleeping, stopUsingItem, swing, swing, take, tickDeath, tickEffects, travel, triggerItemUseEffects, tryAddSoulSpeed, updateEffectVisibility, updateFallFlying, updateInvisibilityStatus, updateSwingTimeabsMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkAndResetForcedChunkAdditionFlag, checkAndResetUpdateChunkPos, checkInsideBlocks, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBoundingBox, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyeY, getFireImmuneTicks, getFluidHeight, getFluidJumpThreshold, getForward, getHorizontalDistanceSqr, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMotionDirection, getMyRidingOffset, getOnPos, getPacketCoordinates, getPassengers, getPassengersRidingOffset, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getX, getX, getY, getY, getZ, getZ, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasOnePlayerPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAttackable, isColliding, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFree, isGlowing, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isMovementNoisy, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, killed, lavaHurt, lerpMotion, limitPistonMovement, load, makeFlySound, makeStuckInBlock, maybeBackOffFromEdge, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, pick, playerTouch, playFlySound, playSound, playStepSound, playSwimSound, position, positionRider, processPortalCooldown, reapplyPosition, refreshDimensions, remove, remove, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetPos, restoreFrom, revive, rotate, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowing, setId, setInvisible, setInvulnerable, setLevel, setLocationFromBoundingbox, setNoGravity, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPos, setPosAndOldPos, setPose, setPosRaw, setRemainingFireTicks, setRot, setSecondsOnFire, setSharedFlag, setShiftKeyDown, setSilent, setSwimming, setUUID, setViewScale, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimmingareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCapsclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic boolean usingDefaultName
public boolean usingDefaultGreeting
public boolean usingDefaultWin
public boolean usingDefaultLose
public java.lang.String greeting
public java.lang.String winMessage
public java.lang.String loseMessage
public int winMoney
public int pokemonLevel
public boolean isGymLeader
public transient boolean canEngage
public java.util.HashMap<java.util.UUID,java.lang.Long> playerEncounters
public java.util.ArrayList<java.lang.String> winCommands
public java.util.ArrayList<java.lang.String> loseCommands
public java.util.ArrayList<java.lang.String> forfeitCommands
public java.util.ArrayList<java.lang.String> preBattleCommands
public BattleRules battleRules
public BattleController battleController
public NPCTrainer(net.minecraft.entity.EntityType<NPCTrainer> type, net.minecraft.world.World par1World)
public NPCTrainer(net.minecraft.world.World world)
protected void defineSynchedData()
defineSynchedData in class NPCEntitypublic void init(BaseTrainer trainer)
trainer - The type of Trainer to initialize.public java.lang.String getName(java.lang.String langCode)
langCode - The langCode for translation.public void clearGreetings()
public java.lang.String getGreeting(java.lang.String langCode)
langCode - The langCode for translation.public java.lang.String getWinMessage(java.lang.String langCode)
langCode - The langCode for translation.public java.lang.String getLoseMessage(java.lang.String langCode)
langCode - The langCode for translation.public TrainerChat getChat(java.lang.String langCode)
langCode - The langCode for translation.public int getWinMoney()
public void setEncounterMode(EnumEncounterMode mode)
mode - The new encounter mode.public void setMegaItem(EnumMegaItemsUnlocked megaItem)
public void setOldGenMode(EnumOldGenMode mode)
public EnumEncounterMode getEncounterMode()
public EnumMegaItemsUnlocked getMegaItem()
public EnumOldGenMode getOldGen()
public void setEngageDistance(int engageDistance)
engageDistance - The distance in blocks for the trainer to engage the nearby playerspublic int getEngageDistance()
public void setTrainerType(BaseTrainer model, net.minecraft.entity.player.PlayerEntity player)
model - The new BaseTrainer.player - The player editing the NPC Trainer.public void tickLeash()
tickLeash in class net.minecraft.entity.CreatureEntitypublic void push(double par1,
double par3,
double par5)
push in class net.minecraft.entity.Entitypublic boolean isPickable()
isPickable in class net.minecraft.entity.LivingEntitypublic boolean isPushable()
isPushable in class NPCEntityprotected void checkForRarityDespawn()
NPCEntitycheckForRarityDespawn in class NPCEntitypublic PixelmonEntity releasePokemon(java.util.UUID newPokemonUUID)
public void loadPokemon(java.util.ArrayList<Pokemon> pokemonList)
public void startBattle(BattleParticipant battleParticipant)
battleParticipant - The NPC's opponent in battle.public Quadstate calculateGen()
public void loseBattle(java.util.ArrayList<BattleParticipant> opponents)
opponents - The winning opponents in the battle.public void winBattle(java.util.ArrayList<BattleParticipant> opponents)
opponents - The losing opponents in the battle.public void healAllPokemon()
public void restoreAllFriendship()
public java.util.UUID getNextPokemonUUID()
public int getTrainerLevel()
public boolean interactWithNPC(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand hand)
NPCEntityinteractWithNPC in class NPCEntityplayer - The player interacting with the NPC.public net.minecraft.util.ActionResultType checkAndHandleImportantInteractions(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand hand)
checkAndHandleImportantInteractions in class net.minecraft.entity.MobEntitypublic void addAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt)
addAdditionalSaveData in class NPCEntitypublic boolean canStartBattle(net.minecraft.entity.player.PlayerEntity opponent,
boolean printMessages)
opponent - The player about to battle the NPC.printMessages - Whether to display error messages if the battle cannot be
started.public void readAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt)
readAdditionalSaveData in class NPCEntitypublic void randomisePokemon(net.minecraft.entity.player.PlayerEntity player)
player - The player editing the Trainer.public BossTier getBossTier()
NPCEntitygetBossTier in class NPCEntitypublic void setBossTier(BossTier tier)
tier - The new boss tier for the Trainer.public BattleAIMode getBattleAIMode()
public void setBattleAIMode(BattleAIMode mode)
mode - The new battle AI mode.public BattleType getBattleType()
public void updateTrainerLevel()
public void initDefaultAI()
NPCEntityinitDefaultAI in class NPCEntitypublic void initAI()
NPCEntitypublic void update(SetTrainerData p)
p - The updated Trainer data.public void setStartRotationYaw(float f)
f - The new rotation.public java.lang.String getDisplayText()
NPCEntitygetDisplayText in class NPCEntitypublic java.lang.String getSubTitleText()
NPCEntitygetSubTitleText in class NPCEntitypublic void setBattleController(BattleController battleController)
battleController - The NPC's battle controller.public BattleController getBattleController()
public TrainerPartyStorage getPokemonStorage()
public net.minecraft.entity.MobEntity getEntity()
public void setAttackTargetPix(net.minecraft.entity.LivingEntity entity)
entity - The entity to target.public void updateDrops(net.minecraft.item.ItemStack[] drops)
drops - The updated NPC Trainer winnings.public net.minecraft.item.ItemStack[] getWinnings()
public void setPokemonLevel(int pokemonLevel)
public void onSyncedDataUpdated(net.minecraft.network.datasync.DataParameter<?> key)
onSyncedDataUpdated in class NPCEntity