public class NPCTutor extends NPCEntity
Modifier and Type | Class and Description |
---|---|
static class |
NPCTutor.LearnableMove |
Modifier and Type | Field and Description |
---|---|
static java.util.ArrayList<ImmutableAttack> |
allTransferMoves |
static java.util.ArrayList<ImmutableAttack> |
allTutorMoves |
java.util.EnumSet<BaseStatsLearnType> |
learnTypes
The costs of being taught the tutor's moves.
|
java.util.List<NPCTutor.LearnableMove> |
moveList
The moves that the tutor can teach.
|
static DataSync<NPCTutor,EnumNPCTutorType> |
SYNC_TUTOR_TYPE |
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, trainer
ambientSoundTime, armorDropChances, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelector, xpReward
animationPosition, 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, zza
blocksBuilding, 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 |
---|
NPCTutor(net.minecraft.entity.EntityType<NPCTutor> type,
net.minecraft.world.World world)
Initializes the tutor.
|
NPCTutor(net.minecraft.world.World world) |
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt) |
boolean |
canLearn(net.minecraft.entity.player.ServerPlayerEntity player,
Pokemon pokemon,
ImmutableAttack attack) |
static void |
decode(net.minecraft.network.PacketBuffer buf,
java.util.ArrayList<Attack> attackList,
java.util.ArrayList<java.util.ArrayList<net.minecraft.item.ItemStack>> costs)
Decodes tutor data from bytes.
|
protected void |
defineSynchedData() |
static void |
encode(net.minecraft.network.PacketBuffer buf,
java.util.ArrayList<Attack> attackList,
java.util.ArrayList<java.util.ArrayList<net.minecraft.item.ItemStack>> costs)
Encodes tutor data into bytes.
|
java.lang.String |
getDisplayText()
Gets the text that displays above the NPC.
|
EnumNPCTutorType |
getTutorType() |
void |
handlePickedPokemon(net.minecraft.entity.player.ServerPlayerEntity player,
Pokemon pokemon) |
void |
init(java.lang.String name)
Initializes the NPC with its name and health.
|
void |
initAI()
Initializes the NPC's AI.
|
net.minecraft.util.ActionResultType |
interactAt(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.vector.Vector3d vector,
net.minecraft.util.Hand hand) |
boolean |
isPushable() |
void |
push(double par1,
double par3,
double par5) |
void |
randomiseMoveList() |
void |
readAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt) |
boolean |
removeWhenFarAway(double p_213397_1_) |
void |
setTutorType(EnumNPCTutorType type) |
bindTexture, canBeLeashed, checkForRarityDespawn, checkSpawnRules, customServerAiStep, define, getAIMode, getBaseTrainer, getBossTier, getCustomSteveTexture, getMaxSpawnClusterSize, getModelScale, getName, getNickName, getNPCID, getNPCInventory, getProfession, getSubTitleText, getTexture, getTextureIndex, hasItemToPlant, hurt, initDefaultAI, initVilagerAI, initWanderingAI, interactWithNPC, isFarmItemInInventory, locateNPCClient, locateNPCServer, locateNPCServer, onSyncedDataUpdated, pickUpItem, playersNearby, save, setAIMode, setBaseTrainer, setCustomSteveTexture, setName, setNickName, setProfession, setSlot, setTextureIndex, shouldSave, tick, unloadEntity
followLeashSpeed, getWalkTargetValue, getWalkTargetValue, isPathFinding, onLeashDistance, tickLeash
aiStep, ate, baseTick, canAttack, canAttackType, canBeControlledByRider, canCutCorner, canFireProjectileWeapon, canHoldItem, canPickUpLoot, canReplaceCurrentItem, canReplaceEqualItem, canTakeItem, checkAndHandleImportantInteractions, 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, wantsToPickUp
actuallyHurt, 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, isPickable, 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, updateSwingTime
absMoveTo, 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, updateSwimming
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final DataSync<NPCTutor,EnumNPCTutorType> SYNC_TUTOR_TYPE
public static java.util.ArrayList<ImmutableAttack> allTutorMoves
public static java.util.ArrayList<ImmutableAttack> allTransferMoves
public final java.util.List<NPCTutor.LearnableMove> moveList
public java.util.EnumSet<BaseStatsLearnType> learnTypes
public NPCTutor(net.minecraft.entity.EntityType<NPCTutor> type, net.minecraft.world.World world)
world
- The world the tutor will spawn in.public NPCTutor(net.minecraft.world.World world)
protected void defineSynchedData()
defineSynchedData
in class NPCEntity
public void init(java.lang.String name)
NPCEntity
public java.lang.String getDisplayText()
NPCEntity
getDisplayText
in class NPCEntity
public void push(double par1, double par3, double par5)
push
in class net.minecraft.entity.Entity
public boolean isPushable()
isPushable
in class NPCEntity
public boolean removeWhenFarAway(double p_213397_1_)
removeWhenFarAway
in class NPCEntity
public void setTutorType(EnumNPCTutorType type)
public EnumNPCTutorType getTutorType()
public void addAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt)
addAdditionalSaveData
in class NPCEntity
public void initAI()
NPCEntity
public void readAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt)
readAdditionalSaveData
in class NPCEntity
public net.minecraft.util.ActionResultType interactAt(net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.math.vector.Vector3d vector, net.minecraft.util.Hand hand)
interactAt
in class NPCEntity
public void handlePickedPokemon(net.minecraft.entity.player.ServerPlayerEntity player, Pokemon pokemon)
public boolean canLearn(net.minecraft.entity.player.ServerPlayerEntity player, Pokemon pokemon, ImmutableAttack attack)
public static void encode(net.minecraft.network.PacketBuffer buf, java.util.ArrayList<Attack> attackList, java.util.ArrayList<java.util.ArrayList<net.minecraft.item.ItemStack>> costs)
buf
- The buffer to store the encoded information into.attackList
- The attacks the tutor can teach.costs
- The costs of the tutor.public static void decode(net.minecraft.network.PacketBuffer buf, java.util.ArrayList<Attack> attackList, java.util.ArrayList<java.util.ArrayList<net.minecraft.item.ItemStack>> costs)
buf
- The buffer to load the encoded information into.attackList
- The attacks the tutor can teach.costs
- The costs of the tutor.public void randomiseMoveList()