Class NPCChatting

java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.entity.Entity>
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.Mob
net.minecraft.world.entity.PathfinderMob
All Implemented Interfaces:
net.minecraft.commands.CommandSource, net.minecraft.world.entity.Attackable, net.minecraft.world.entity.npc.Npc, net.minecraft.world.entity.Targeting, net.minecraft.world.item.trading.Merchant, net.minecraft.world.level.entity.EntityAccess, net.minecraft.world.Nameable, net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.entity.Entity>, net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>, net.minecraftforge.common.extensions.IForgeEntity, net.minecraftforge.common.extensions.IForgeLivingEntity, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Direct Known Subclasses:
NPCFisherman, NPCQuestGiver

public class NPCChatting extends IndexedNPCEntity implements net.minecraft.world.item.trading.Merchant
An NPC who says dialogue.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.entity.LivingEntity

    net.minecraft.world.entity.LivingEntity.Fallsounds

    Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity

    net.minecraft.world.entity.Entity.MoveFunction, net.minecraft.world.entity.Entity.MovementEmission, net.minecraft.world.entity.Entity.RemovalReason

    Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected EnumNPCType
     
    protected net.minecraft.world.item.trading.MerchantOffers
     

    Fields inherited from class com.pixelmonmod.pixelmon.entities.npcs.IndexedNPCEntity

    chatIndex, nameIndex, npcIndex

    Fields inherited from class net.minecraft.world.entity.PathfinderMob

    DEFAULT_WALK_TARGET_VALUE

    Fields inherited from class net.minecraft.world.entity.Mob

    ambientSoundTime, armorDropChances, DEFAULT_EQUIPMENT_DROP_CHANCE, goalSelector, handDropChances, jumpControl, LEASH_TAG, lookControl, MAX_ENCHANTED_ARMOR_CHANCE, MAX_ENCHANTED_WEAPON_CHANCE, MAX_PICKUP_LOOT_CHANCE, MAX_WEARING_ARMOR_CHANCE, moveControl, navigation, PICKUP_REACH, PRESERVE_ITEM_DROP_CHANCE, targetSelector, UPDATE_GOAL_SELECTOR_EVERY_N_TICKS, xpReward

    Fields inherited from class net.minecraft.world.entity.LivingEntity

    animStep, animStepO, ARMOR_SLOT_OFFSET, ARMOR_SLOTS, attackAnim, attackStrengthTicker, autoSpinAttackTicks, brain, DATA_HEALTH_ID, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathScore, deathTime, DEFAULT_BASE_GRAVITY, DEFAULT_EYE_HEIGHT, EQUIPMENT_SLOT_OFFSET, EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT, fallFlyTicks, HAND_SLOTS, hurtDuration, hurtTime, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerTime, lerpHeadSteps, lerpSteps, lerpX, lerpXRot, lerpY, lerpYHeadRot, lerpYRot, lerpZ, LIVING_ENTITY_FLAG_IS_USING, LIVING_ENTITY_FLAG_OFF_HAND, LIVING_ENTITY_FLAG_SPIN_ATTACK, MIN_MOVEMENT_DISTANCE, noActionTime, noJumpDelay, oAttackAnim, oRun, PLAYER_HURT_EXPERIENCE_TIME, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, SWING_DURATION, swinging, swingingArm, swingTime, timeOffs, USE_ITEM_INTERVAL, useItem, useItemRemaining, walkAnimation, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza

    Fields inherited from class net.minecraft.world.entity.Entity

    BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, dimensions, ENTITY_COUNTER, entityData, eyeHeight, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, level, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, onGround, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRot, xRotO, yo, yOld, yRot, yRotO, zo, zOld

    Fields inherited from interface net.minecraft.commands.CommandSource

    NULL
  • Constructor Summary

    Constructors
    Constructor
    Description
    NPCChatting(net.minecraft.world.entity.EntityType<? extends NPCChatting> type, net.minecraft.world.level.Level world)
    Initializes a chatting NPC.
    NPCChatting(net.minecraft.world.level.Level world)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAdditionalSaveData(net.minecraft.nbt.CompoundTag nbt)
     
    protected void
    addOffersFromItemListings(net.minecraft.world.item.trading.MerchantOffers p_213717_1_, net.minecraft.world.entity.npc.VillagerTrades.ItemListing[] p_213717_2_, int amountOfItemsToAdd)
     
    protected void
    addParticlesAroundSelf(net.minecraft.core.particles.ParticleOptions p_213718_1_)
     
    net.minecraft.world.entity.Entity
    changeDimension(net.minecraft.server.level.ServerLevel p_241206_1_, net.minecraftforge.common.util.ITeleporter teleporter)
     
    void
    cycleTexture(net.minecraft.server.level.ServerPlayer p, ClientNPCData newData)
    Changes the chatting NPC's type.
    void
    die(net.minecraft.world.damagesource.DamageSource p_70645_1_)
     
    double
    getAttributeValue(net.minecraft.world.entity.ai.attributes.Attribute attribute)
     
    getChat(String langCode)
    Gets the translated trainer's chat.
    Gets the text that displays above the NPC.
    net.minecraft.world.SimpleContainer
     
    net.minecraft.world.level.Level
     
    getName(String langCode)
    Gets the translated trainer's name.
    net.minecraft.sounds.SoundEvent
     
    net.minecraft.world.item.trading.MerchantOffers
     
    Gets the NPC's texture.
    protected net.minecraft.sounds.SoundEvent
    getTradeUpdatedSound(boolean p_213721_1_)
     
    net.minecraft.world.entity.player.Player
     
    int
     
    void
    Initializes the chatting NPC from JSON data.
    void
     
    void
    init(String name)
    Initializes the NPC with its name and health.
    boolean
    interactWithNPC(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
    Handles a player interacting with the NPC.
    boolean
     
    boolean
     
    boolean
     
    void
    notifyTrade(net.minecraft.world.item.trading.MerchantOffer p_213704_1_)
     
    void
    notifyTradeUpdated(net.minecraft.world.item.ItemStack p_110297_1_)
     
    void
    overrideOffers(net.minecraft.world.item.trading.MerchantOffers p_213703_1_)
     
    void
    overrideXp(int p_213702_1_)
     
    void
     
    void
    push(double par1, double par3, double par5)
     
    void
    readAdditionalSaveData(net.minecraft.nbt.CompoundTag nbt)
     
    protected void
    rewardTradeXp(net.minecraft.world.item.trading.MerchantOffer p_213713_1_)
     
    void
    Sets the dialogue of the chatting NPC.
    void
    Sets the NPC's name.
    void
    setTradingPlayer(net.minecraft.world.entity.player.Player p_70932_1_)
     
    boolean
     
    boolean
    startTradingWith(net.minecraft.world.entity.player.Player player)
     
    protected void
     
    protected void
     

    Methods inherited from class com.pixelmonmod.pixelmon.entities.npcs.IndexedNPCEntity

    canRiderInteract, getCapability, getParts, getPickedResult, isMultipartEntity, shouldRiderSit

    Methods inherited from class net.minecraft.world.entity.PathfinderMob

    followLeashSpeed, getWalkTargetValue, getWalkTargetValue, isPanicking, isPathFinding, onLeashDistance, shouldStayCloseToLeashHolder, tickLeash

    Methods inherited from class net.minecraft.world.entity.Mob

    aiStep, ate, baseTick, canAttackType, canFireProjectileWeapon, canHoldItem, canPickUpLoot, canReplaceCurrentItem, canReplaceEqualItem, canTakeItem, checkAndHandleImportantInteractions, checkDespawn, checkMobSpawnRules, checkSpawnObstruction, clearRestriction, convertTo, createBodyControl, createMobAttributes, createNavigation, doHurtTarget, dropCustomDeathLoot, dropFromLootTable, dropLeash, enchantSpawnedArmor, enchantSpawnedWeapon, equipItemIfPossible, finalizeSpawn, getAmbientSound, getAmbientSoundInterval, getArmorSlots, getAttackBoundingBox, getControllingPassenger, getDefaultLootTable, getEquipmentDropChance, getEquipmentForSlot, getExperienceReward, getHandSlots, getHeadRotSpeed, getItemBySlot, getJumpControl, getLeashHolder, getLookControl, getLootTable, getLootTableSeed, getMainArm, getMaxFallDistance, getMaxHeadXRot, getMaxHeadYRot, getMoveControl, getNavigation, getPathfindingMalus, getPickResult, getPickupReach, getRestrictCenter, getRestrictRadius, getSensing, getSpawnType, getTarget, handleEntityEvent, hasRestriction, interact, isAggressive, isEffectiveAi, isLeashed, isLeftHanded, isMaxGroupSizeReached, isNoAi, isPersistenceRequired, isSpawnCancelled, isSunBurnTick, isWithinMeleeAttackRange, isWithinRestriction, isWithinRestriction, jumpInFluid, jumpInLiquid, lookAt, mobInteract, onOffspringSpawnedFromEgg, onPathfindingDone, onPathfindingStart, playAmbientSound, playHurtSound, populateDefaultEquipmentEnchantments, populateDefaultEquipmentSlots, registerGoals, removeAfterChangingDimensions, removeAllGoals, removeFreeWill, requiresCustomPersistence, restrictTo, sendDebugPackets, serverAiStep, setAggressive, setBaby, setCanPickUpLoot, setDelayedLeashHolderId, setDropChance, setGuaranteedDrop, setItemSlot, setItemSlotAndDropWhenKilled, setLeashedTo, setLeftHanded, setNoAi, setPathfindingMalus, setPersistenceRequired, setSpawnCancelled, setSpeed, setTarget, setXxa, setYya, setZza, shouldDespawnInPeaceful, shouldPassengersInheritMalus, spawnAnim, startRiding, tickHeadTurn, updateControlFlags, wantsToPickUp

    Methods inherited from class net.minecraft.world.entity.LivingEntity

    actuallyHurt, addEffect, addEffect, animateHurt, areAllEffectsAmbient, attackable, blockedByShield, blockUsingShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canBeAffected, canBeSeenAsEnemy, canBeSeenByAnyone, canBreatheUnderwater, canChangeDimensions, canDisableShield, canFreeze, canSpawnSoulSpeedParticle, canStandOnFluid, causeFallDamage, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, curePotionEffects, decreaseAirSupply, doAutoAttackOnTouch, doesEmitEquipEvent, doPush, dropAllDeathLoot, dropEquipment, dropExperience, eat, equipmentHasChanged, forceAddEffect, getAbsorptionAmount, getActiveEffects, getActiveEffectsMap, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBlockSpeedFactor, getBoundingBoxForCulling, getBrain, getCapability, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDeathSound, getDimensions, getDismountPoses, getDrinkingSound, getEatingSound, getEffect, getEquipmentSlotForItem, getEyeHeight, getFallDamageSound, getFallFlyingTicks, getFallSounds, getFluidFallingAdjustedMovement, getFlyingSpeed, getHealth, getHitbox, getHurtDir, getHurtSound, getItemInHand, getJumpBoostPower, getJumpPower, getKillCredit, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getMainHandItem, getMaxAbsorption, getMaxHealth, getMobType, getMyRidingOffset, getNoActionTime, getOffhandItem, getPassengerRidingPosition, getProjectile, getRandom, getRelativePortalPosition, getRiddenInput, getRiddenSpeed, getScale, getSleepingPos, getSlot, getSoundVolume, getSpeed, getStandingEyeHeight, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleDamageEvent, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, hasLineOfSight, heal, hurtArmor, hurtCurrentlyUsedShield, hurtHelmet, increaseAirSupply, indicateDamage, internalSetAbsorptionAmount, invalidateCaps, isAffectedByFluids, isAffectedByPotions, isAlive, isAlwaysExperienceDropper, isAutoSpinAttack, isBaby, isBlocking, isCurrentlyGlowing, isDamageSourceBlocked, isDeadOrDying, isFallFlying, isHolding, isHolding, isImmobile, isInvertedHealAndHarm, isInWall, isPickable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpFromGround, kill, knockback, lerpHeadRotationStep, lerpHeadTo, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, lookAt, makeBrain, maxUpStep, onBelowWorld, onChangedBlock, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onEquipItem, onItemPickup, onLeaveCombat, onSoulSpeedBlock, playBlockFallSound, push, pushEntities, randomTeleport, recreateFromPacket, releaseUsingItem, remove, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeFrost, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, reviveCaps, rideTick, sendEffectToPassengers, setAbsorptionAmount, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, shouldRemoveSoulSpeed, shouldRiderFaceForward, shouldShowName, skipDropExperience, spawnSoulSpeedParticle, startSleeping, startUsingItem, stopRiding, stopSleeping, stopUsingItem, swing, swing, take, tickDeath, tickEffects, tickRidden, travel, travelRidden, triggerItemUseEffects, tryAddFrost, tryAddSoulSpeed, updateEffectVisibility, updateFallFlying, updateInvisibilityStatus, updateSwingTime, updateUsingItem, updateWalkAnimation, verifyEquippedItem, wasExperienceConsumed, wouldNotSuffocateAtTargetPose

    Methods inherited from class net.minecraft.world.entity.Entity

    absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canControlVehicle, canRide, canSpawnSprintParticle, canSprint, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, checkBelowWorld, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensionsForge, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getId, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxHeightFluidType, getMotionDirection, getMovementEmission, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalCooldown, getPortalWaitTime, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getY, getY, getYRot, getZ, getZ, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, ignoreExplosion, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, killedEntity, lavaHurt, lerpMotion, lerpPositionAndRotationStep, level, limitPistonMovement, load, makeBoundingBox, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, reapplyPosition, refreshDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, ridingOffset, rotate, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSecondsOnFire, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSound

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.commands.CommandSource

    alwaysAccepts

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity

    canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canStartSwimming, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, deserializeNBT, getClassification, getEyeHeightForge, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getPersistentData, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isAddedToWorld, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isPushedByFluid, onAddedToWorld, onRemovedFromWorld, revive, serializeNBT, shouldUpdateFluidWhileBoating

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeLivingEntity

    canDrownInFluidType, canSwimInFluidType, moveInFluid, self, sinkInFluid

    Methods inherited from interface net.minecraft.world.item.trading.Merchant

    canRestock, openTradingScreen
  • Field Details

    • npcType

      protected EnumNPCType npcType
    • offers

      protected net.minecraft.world.item.trading.MerchantOffers offers
  • Constructor Details

    • NPCChatting

      public NPCChatting(net.minecraft.world.entity.EntityType<? extends NPCChatting> type, net.minecraft.world.level.Level world)
      Initializes a chatting NPC.
      Parameters:
      world - The world to spawn the chatting NPC in.
    • NPCChatting

      public NPCChatting(net.minecraft.world.level.Level world)
  • Method Details

    • init

      public void init(GeneralNPCData data)
      Initializes the chatting NPC from JSON data.
      Parameters:
      data - The data to initialize the chatting NPC from.
    • init

      public void init(GymNPCData data)
    • init

      public void init(String name)
      Description copied from class: NPCEntity
      Initializes the NPC with its name and health.
      Overrides:
      init in class NPCEntity
      Parameters:
      name - The NPC's name.
    • isPushable

      public boolean isPushable()
      Overrides:
      isPushable in class NPCEntity
    • getTexture

      public String getTexture()
      Description copied from class: NPCEntity
      Gets the NPC's texture.
      Overrides:
      getTexture in class IndexedNPCEntity
      Returns:
      The NPC's texture.
    • getDisplayText

      public String getDisplayText()
      Description copied from class: NPCEntity
      Gets the text that displays above the NPC.
      Overrides:
      getDisplayText in class IndexedNPCEntity
      Returns:
      The text that displays above the NPC.
    • push

      public void push(double par1, double par3, double par5)
      Overrides:
      push in class IndexedNPCEntity
    • addAdditionalSaveData

      public void addAdditionalSaveData(net.minecraft.nbt.CompoundTag nbt)
      Overrides:
      addAdditionalSaveData in class IndexedNPCEntity
    • readAdditionalSaveData

      public void readAdditionalSaveData(net.minecraft.nbt.CompoundTag nbt)
      Overrides:
      readAdditionalSaveData in class IndexedNPCEntity
    • interactWithNPC

      public boolean interactWithNPC(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
      Description copied from class: NPCEntity
      Handles a player interacting with the NPC.
      Overrides:
      interactWithNPC in class IndexedNPCEntity
      Parameters:
      player - The player interacting with the NPC.
      Returns:
      False
    • getChat

      public ArrayList<String> getChat(String langCode)
      Gets the translated trainer's chat.
      Overrides:
      getChat in class IndexedNPCEntity
      Parameters:
      langCode - The langCode for translation.
      Returns:
      The translated trainer's chat.
    • getName

      public String getName(String langCode)
      Gets the translated trainer's name.
      Overrides:
      getName in class IndexedNPCEntity
      Parameters:
      langCode - The langCode for translation.
      Returns:
      The translated trainer's name.
    • setChat

      public void setChat(ArrayList<String> pages)
      Sets the dialogue of the chatting NPC.
      Parameters:
      pages - The updated chatting NPC dialogue.
    • setName

      public void setName(String name)
      Description copied from class: NPCEntity
      Sets the NPC's name.
      Overrides:
      setName in class NPCEntity
      Parameters:
      name - The NPC's name.
    • cycleTexture

      public void cycleTexture(net.minecraft.server.level.ServerPlayer p, ClientNPCData newData)
      Changes the chatting NPC's type.
      Parameters:
      p - The player editing the chatting NPC.
    • getAttributeValue

      public double getAttributeValue(net.minecraft.world.entity.ai.attributes.Attribute attribute)
      Overrides:
      getAttributeValue in class net.minecraft.world.entity.LivingEntity
    • getVillagerXp

      public int getVillagerXp()
      Specified by:
      getVillagerXp in interface net.minecraft.world.item.trading.Merchant
    • setTradingPlayer

      public void setTradingPlayer(@Nullable net.minecraft.world.entity.player.Player p_70932_1_)
      Specified by:
      setTradingPlayer in interface net.minecraft.world.item.trading.Merchant
    • getTradingPlayer

      @Nullable public net.minecraft.world.entity.player.Player getTradingPlayer()
      Specified by:
      getTradingPlayer in interface net.minecraft.world.item.trading.Merchant
    • isTrading

      public boolean isTrading()
    • getOffers

      public net.minecraft.world.item.trading.MerchantOffers getOffers()
      Specified by:
      getOffers in interface net.minecraft.world.item.trading.Merchant
    • overrideOffers

      public void overrideOffers(@Nullable net.minecraft.world.item.trading.MerchantOffers p_213703_1_)
      Specified by:
      overrideOffers in interface net.minecraft.world.item.trading.Merchant
    • overrideXp

      public void overrideXp(int p_213702_1_)
      Specified by:
      overrideXp in interface net.minecraft.world.item.trading.Merchant
    • notifyTrade

      public void notifyTrade(net.minecraft.world.item.trading.MerchantOffer p_213704_1_)
      Specified by:
      notifyTrade in interface net.minecraft.world.item.trading.Merchant
    • rewardTradeXp

      protected void rewardTradeXp(net.minecraft.world.item.trading.MerchantOffer p_213713_1_)
    • showProgressBar

      public boolean showProgressBar()
      Specified by:
      showProgressBar in interface net.minecraft.world.item.trading.Merchant
    • notifyTradeUpdated

      public void notifyTradeUpdated(net.minecraft.world.item.ItemStack p_110297_1_)
      Specified by:
      notifyTradeUpdated in interface net.minecraft.world.item.trading.Merchant
    • getNotifyTradeSound

      public net.minecraft.sounds.SoundEvent getNotifyTradeSound()
      Specified by:
      getNotifyTradeSound in interface net.minecraft.world.item.trading.Merchant
    • isClientSide

      public boolean isClientSide()
      Specified by:
      isClientSide in interface net.minecraft.world.item.trading.Merchant
    • getTradeUpdatedSound

      protected net.minecraft.sounds.SoundEvent getTradeUpdatedSound(boolean p_213721_1_)
    • playCelebrateSound

      public void playCelebrateSound()
    • changeDimension

      @Nullable public net.minecraft.world.entity.Entity changeDimension(net.minecraft.server.level.ServerLevel p_241206_1_, net.minecraftforge.common.util.ITeleporter teleporter)
      Overrides:
      changeDimension in class net.minecraft.world.entity.Entity
    • stopTrading

      protected void stopTrading()
    • die

      public void die(net.minecraft.world.damagesource.DamageSource p_70645_1_)
      Overrides:
      die in class net.minecraft.world.entity.LivingEntity
    • addParticlesAroundSelf

      protected void addParticlesAroundSelf(net.minecraft.core.particles.ParticleOptions p_213718_1_)
    • getInventory

      public net.minecraft.world.SimpleContainer getInventory()
    • updateTrades

      protected void updateTrades()
    • addOffersFromItemListings

      protected void addOffersFromItemListings(net.minecraft.world.item.trading.MerchantOffers p_213717_1_, net.minecraft.world.entity.npc.VillagerTrades.ItemListing[] p_213717_2_, int amountOfItemsToAdd)
    • startTradingWith

      public boolean startTradingWith(net.minecraft.world.entity.player.Player player)
    • getLevel

      public net.minecraft.world.level.Level getLevel()