public abstract class IndexedNPCEntity extends NPCEntity
Modifier and Type | Field and Description |
---|---|
protected int |
chatIndex
The index of the default dialogue that the chatting NPC is using.
|
protected int |
nameIndex
The index of the default name that the chatting NPC is using.
|
protected java.lang.String |
npcIndex
The index of the NPC's type.
|
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 |
---|
IndexedNPCEntity(net.minecraft.entity.EntityType<? extends IndexedNPCEntity> type,
net.minecraft.world.World world) |
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt) |
boolean |
canBeRiddenInWater(net.minecraft.entity.Entity rider) |
boolean |
canRiderInteract() |
<T> net.minecraftforge.common.util.LazyOptional<T> |
getCapability(net.minecraftforge.common.capabilities.Capability<T> cap) |
java.util.ArrayList<java.lang.String> |
getChat(java.lang.String langCode)
Gets the translated trainer's chat.
|
net.minecraft.entity.EntityClassification |
getClassification(boolean forSpawnCount) |
java.lang.String |
getDisplayText()
Gets the text that displays above the NPC.
|
net.minecraft.entity.Entity |
getEntity() |
java.lang.String |
getName(java.lang.String langCode)
Gets the translated trainer's name.
|
net.minecraftforge.entity.PartEntity<?>[] |
getParts() |
net.minecraft.item.ItemStack |
getPickedResult(net.minecraft.util.math.RayTraceResult target) |
java.lang.String |
getTexture()
Gets the NPC's texture.
|
boolean |
interactWithNPC(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand hand)
Handles a player interacting with the NPC.
|
boolean |
isMultipartEntity() |
void |
push(double par1,
double par3,
double par5) |
void |
readAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt) |
boolean |
shouldRiderSit() |
bindTexture, canBeLeashed, checkForRarityDespawn, checkSpawnRules, customServerAiStep, define, defineSynchedData, getAIMode, getBaseTrainer, getBossTier, getCustomSteveTexture, getMaxSpawnClusterSize, getModelScale, getName, getNickName, getNPCID, getNPCInventory, getProfession, getSubTitleText, getTextureIndex, hasItemToPlant, hurt, init, initAI, initDefaultAI, initVilagerAI, initWanderingAI, interactAt, isFarmItemInInventory, isPushable, locateNPCClient, locateNPCServer, locateNPCServer, onSyncedDataUpdated, pickUpItem, playersNearby, removeWhenFarAway, 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
protected int nameIndex
protected int chatIndex
protected java.lang.String npcIndex
public IndexedNPCEntity(net.minecraft.entity.EntityType<? extends IndexedNPCEntity> type, net.minecraft.world.World world)
public void addAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt)
addAdditionalSaveData
in class NPCEntity
public void readAdditionalSaveData(net.minecraft.nbt.CompoundNBT nbt)
readAdditionalSaveData
in class NPCEntity
public java.lang.String getTexture()
NPCEntity
getTexture
in class 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 interactWithNPC(net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.Hand hand)
NPCEntity
interactWithNPC
in class NPCEntity
player
- The player interacting with the NPC.public java.util.ArrayList<java.lang.String> getChat(java.lang.String langCode)
langCode
- The langCode for translation.public java.lang.String getName(java.lang.String langCode)
langCode
- The langCode for translation.public net.minecraft.entity.Entity getEntity()
public boolean shouldRiderSit()
public net.minecraft.item.ItemStack getPickedResult(net.minecraft.util.math.RayTraceResult target)
public boolean canRiderInteract()
public boolean canBeRiddenInWater(net.minecraft.entity.Entity rider)
public net.minecraft.entity.EntityClassification getClassification(boolean forSpawnCount)
public boolean isMultipartEntity()
@Nullable public net.minecraftforge.entity.PartEntity<?>[] getParts()
@Nonnull public <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(@Nonnull net.minecraftforge.common.capabilities.Capability<T> cap)