public class EntityVillager extends EntityAgeable implements IMerchant, INpc
Modifier and Type | Class and Description |
---|---|
static class |
EntityVillager.EmeraldForItems |
static class |
EntityVillager.ItemAndEmeraldToItem |
static interface |
EntityVillager.ITradeList |
static class |
EntityVillager.ListEnchantedBookForEmeralds |
static class |
EntityVillager.ListEnchantedItemForEmeralds |
static class |
EntityVillager.ListItemForEmeralds |
static class |
EntityVillager.PriceInfo |
EntityLiving.SpawnPlacementType
forcedAge, forcedAgeTimer, growingAge
FLEEING_SPEED_MODIFIER, FLEEING_SPEED_MODIFIER_UUID
experienceValue, inventoryArmorDropChances, inventoryHandsDropChances, jumpHelper, livingSoundTime, moveHelper, navigator, targetTasks, tasks
activeItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, entityAge, HAND_STATES, hurtTime, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, newPosRotationIncrements, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180
addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, fireResistance, firstUpdate, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj
Constructor and Description |
---|
EntityVillager(World worldIn) |
EntityVillager(World worldIn,
int professionId) |
addGrowth, ageUp, getGrowingAge, isChild, onLivingUpdate, setGrowingAge, setScale, setScaleForAge, setSize
detachHome, getBlockPathWeight, getCanSpawnHere, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, onLeashDistance, setHomePosAndDistance, updateLeashedState
canAttackClass, canBeSteered, canEquipItem, canPickUpLoot, clearLeashed, createBodyHelper, despawnEntity, dropEquipment, dropFewItems, dropLoot, eatGrassBonus, enablePersistence, faceEntity, getArmorByChance, getArmorInventoryList, getAttackTarget, getDropItem, getEntitySenses, getExperiencePoints, getHeldEquipment, getHorizontalFaceSpeed, getItemStackFromSlot, getJumpHelper, getLeashed, getLeashedToEntity, getLookHelper, getLootTable, getMaxFallHeight, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getNewNavigator, getPathPriority, getPrimaryHand, getRenderSizeModifier, getSlotForItemStack, getTalkInterval, getVerticalFaceSpeed, isAIDisabled, isItemStackInSlot, isLeftHanded, isNoDespawnRequired, isNotColliding, isServerWorld, onEntityUpdate, onUpdate, playHurtSound, playLivingSound, processInitialInteract, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setDropChance, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setItemStackToSlot, setLeashedToEntity, setLeftHanded, setMoveForward, setMoveStrafing, setNoAI, setPathPriority, spawnExplosionParticle, startRiding, updateDistance, updateEntityActionState
addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, areAllPotionsAmbient, attackEntityAsMob, attackEntityFrom, attemptTeleport, canBeCollidedWith, canBeHitWithPotion, canBePushed, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, damageArmor, damageEntity, damageShield, decreaseAirSupply, dismountEntity, dismountRidingEntity, fall, frostWalk, getAbsorptionAmount, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttackingEntity, getAttributeMap, getCapability, getCombatTracker, getCreatureAttribute, getEntityAttribute, getFallSound, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, handleJumpLava, handleJumpWater, hasCapability, heal, isActiveItemStackBlocking, isElytraFlying, isEntityAlive, isEntityUndead, isHandActive, isMovementBlocked, isOnLadder, isPlayer, isPlayerSleeping, isPotionActive, isPotionApplicable, jump, kill, knockBack, markPotionsDirty, moveEntityWithHeading, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, performHurtAnimation, playEquipSound, removeActivePotionEffect, removePotionEffect, renderBrokenItemStack, resetActiveHand, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setActiveHand, setArrowCountInEntity, setBeenAttacked, setHealth, setHeldItem, setJumping, setLastAttacker, setPositionAndRotationDirect, setRenderYawOffset, setRotationYawHead, setSprinting, shouldRiderFaceForward, stopActiveHand, swingArm, updateActiveHand, updateArmSwingProgress, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadata, updateRidden
addChatMessage, addEntityCrashInfo, addPassenger, addTag, addToPlayerScore, addTrackingPlayer, addVelocity, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, canBeAttackedWithItem, canBeRidden, canCommandSenderUseCommand, canFitPassenger, canPassengerSteer, canRenderOnFire, canRiderInteract, canTriggerWalking, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAdjustedHorizontalFacing, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getControllingPassenger, getCustomNameTag, getDataManager, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getFlag, getHorizontalFacing, getHoverEvent, getLastPortalVec, getLowestRidingEntity, getMaxInPortalTime, getMirroredYaw, getMountedYOffset, getName, getParts, getPassengers, getPersistentID, getPickedResult, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getServer, getSoundCategory, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, getYOffset, handleWaterMovement, hasCustomName, hashCode, hitByEntity, ignoreItemEntityData, isBeingRidden, isBurning, isCreatureType, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, moveEntity, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onKillEntity, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetEntityId, resetHeight, resetPositionToBB, sendCommandFeedback, serializeNBT, setAir, setAlwaysRenderNameTag, setAngles, setCommandStat, setCommandStats, setCustomNameTag, setDead, setDropItemsWhenDead, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setUniqueId, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, toString, updatePassenger, verifyExplosion, writeToNBT, writeToNBTAtomically, writeToNBTOptional
public EntityVillager(World worldIn)
public EntityVillager(World worldIn, int professionId)
protected void initEntityAI()
initEntityAI
in class EntityLiving
protected void onGrowingAdult()
onGrowingAdult
in class EntityAgeable
protected void applyEntityAttributes()
applyEntityAttributes
in class EntityLiving
protected void updateAITasks()
updateAITasks
in class EntityLiving
public boolean processInteract(EntityPlayer player, EnumHand hand, @Nullable ItemStack stack)
processInteract
in class EntityAgeable
protected void entityInit()
entityInit
in class EntityAgeable
public void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT
in class EntityAgeable
public void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT
in class EntityAgeable
protected boolean canDespawn()
canDespawn
in class EntityLiving
protected SoundEvent getAmbientSound()
getAmbientSound
in class EntityLiving
protected SoundEvent getHurtSound()
getHurtSound
in class EntityLivingBase
protected SoundEvent getDeathSound()
getDeathSound
in class EntityLivingBase
public void setProfession(int professionId)
public int getProfession()
public void setProfession(VillagerRegistry.VillagerProfession prof)
public VillagerRegistry.VillagerProfession getProfessionForge()
public void notifyDataManagerChange(DataParameter<?> key)
notifyDataManagerChange
in class EntityAgeable
public boolean isMating()
public void setMating(boolean mating)
public void setPlaying(boolean playing)
public boolean isPlaying()
public void setRevengeTarget(@Nullable EntityLivingBase livingBase)
setRevengeTarget
in class EntityLivingBase
public void onDeath(DamageSource cause)
onDeath
in class EntityLivingBase
public void setCustomer(EntityPlayer player)
setCustomer
in interface IMerchant
public EntityPlayer getCustomer()
getCustomer
in interface IMerchant
public boolean isTrading()
public boolean getIsWillingToMate(boolean updateFirst)
public void setIsWillingToMate(boolean willingToTrade)
public void useRecipe(MerchantRecipe recipe)
public void verifySellingItem(ItemStack stack)
verifySellingItem
in interface IMerchant
public MerchantRecipeList getRecipes(EntityPlayer player)
getRecipes
in interface IMerchant
public void setRecipes(MerchantRecipeList recipeList)
setRecipes
in interface IMerchant
public ITextComponent getDisplayName()
getDisplayName
in interface ICommandSender
getDisplayName
in interface IMerchant
getDisplayName
in class Entity
public float getEyeHeight()
getEyeHeight
in class Entity
public void handleStatusUpdate(byte id)
handleStatusUpdate
in class EntityLiving
@Nullable public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata)
onInitialSpawn
in class EntityLiving
public void setLookingForHome()
public EntityVillager createChild(EntityAgeable ageable)
createChild
in class EntityAgeable
public boolean canBeLeashedTo(EntityPlayer player)
canBeLeashedTo
in class EntityLiving
public void onStruckByLightning(EntityLightningBolt lightningBolt)
onStruckByLightning
in class Entity
public InventoryBasic getVillagerInventory()
protected void updateEquipmentIfNeeded(EntityItem itemEntity)
updateEquipmentIfNeeded
in class EntityLiving
public boolean hasEnoughFoodToBreed()
public boolean canAbondonItems()
public boolean wantsMoreFood()
public boolean isFarmItemInInventory()
public boolean replaceItemInInventory(int inventorySlot, @Nullable ItemStack itemStackIn)
replaceItemInInventory
in class EntityLiving
public static EntityVillager.ITradeList[][][][] GET_TRADES_DONT_USE()