Class VisitorCitizen
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.Mob
net.minecraft.world.entity.PathfinderMob
com.minecolonies.api.entity.other.AbstractFastMinecoloniesEntity
com.minecolonies.api.entity.citizen.AbstractCivilianEntity
com.minecolonies.api.entity.citizen.AbstractEntityCitizen
com.minecolonies.core.entity.visitor.VisitorCitizen
- All Implemented Interfaces:
IStuckHandlerEntity,IItemHandlerCapProvider,net.minecraft.commands.CommandSource,net.minecraft.network.syncher.SyncedDataHolder,net.minecraft.world.entity.Attackable,net.minecraft.world.entity.EquipmentUser,net.minecraft.world.entity.Leashable,net.minecraft.world.entity.npc.Npc,net.minecraft.world.entity.Targeting,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.level.entity.EntityAccess,net.minecraft.world.MenuProvider,net.minecraft.world.Nameable,net.minecraft.world.scores.ScoreHolder,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.client.extensions.IMenuProviderExtension,net.neoforged.neoforge.common.extensions.IEntityExtension,net.neoforged.neoforge.common.extensions.ILivingEntityExtension,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Visitor citizen entity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.LivingEntity.FallsoundsNested 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.RemovalReasonNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsFieldNested classes/interfaces inherited from interface net.minecraft.world.entity.Leashable
net.minecraft.world.entity.Leashable.LeashData -
Field Summary
Fields inherited from class com.minecolonies.api.entity.citizen.AbstractEntityCitizen
DATA_BED_POS, DATA_CITIZEN_ID, DATA_COLONY_ID, DATA_IS_ASLEEP, DATA_IS_CHILD, DATA_IS_FEMALE, DATA_JOB, DATA_LEVEL, DATA_MODEL, DATA_RENDER_METADATA, DATA_STYLE, DATA_TEXTURE, DATA_TEXTURE_SUFFIX, ENTITY_AI_TICKRATE, entityStateControllerFields inherited from class com.minecolonies.api.entity.citizen.AbstractCivilianEntity
nextPlayerCollisionTimeFields inherited from class com.minecolonies.api.entity.other.AbstractFastMinecoloniesEntity
lastKnockBack, randomVarianceFields inherited from class net.minecraft.world.entity.PathfinderMob
DEFAULT_WALK_TARGET_VALUEFields inherited from class net.minecraft.world.entity.Mob
ambientSoundTime, armorDropChances, armorItems, bodyArmorDropChance, DEFAULT_EQUIPMENT_DROP_CHANCE, goalSelector, handDropChances, jumpControl, 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, PRESERVE_ITEM_DROP_CHANCE_THRESHOLD, RANDOM_SPAWN_BONUS_ID, targetSelector, UPDATE_GOAL_SELECTOR_EVERY_N_TICKS, xpRewardFields inherited from class net.minecraft.world.entity.LivingEntity
animStep, animStepO, appliedScale, ARMOR_SLOT_OFFSET, ARMOR_SLOTS, attackAnim, attackStrengthTicker, ATTRIBUTES_FIELD, autoSpinAttackDmg, autoSpinAttackItemStack, autoSpinAttackTicks, BASE_JUMP_POWER, BODY_ARMOR_OFFSET, brain, damageContainers, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathScore, deathTime, DEFAULT_BABY_SCALE, DEFAULT_BASE_GRAVITY, 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, 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, zzaFields inherited from class net.minecraft.world.entity.Entity
BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, CONTENTS_SLOT_INDEX, 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, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalProcess, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOldFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.commands.CommandSource
NULLFields inherited from interface net.minecraft.world.entity.Leashable
LEASH_ELASTIC_DIST, LEASH_TAG, LEASH_TOO_FAR_DISTFields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME -
Constructor Summary
ConstructorsConstructorDescriptionVisitorCitizen(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.PathfinderMob> type, net.minecraft.world.level.Level world) Constructor for a new citizen typed entity. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalSaveData(net.minecraft.nbt.CompoundTag compound) voidaiStep()voidcallForHelp(net.minecraft.world.entity.Entity attacker, int guardHelpRange) Calls a guard for help against an attacker.net.minecraft.world.InteractionResultcheckAndHandleImportantInteractions(net.minecraft.world.entity.player.Player player, @NotNull net.minecraft.world.InteractionHand hand) Called when a player tries to interact with a citizen.@Nullable net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity) voidDecrease the saturation of the citizen for 1 action.voidDecrease the saturation of the citizen for 1 action.protected voiddefineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder) voiddie(net.minecraft.world.damagesource.DamageSource cause) protected voidThe Handler for all colony related methods.@Nullable ICitizenDataGetter for the citizendata.Get the citizen data view.The Handler for all experience related methods.The Handler for all inventory related methods.The Handler for all job related methods.The Handler for all job related methods.Setter for the citizen data.intGetter for the citizen id.@NotNull InventoryCitizenReturn this citizens inventory.@NotNull net.neoforged.neoforge.items.IItemHandlerGet the ILocation of the citizen.floatfloatintGet the team name of this entity.booleanhurt(@NotNull net.minecraft.world.damagesource.DamageSource damageSource, float damage) booleanisDead()voidmarkDirty(int time) Mark the citizen dirty to synch the data with the client.voidonSyncedDataUpdated(net.minecraft.network.syncher.EntityDataAccessor<?> dataAccessor) voidPlay move away sound when running from an entity.voidqueueSound(@NotNull net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.core.BlockPos pos, int length, int repetitions) Queue a sound at the citizen.voidqueueSound(@NotNull net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.core.BlockPos pos, int length, int repetitions, float volume, float pitch) Queue a sound at the citizen.voidreadAdditionalSaveData(net.minecraft.nbt.CompoundTag compound) voidsetCitizenColonyHandler(ICitizenColonyHandler citizenColonyHandler) voidsetCitizenExperienceHandler(ICitizenExperienceHandler citizenExperienceHandler) voidsetCitizenId(int id) Setter for the citizen id.voidsetCitizenInventoryHandler(ICitizenInventoryHandler citizenInventoryHandler) voidsetCitizenJobHandler(ICitizenJobHandler citizenJobHandler) voidsetCitizenSleepHandler(ICitizenSleepHandler citizenSleepHandler) voidsetCivilianData(@Nullable ICivilianData data) Setter for the citizen data.voidsetIsChild(boolean isChild) Sets whether this entity is a childvoidsetRemoved(net.minecraft.world.entity.Entity.RemovalReason reason) Methods inherited from class com.minecolonies.api.entity.citizen.AbstractEntityCitizen
calculateDamageAfterAbsorbs, canPickUpLoot, checkCanDropLoot, detectEquipmentUpdates, getDefaultAttributes, getDisplayName, getEntityStateController, getItemHandlerCap, getModelType, getNavigation, getOffsetTicks, getRandom, getRecentlyHit, getRenderMetadata, getTasks, getTeamColor, getTexture, getTextureId, getTicksExisted, interactAt, isBlocking, isControlledByLocalInstance, isFemale, isNoAi, isPushable, isPushedByFluid, isSleeping, markEquipmentDirty, onArmorAdd, onArmorRemove, onPlayerCollide, push, setFemale, setItemSlot, setModelId, setOwnRotation, setRenderMetadata, setTexture, setTextureDirty, setTextureIdMethods inherited from class com.minecolonies.api.entity.citizen.AbstractCivilianEntity
checkBedExists, startRiding, toStringMethods inherited from class com.minecolonies.api.entity.other.AbstractFastMinecoloniesEntity
canBeLeashed, canBeStuck, canSpawnSprintParticle, changeDimension, decreaseAirSupply, hadHorizontalCollission, handlePortal, increaseAirSupply, isHorizontalCollisionMinor, isInWall, isInWaterRainOrBubble, isShiftKeyDown, knockback, onChangedBlock, onInsideBubbleColumn, pushEntities, removeFrost, sendDebugPackets, setCanBeStuck, setSharedFlagOnFire, setShiftKeyDown, setTicksFrozen, tryAddFrost, updateFallFlying, updateFluidOnEyes, updateInWaterStateAndDoFluidPushing, updateSwimAmount, updateSwimmingMethods inherited from class net.minecraft.world.entity.PathfinderMob
checkSpawnRules, closeRangeLeashBehaviour, followLeashSpeed, getWalkTargetValue, getWalkTargetValue, handleLeashAtDistance, isPanicking, isPathFinding, shouldStayCloseToLeashHolderMethods inherited from class net.minecraft.world.entity.Mob
ate, baseTick, canAttackType, canFireProjectileWeapon, canHoldItem, canReplaceCurrentItem, canReplaceEqualItem, canTakeItem, canUseSlot, checkDespawn, checkMobSpawnRules, checkSpawnObstruction, clampHeadRotationToBody, clearRestriction, convertTo, createBodyControl, createMobAttributes, createNavigation, customServerAiStep, doHurtTarget, dropCustomDeathLoot, dropFromLootTable, dropLeash, dropPreservedEquipment, dropPreservedEquipment, enchantSpawnedArmor, enchantSpawnedWeapon, equip, equip, equipItemIfPossible, finalizeSpawn, getAmbientSound, getAmbientSoundInterval, getArmorAndBodyArmorSlots, getArmorSlots, getAttackBoundingBox, getBaseExperienceReward, getBodyArmorItem, getControllingPassenger, getDefaultLootTable, getEquipmentDropChance, getEquipmentForSlot, getHandSlots, getHeadRotSpeed, getItemBySlot, getJumpControl, getLeashData, getLookControl, getLootTable, getLootTableSeed, getMainArm, getMaxFallDistance, getMaxHeadXRot, getMaxHeadYRot, getMaxSpawnClusterSize, getMoveControl, getPathfindingMalus, getPickResult, getPickupReach, getRestrictCenter, getRestrictRadius, getSensing, getSpawnType, getTarget, getTargetFromBrain, handleEntityEvent, hasRestriction, interact, isAggressive, isBodyArmorItem, isEffectiveAi, isLeftHanded, isMaxGroupSizeReached, isPersistenceRequired, isSpawnCancelled, isSunBurnTick, isWearingBodyArmor, isWithinMeleeAttackRange, isWithinRestriction, isWithinRestriction, jumpInFluid, jumpInLiquid, leashTooFarBehaviour, lookAt, mobInteract, onOffspringSpawnedFromEgg, onPathfindingDone, onPathfindingStart, pickUpItem, playAmbientSound, playAttackSound, playHurtSound, populateDefaultEquipmentEnchantments, populateDefaultEquipmentSlots, registerGoals, removeAfterChangingDimensions, removeAllGoals, removeFreeWill, removeWhenFarAway, requiresCustomPersistence, restrictTo, serverAiStep, setAggressive, setBaby, setBodyArmorItem, setCanPickUpLoot, setDropChance, setGuaranteedDrop, setItemSlotAndDropWhenKilled, setLeashData, setLeftHanded, setNoAi, setPathfindingMalus, setPersistenceRequired, setSpawnCancelled, setSpeed, setTarget, setXxa, setYya, setZza, shouldDespawnInPeaceful, shouldPassengersInheritMalus, spawnAnim, stopInPlace, tick, tickHeadTurn, updateControlFlags, wantsToPickUpMethods inherited from class net.minecraft.world.entity.LivingEntity
activeLocationDependentEnchantments, actuallyHurt, addEffect, addEffect, animateHurt, areAllEffectsAmbient, attackable, blockedByShield, blockUsingShield, brainProvider, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canBeAffected, canBeSeenAsEnemy, canBeSeenByAnyone, canBreatheUnderwater, canDisableShield, canFreeze, canStandOnFluid, canUsePortal, causeFallDamage, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, doAutoAttackOnTouch, doesEmitEquipEvent, doHurtEquipment, doPush, dropAllDeathLoot, dropExperience, eat, eat, equipmentHasChanged, forceAddEffect, getAbsorptionAmount, getActiveEffects, getActiveEffectsMap, getAgeScale, getAllSlots, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBlockSpeedFactor, getBoundingBoxForCulling, getBrain, getCombatTracker, getComfortableFallDistance, getCurrentSwingDuration, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDeathSound, getDefaultDimensions, getDefaultGravity, getDimensions, getDismountPoses, getDrinkingSound, getEatingSound, getEffect, getEquipmentSlotForItem, getExperienceReward, getFallFlyingTicks, getFallSounds, getFluidFallingAdjustedMovement, getFlyingSpeed, getHealth, getHitbox, getHurtDir, getHurtSound, getItemInHand, getJumpBoostPower, getJumpPower, getJumpPower, getKillCredit, getKnockback, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getMainHandItem, getMaxAbsorption, getMaxHeadRotationRelativeToBody, getMaxHealth, getNoActionTime, getOffhandItem, getPassengerRidingPosition, getPreciseBodyRotation, getProjectile, getRelativePortalPosition, getRiddenInput, getRiddenSpeed, getScale, getSleepingPos, getSlot, getSlotForHand, getSoundVolume, getSpeed, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getWeaponItem, getYHeadRot, goDownInWater, handleDamageEvent, handleRelativeFrictionAndCalculateMovement, hasEffect, hasInfiniteMaterials, hasItemInSlot, hasLandedInLiquid, hasLineOfSight, heal, hurtArmor, hurtCurrentlyUsedShield, hurtHelmet, igniteForTicks, indicateDamage, internalSetAbsorptionAmount, isAffectedByFluids, isAffectedByPotions, isAlive, isAlwaysExperienceDropper, isAutoSpinAttack, isBaby, isCurrentlyGlowing, isDamageSourceBlocked, isDeadOrDying, isFallFlying, isHolding, isHolding, isImmobile, isInvertedHealAndHarm, isInvulnerableTo, isPickable, isSensitiveToWater, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpFromGround, kill, lerpHeadRotationStep, lerpHeadTo, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, lookAt, makeBrain, makeSound, maxUpStep, onBelowWorld, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onEquipItem, onEquippedItemBroken, onItemPickup, onLeaveCombat, playBlockFallSound, randomTeleport, recreateFromPacket, releaseUsingItem, remove, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeEffectsCuredBy, resetForwardDirectionOfRelativePortalPosition, rideTick, sanitizeScale, sendEffectToPassengers, setAbsorptionAmount, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, shouldRiderFaceForward, shouldShowName, skipDropExperience, startSleeping, startUsingItem, stopRiding, stopSleeping, stopUsingItem, swing, swing, take, tickDeath, tickEffects, tickRidden, travel, triggerItemUseEffects, triggerOnDeathMobEffects, updateEffectVisibility, updateInvisibilityStatus, updateSwingTime, updateUsingItem, updateWalkAnimation, verifyEquippedItem, wasExperienceConsumed, wouldNotSuffocateAtTargetPoseMethods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, absRotateTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, adjustSpawnLocation, applyGravity, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canChangeDimensions, canCollideWith, canControlVehicle, canRide, canSprint, canTrample, captureDrops, captureDrops, checkBelowWorld, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, fudgePositionAfterSizeChange, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCapability, getCapability, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDimensionChangingDelay, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getKnownMovement, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxHeightFluidType, getMotionDirection, getMovementEmission, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getY, getY, getYRot, getZ, getZ, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, igniteForSeconds, ignoreExplosion, is, isAddedToLevel, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInWater, isInWaterOrBubble, isInWaterOrRain, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isRemoved, 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, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToLevel, onClientRemoval, onExplosionHit, onFlap, onGround, onInsideBlock, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromLevel, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, push, reapplyPosition, refreshDimensions, registryAccess, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setAsInsidePortal, setBoundingBox, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRot, setSharedFlag, setSilent, setSwimming, setUUID, setViewScale, setXRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, thunderHit, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, waterSwimSoundMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, removeData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.minecraft.world.entity.EquipmentUser
equip, equip, equip, resolveSlotMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, captureDrops, captureDrops, copyAttachmentsFrom, deserializeNBT, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getPickedResult, getSoundFromFluidType, hasCustomOutlineRendering, isAddedToLevel, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToLevel, onRemovedFromLevel, revive, sendPairingData, serializeNBT, shouldRiderSitMethods inherited from interface com.minecolonies.api.util.IItemHandlerCapProvider
getItemHandlerCap, getItemHandlerCapMethods inherited from interface net.neoforged.neoforge.common.extensions.ILivingEntityExtension
canDrownInFluidType, canSwimInFluidType, moveInFluid, onDamageTaken, self, sinkInFluidMethods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpenMethods inherited from interface net.minecraft.world.entity.Leashable
canHaveALeashAttachedToIt, elasticRangeLeashBehaviour, getLeashHolder, isLeashed, mayBeLeashed, readLeashData, setDelayedLeashHolderId, setLeashedTo, writeLeashDataMethods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Constructor Details
-
VisitorCitizen
public VisitorCitizen(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.PathfinderMob> type, net.minecraft.world.level.Level world) Constructor for a new citizen typed entity.- Parameters:
type- the Entity type.world- the world.
-
-
Method Details
-
getLocation
Description copied from class:AbstractEntityCitizenGet the ILocation of the citizen.- Specified by:
getLocationin classAbstractEntityCitizen- Returns:
- an ILocation object which contains the dimension and is unique.
-
hurt
public boolean hurt(@NotNull @NotNull net.minecraft.world.damagesource.DamageSource damageSource, float damage) - Overrides:
hurtin classAbstractFastMinecoloniesEntity
-
getCitizenData
Description copied from class:AbstractEntityCitizenGetter for the citizendata. Tries to get it from the colony is the data is null.- Specified by:
getCitizenDatain classAbstractEntityCitizen- Returns:
- the data.
-
getCivilianData
Description copied from class:AbstractCivilianEntitySetter for the citizen data.- Specified by:
getCivilianDatain classAbstractCivilianEntity- Returns:
- civilian data
-
setCivilianData
Description copied from class:AbstractCivilianEntitySetter for the citizen data.- Specified by:
setCivilianDatain classAbstractCivilianEntity- Parameters:
data- the data to set.
-
getInventoryCitizen
Return this citizens inventory.- Specified by:
getInventoryCitizenin classAbstractEntityCitizen- Returns:
- the inventory this citizen has.
-
getItemHandlerCitizen
@NotNull public @NotNull net.neoforged.neoforge.items.IItemHandler getItemHandlerCitizen()- Specified by:
getItemHandlerCitizenin classAbstractEntityCitizen
-
markDirty
public void markDirty(int time) Mark the citizen dirty to synch the data with the client.- Specified by:
markDirtyin classAbstractCivilianEntity
-
setIsChild
public void setIsChild(boolean isChild) Description copied from class:AbstractEntityCitizenSets whether this entity is a child- Specified by:
setIsChildin classAbstractEntityCitizen- Parameters:
isChild- boolean
-
playMoveAwaySound
public void playMoveAwaySound()Description copied from class:AbstractEntityCitizenPlay move away sound when running from an entity.- Specified by:
playMoveAwaySoundin classAbstractEntityCitizen
-
decreaseSaturationForAction
public void decreaseSaturationForAction()Description copied from class:AbstractEntityCitizenDecrease the saturation of the citizen for 1 action.- Specified by:
decreaseSaturationForActionin classAbstractEntityCitizen
-
decreaseSaturationForContinuousAction
public void decreaseSaturationForContinuousAction()Decrease the saturation of the citizen for 1 action.- Specified by:
decreaseSaturationForContinuousActionin classAbstractEntityCitizen
-
getCivilianID
public int getCivilianID()Getter for the citizen id.- Specified by:
getCivilianIDin classAbstractCivilianEntity- Returns:
- the id.
-
setCitizenId
public void setCitizenId(int id) Setter for the citizen id.- Specified by:
setCitizenIdin classAbstractCivilianEntity- Parameters:
id- the id to set.
-
getCitizenExperienceHandler
Description copied from class:AbstractEntityCitizenThe Handler for all experience related methods.- Specified by:
getCitizenExperienceHandlerin classAbstractEntityCitizen- Returns:
- the instance of the handler.
-
getCitizenInventoryHandler
Description copied from class:AbstractEntityCitizenThe Handler for all inventory related methods.- Specified by:
getCitizenInventoryHandlerin classAbstractEntityCitizen- Returns:
- the instance of the handler.
-
setCitizenInventoryHandler
- Specified by:
setCitizenInventoryHandlerin classAbstractEntityCitizen
-
getCitizenColonyHandler
Description copied from class:AbstractEntityCitizenThe Handler for all colony related methods.- Specified by:
getCitizenColonyHandlerin classAbstractEntityCitizen- Returns:
- the instance of the handler.
-
setCitizenColonyHandler
- Specified by:
setCitizenColonyHandlerin classAbstractEntityCitizen
-
getCitizenJobHandler
Description copied from class:AbstractEntityCitizenThe Handler for all job related methods.- Specified by:
getCitizenJobHandlerin classAbstractEntityCitizen- Returns:
- the instance of the handler.
-
getCitizenSleepHandler
Description copied from class:AbstractEntityCitizenThe Handler for all job related methods.- Specified by:
getCitizenSleepHandlerin classAbstractEntityCitizen- Returns:
- the instance of the handler.
-
getRotationYaw
public float getRotationYaw()- Specified by:
getRotationYawin classAbstractEntityCitizen
-
getRotationPitch
public float getRotationPitch()- Specified by:
getRotationPitchin classAbstractEntityCitizen
-
isDead
public boolean isDead()- Specified by:
isDeadin classAbstractEntityCitizen
-
setCitizenSleepHandler
- Specified by:
setCitizenSleepHandlerin classAbstractEntityCitizen
-
setCitizenJobHandler
- Specified by:
setCitizenJobHandlerin classAbstractEntityCitizen
-
setCitizenExperienceHandler
- Specified by:
setCitizenExperienceHandlerin classAbstractEntityCitizen
-
callForHelp
public void callForHelp(net.minecraft.world.entity.Entity attacker, int guardHelpRange) Description copied from class:AbstractEntityCitizenCalls a guard for help against an attacker.- Specified by:
callForHelpin classAbstractEntityCitizen- Parameters:
attacker- the attacking entityguardHelpRange- the squaredistance in which we search for nearby guards
-
createMenu
@Nullable public @Nullable net.minecraft.world.inventory.AbstractContainerMenu createMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity) -
checkAndHandleImportantInteractions
public net.minecraft.world.InteractionResult checkAndHandleImportantInteractions(net.minecraft.world.entity.player.Player player, @NotNull @NotNull net.minecraft.world.InteractionHand hand) Called when a player tries to interact with a citizen.- Overrides:
checkAndHandleImportantInteractionsin classnet.minecraft.world.entity.Mob- Parameters:
player- which interacts with the citizen.- Returns:
- If citizen should interact or not.
-
getCitizenDataView
Description copied from class:AbstractEntityCitizenGet the citizen data view.- Specified by:
getCitizenDataViewin classAbstractEntityCitizen- Returns:
- the view.
-
defineSynchedData
protected void defineSynchedData(net.minecraft.network.syncher.SynchedEntityData.Builder builder) - Overrides:
defineSynchedDatain classAbstractEntityCitizen
-
aiStep
public void aiStep()- Overrides:
aiStepin classAbstractEntityCitizen
-
addAdditionalSaveData
public void addAdditionalSaveData(net.minecraft.nbt.CompoundTag compound) - Overrides:
addAdditionalSaveDatain classnet.minecraft.world.entity.Mob
-
readAdditionalSaveData
public void readAdditionalSaveData(net.minecraft.nbt.CompoundTag compound) - Overrides:
readAdditionalSaveDatain classnet.minecraft.world.entity.Mob
-
die
public void die(net.minecraft.world.damagesource.DamageSource cause) - Overrides:
diein classnet.minecraft.world.entity.LivingEntity
-
dropEquipment
protected void dropEquipment()- Overrides:
dropEquipmentin classnet.minecraft.world.entity.LivingEntity
-
queueSound
public void queueSound(@NotNull @NotNull net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.core.BlockPos pos, int length, int repetitions) Description copied from class:AbstractCivilianEntityQueue a sound at the citizen.- Specified by:
queueSoundin classAbstractCivilianEntity- Parameters:
soundEvent- the sound event to play.length- the length of the event.repetitions- the number of times to play it.
-
queueSound
public void queueSound(@NotNull @NotNull net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.core.BlockPos pos, int length, int repetitions, float volume, float pitch) Description copied from class:AbstractCivilianEntityQueue a sound at the citizen.- Specified by:
queueSoundin classAbstractCivilianEntity- Parameters:
soundEvent- the sound event to play.length- the length of the event.repetitions- the number of times to play it.
-
onSyncedDataUpdated
public void onSyncedDataUpdated(net.minecraft.network.syncher.EntityDataAccessor<?> dataAccessor) - Specified by:
onSyncedDataUpdatedin interfacenet.minecraft.network.syncher.SyncedDataHolder- Overrides:
onSyncedDataUpdatedin classnet.minecraft.world.entity.LivingEntity
-
setRemoved
public void setRemoved(net.minecraft.world.entity.Entity.RemovalReason reason) - Specified by:
setRemovedin interfacenet.minecraft.world.level.entity.EntityAccess- Overrides:
setRemovedin classnet.minecraft.world.entity.Entity
-
getTeamId
public int getTeamId()Description copied from class:AbstractFastMinecoloniesEntityGet the team name of this entity. todo sam make colony ids unique across dimensions.- Specified by:
getTeamIdin classAbstractFastMinecoloniesEntity- Returns:
- the team name.
-