public class VillagerEntity extends AbstractVillagerEntity implements IReputationTracking, IVillagerDataHolder
AgeableEntity.AgeableData
Entity.IMoveCallback
修飾子とタイプ | フィールドと説明 |
---|---|
static java.util.Map<MemoryModuleType<GlobalPos>,java.util.function.BiPredicate<VillagerEntity,PointOfInterestType>> |
field_213774_bB |
static java.util.Map<Item,java.lang.Integer> |
FOOD_VALUES
Mapping between valid food items and their respective efficiency values.
|
offers
forcedAge, forcedAgeTimer, growingAge
experienceValue, goalSelector, inventoryArmorDropChances, inventoryHandsDropChances, jumpController, livingSoundTime, lookController, moveController, navigator, targetSelector
activeItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, beeStingRemovalCooldown, brain, dead, deathTime, ENTITY_GRAVITY, hurtTime, idleTime, interpTargetHeadYaw, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, interpTicksHead, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, LIVING_FLAGS, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, moveVertical, NAMETAG_DISTANCE, newPosRotationIncrements, onGroundSpeedFactor, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, SLEEPING_SIZE, spinAttackDuration, SWIM_SPEED, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180
addedToChunk, cachedUniqueIdString, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, eyesInWater, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, hurtResistantTime, ignoreFrustumCheck, inLava, inPortal, inWater, isAirBorne, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, LOGGER, motionMultiplier, noClip, onGround, portalCounter, POSE, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, world
DUMMY
コンストラクタと説明 |
---|
VillagerEntity(EntityType<? extends VillagerEntity> type,
World worldIn) |
VillagerEntity(EntityType<? extends VillagerEntity> p_i50183_1_,
World worldIn,
IVillagerType p_i50183_3_) |
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
canAbondonItems()
Used by
EntityAIVillagerInteract to check if the villager
can give some items from an inventory to another villager. |
boolean |
canBreed() |
boolean |
canDespawn(double distanceToClosestPlayer) |
boolean |
canSpawnGolems(long gameTime) |
protected Brain<?> |
createBrain(com.mojang.datafixers.Dynamic<?> dynamicIn) |
VillagerEntity |
createChild(AgeableEntity ageable) |
void |
func_213742_a(MemoryModuleType<GlobalPos> p_213742_1_) |
void |
func_213746_a(VillagerEntity p_213746_1_,
long gameTime) |
void |
func_213766_ei() |
boolean |
func_223340_ej() |
void |
func_223346_ep() |
void |
func_223716_a(INBT p_223716_1_) |
boolean |
func_223717_b(Item p_223717_1_) |
boolean |
func_223721_ek() |
GossipManager |
func_223722_es() |
protected ITextComponent |
func_225513_by_() |
protected SoundEvent |
getAmbientSound() |
Brain<VillagerEntity> |
getBrain() |
protected SoundEvent |
getDeathSound() |
protected SoundEvent |
getHurtSound(DamageSource damageSourceIn) |
int |
getPlayerReputation(PlayerEntity player) |
VillagerData |
getVillagerData() |
int |
getXp() |
void |
handleStatusUpdate(byte id)
|
boolean |
isFarmItemInInventory()
Returns true if villager has seeds, potatoes or carrots in inventory
|
void |
onDeath(DamageSource cause)
Called when the mob's health reaches 0.
|
protected void |
onGrowingAdult()
This is called when Entity's growing age timer reaches 0 (negative values are considered as a child, positive as
an adult)
|
ILivingEntityData |
onInitialSpawn(IWorld worldIn,
DifficultyInstance difficultyIn,
SpawnReason reason,
ILivingEntityData spawnDataIn,
CompoundNBT dataTag) |
void |
onStruckByLightning(LightningBoltEntity lightningBolt)
Called when a lightning bolt hits the entity.
|
protected void |
onVillagerTrade(MerchantOffer offer) |
void |
playWorkstationSound() |
protected void |
populateTradeData() |
boolean |
processInteract(PlayerEntity player,
Hand hand) |
void |
readAdditional(CompoundNBT compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
protected void |
registerAttributes() |
protected void |
registerData() |
void |
resetBrain(ServerWorld serverWorldIn) |
protected void |
resetCustomer() |
protected void |
sendDebugPackets() |
void |
setCustomer(PlayerEntity player) |
void |
setOffers(MerchantOffers offersIn) |
void |
setRevengeTarget(LivingEntity livingBase)
Hint to AI tasks that we were attacked by the passed EntityLivingBase and should retaliate.
|
void |
setVillagerData(VillagerData p_213753_1_) |
void |
setXp(int p_213761_1_) |
void |
spawnGolems(long gameTime,
int requiredPeers) |
void |
startSleeping(BlockPos p_213342_1_) |
void |
tick()
Called to update the entity's position/logic.
|
protected void |
updateAITasks() |
protected void |
updateEquipmentIfNeeded(ItemEntity itemEntity)
Tests if this entity should pickup a weapon or an armor.
|
void |
updateReputation(IReputationType type,
Entity target) |
void |
wakeUp() |
boolean |
wantsMoreFood() |
void |
writeAdditional(CompoundNBT compound) |
addTrades, canBeLeashedTo, changeDimension, func_213705_dZ, getCustomer, getOffers, getShakeHeadTicks, getStandingEyeHeight, getVillagerInventory, getVillagerYesNoSound, getWorld, getYesSound, hasCustomer, onTrade, playCelebrateSound, replaceItemInInventory, setClientSideOffers, setShakeHeadTicks, setXP, spawnParticles, verifySellingItem
addGrowth, ageUp, getGrowingAge, isChild, livingTick, notifyDataManagerChange, onChildSpawnFromEgg, setGrowingAge
canSpawn, followLeashSpeed, getBlockPathWeight, getBlockPathWeight, hasPath, onLeashDistance, updateLeashedState
attackEntityAsMob, baseTick, canAttack, canAttack, canBeSteered, canEquipItem, canPassengerSteer, canPickUpItem, canPickUpLoot, canSpawnOn, checkDespawn, clearLeashed, createBodyController, createNavigator, detachHome, dropLoot, dropSpecialItems, eatGrassBonus, enablePersistence, faceEntity, getArmorByChance, getArmorInventoryList, getAttackTarget, getDropChance, getEntitySenses, getExperiencePoints, getFaceRotSpeed, getHeldEquipment, getHomePosition, getHorizontalFaceSpeed, getItemStackFromSlot, getJumpController, getLeashed, getLeashHolder, getLookController, getLootContextBuilder, getLootTable, getLootTableResourceLocation, getMaxFallHeight, getMaximumHomeDistance, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getPathPriority, getPrimaryHand, getSlotForItemStack, getTalkInterval, getVerticalFaceSpeed, handleFluidJump, isAggressive, isAIDisabled, isDespawnPeaceful, isHolding, isInDaylight, isItemStackInSlot, isLeftHanded, isMaxGroupSize, isNoDespawnRequired, isNotColliding, isServerWorld, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, playAmbientSound, playHurtSound, preventDespawn, processInitialInteract, registerGoals, setAggroed, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setDropChance, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setHomePosAndDistance, setItemStackToSlot, setLeashHolder, setLeftHanded, setMoveForward, setMoveStrafing, setMoveVertical, setNoAI, setPathPriority, setVehicleEntityId, shouldExchangeEquipment, spawnExplosionParticle, startRiding, updateDistance, updateEntityActionState, updateMovementGoalFlags
addPotionEffect, applyArmorCalculations, applyEntityCollision, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attackEntityFrom, attemptTeleport, blockUsingShield, canAttack, canBeCollidedWith, canBeHitWithPotion, canBePushed, canBeRiddenInWater, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, clearBedPosition, collideWithEntity, collideWithNearbyEntities, constructKnockBackVector, createSpawnPacket, curePotionEffects, damageArmor, damageEntity, damageShield, decreaseAirSupply, determineNextAir, dropInventory, findAmmo, frostWalk, func_213343_cS, func_225508_e_, func_226292_a_, func_226293_b_, func_226294_cV_, func_226296_dJ_, func_226298_f_, getAbsorptionAmount, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getActivePotionMap, getAIMoveSpeed, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttackingEntity, getAttribute, getAttributes, getBedDirection, getBedPosition, getBeeStingCount, getBlockState, getCapability, getCombatTracker, getCreatureAttribute, getDrinkSound, getEatSound, getEyeHeight, getFallSound, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getIdleTime, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttackedEntity, getLastAttackedEntityTime, getLastDamageSource, getMaxHealth, getRenderScale, getRevengeTarget, getRevengeTimer, getRNG, getRotationYawHead, getSize, getSoundPitch, getSoundVolume, getSwimAnimation, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getVisibilityMultiplier, getWaterSlowDown, getYaw, handleFluidSneak, hasItemInSlot, heal, isActiveItemStackBlocking, isActualySwimming, isAlive, isElytraFlying, isEntityInsideOpaqueBlock, isEntityUndead, isHandActive, isMovementBlocked, isOnLadder, isPlayer, isPotionActive, isPotionApplicable, isSleeping, isSpinAttacking, jump, knockBack, lookAt, markPotionsDirty, markVelocityChanged, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onFoodEaten, onItemPickup, onItemUseFinish, onKillCommand, onLivingFall, onNewPotionEffect, outOfWorld, performHurtAnimation, playEquipSound, playFallSound, remove, removeActivePotionEffect, removePotionEffect, resetActiveHand, resetPotionEffectMetadata, sendBreakAnimation, sendBreakAnimation, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setActiveHand, setArrowCountInEntity, setBedPosition, setBeeStingCount, setHeadRotation, setHealth, setHeldItem, setIdleTime, setJumping, setLastAttackedEntity, setLivingFlag, setPartying, setPositionAndRotationDirect, setRenderYawOffset, setRotationYawHead, setSprinting, shouldRiderFaceForward, spawnDrops, spinAttack, startSpinAttack, stopActiveHand, stopRiding, swingArm, travel, updateArmSwingProgress, updateFallState, updatePotionEffects, updatePotionMetadata, updateRidden, updateSpinAttack
addPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, calculateUpVector, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canRenderOnFire, canSwim, canTrample, canTriggerWalking, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, collideBoundingBox, collideBoundingBoxHeuristically, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, forceSetPosition, func_225514_a_, func_226265_a_, func_226266_a_, func_226276_cg_, getAdjustedHorizontalFacing, getAir, getAllowedMovement, getBoundingBox, getBoundingBox, getBrightness, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFireTimer, getFlag, getForward, getHeight, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getJumpFactor, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxInPortalTime, getMirroredYaw, getMotion, getMountedYOffset, getName, getOnPosition, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionUnderneath, getPositionVec, getPositionVector, getPosX, getPosXRandom, getPosXWidth, getPosY, getPosYEye, getPosYHeight, getPosYRandom, getPosZ, getPosZRandom, getPosZWidth, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getScoreboardName, getServer, getSoundCategory, getSpeedFactor, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeamColor, getTeleportDirection, getType, getUniqueID, getUpVector, getVectorForRotation, getWidth, getYOffset, handleFluidAcceleration, handlePistonMovement, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, horizontalMag, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEntityEqual, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvisibleToPlayer, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isPushedByWater, isRidingOrBeingRiddenBy, isRidingSameEntity, isShiftKeyDown, isSilent, isSpectatedByPlayer, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVisuallySwimming, isWet, makeFlySound, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillEntity, onRemovedFromWorld, pick, playFlySound, playSound, playStepSound, playSwimSound, preparePlayerToSpawn, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFireTimer, setFlag, setGlowing, setInLava, setInvisible, setInvulnerable, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPacketCoordinates, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRawPosition, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, teleportKeepLoaded, toString, updatePassenger, updatePortal, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeId
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
openMerchantContainer
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSit
getCapability
public static final java.util.Map<Item,java.lang.Integer> FOOD_VALUES
public static final java.util.Map<MemoryModuleType<GlobalPos>,java.util.function.BiPredicate<VillagerEntity,PointOfInterestType>> field_213774_bB
public VillagerEntity(EntityType<? extends VillagerEntity> type, World worldIn)
public VillagerEntity(EntityType<? extends VillagerEntity> p_i50183_1_, World worldIn, IVillagerType p_i50183_3_)
public Brain<VillagerEntity> getBrain()
getBrain
クラス内 LivingEntity
protected Brain<?> createBrain(com.mojang.datafixers.Dynamic<?> dynamicIn)
createBrain
クラス内 LivingEntity
public void resetBrain(ServerWorld serverWorldIn)
protected void onGrowingAdult()
onGrowingAdult
クラス内 AgeableEntity
protected void registerAttributes()
registerAttributes
クラス内 MobEntity
protected void updateAITasks()
updateAITasks
クラス内 MobEntity
public boolean processInteract(PlayerEntity player, Hand hand)
processInteract
クラス内 AgeableEntity
public void setCustomer(@Nullable PlayerEntity player)
setCustomer
インタフェース内 IMerchant
setCustomer
クラス内 AbstractVillagerEntity
protected void resetCustomer()
resetCustomer
クラス内 AbstractVillagerEntity
public boolean func_223340_ej()
func_223340_ej
インタフェース内 IMerchant
public void func_213766_ei()
public boolean func_223721_ek()
protected void registerData()
registerData
クラス内 AbstractVillagerEntity
public void writeAdditional(CompoundNBT compound)
writeAdditional
クラス内 AbstractVillagerEntity
public void readAdditional(CompoundNBT compound)
readAdditional
クラス内 AbstractVillagerEntity
public boolean canDespawn(double distanceToClosestPlayer)
canDespawn
クラス内 MobEntity
@Nullable protected SoundEvent getAmbientSound()
getAmbientSound
クラス内 MobEntity
protected SoundEvent getHurtSound(DamageSource damageSourceIn)
getHurtSound
クラス内 LivingEntity
protected SoundEvent getDeathSound()
getDeathSound
クラス内 LivingEntity
public void playWorkstationSound()
public void setVillagerData(VillagerData p_213753_1_)
public VillagerData getVillagerData()
getVillagerData
インタフェース内 IVillagerDataHolder
protected void onVillagerTrade(MerchantOffer offer)
onVillagerTrade
クラス内 AbstractVillagerEntity
public void setRevengeTarget(@Nullable LivingEntity livingBase)
setRevengeTarget
クラス内 LivingEntity
public void onDeath(DamageSource cause)
onDeath
クラス内 AbstractVillagerEntity
public void func_213742_a(MemoryModuleType<GlobalPos> p_213742_1_)
public boolean canBreed()
public int getPlayerReputation(PlayerEntity player)
public void func_223346_ep()
public void setOffers(MerchantOffers offersIn)
protected ITextComponent func_225513_by_()
func_225513_by_
クラス内 Entity
public void handleStatusUpdate(byte id)
handleStatusUpdate
クラス内 MobEntity
@Nullable public ILivingEntityData onInitialSpawn(IWorld worldIn, DifficultyInstance difficultyIn, SpawnReason reason, @Nullable ILivingEntityData spawnDataIn, @Nullable CompoundNBT dataTag)
onInitialSpawn
クラス内 AbstractVillagerEntity
public VillagerEntity createChild(AgeableEntity ageable)
createChild
クラス内 AgeableEntity
public void onStruckByLightning(LightningBoltEntity lightningBolt)
onStruckByLightning
クラス内 Entity
protected void updateEquipmentIfNeeded(ItemEntity itemEntity)
updateEquipmentIfNeeded
クラス内 MobEntity
public boolean func_223717_b(Item p_223717_1_)
public boolean canAbondonItems()
EntityAIVillagerInteract
to check if the villager
can give some items from an inventory to another villager.public boolean wantsMoreFood()
public boolean isFarmItemInInventory()
protected void populateTradeData()
populateTradeData
クラス内 AbstractVillagerEntity
public void func_213746_a(VillagerEntity p_213746_1_, long gameTime)
public void spawnGolems(long gameTime, int requiredPeers)
public boolean canSpawnGolems(long gameTime)
public void updateReputation(IReputationType type, Entity target)
updateReputation
インタフェース内 IReputationTracking
public int getXp()
getXp
インタフェース内 IMerchant
getXp
クラス内 AbstractVillagerEntity
public void setXp(int p_213761_1_)
public GossipManager func_223722_es()
public void func_223716_a(INBT p_223716_1_)
protected void sendDebugPackets()
sendDebugPackets
クラス内 MobEntity
public void startSleeping(BlockPos p_213342_1_)
startSleeping
クラス内 LivingEntity
public void wakeUp()
wakeUp
クラス内 LivingEntity