Search in sources :

Example 6 with EntityCitizen

use of com.minecolonies.coremod.entity.citizen.EntityCitizen in project minecolonies by Minecolonies.

the class ColonyPermissionEventHandler method on.

/**
 * AttackEntityEvent handler.
 * <p>
 * Check, if a player tries to attack an entity.. Deny if: - If the attacking happens in the colony - Player is less than officer to the colony.
 *
 * @param event ItemEntityPickupEvent
 */
@SubscribeEvent
public void on(final AttackEntityEvent event) {
    if (event.getTarget() instanceof MonsterEntity) {
        return;
    }
    @NotNull final PlayerEntity player = EntityUtils.getPlayerOfFakePlayer(event.getPlayer(), event.getPlayer().getCommandSenderWorld());
    if (MineColonies.getConfig().getServer().enableColonyProtection.get() && colony.isCoordInColony(player.getCommandSenderWorld(), new BlockPos(player.position()))) {
        final Permissions perms = colony.getPermissions();
        if (event.getTarget() instanceof EntityCitizen) {
            final AbstractEntityCitizen citizen = (AbstractEntityCitizen) event.getTarget();
            if (citizen.getCitizenJobHandler().getColonyJob() instanceof AbstractJobGuard && perms.hasPermission(event.getPlayer(), Action.GUARDS_ATTACK)) {
                return;
            }
            if (perms.hasPermission(event.getPlayer(), Action.ATTACK_CITIZEN)) {
                return;
            }
            cancelEvent(event, event.getPlayer(), colony, Action.ATTACK_CITIZEN, new BlockPos(event.getTarget().position()));
            return;
        }
        if (!(event.getTarget() instanceof MobEntity) && !perms.hasPermission(event.getPlayer(), Action.ATTACK_ENTITY)) {
            cancelEvent(event, event.getPlayer(), colony, Action.ATTACK_ENTITY, new BlockPos(event.getTarget().position()));
        }
    }
}
Also used : AbstractJobGuard(com.minecolonies.coremod.colony.jobs.AbstractJobGuard) Permissions(com.minecolonies.coremod.colony.permissions.Permissions) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) MonsterEntity(net.minecraft.entity.monster.MonsterEntity) BlockPos(net.minecraft.util.math.BlockPos) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) EntityCitizen(com.minecolonies.coremod.entity.citizen.EntityCitizen) NotNull(org.jetbrains.annotations.NotNull) MobEntity(net.minecraft.entity.MobEntity) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity) SubscribeEvent(net.minecraftforge.eventbus.api.SubscribeEvent)

Example 7 with EntityCitizen

use of com.minecolonies.coremod.entity.citizen.EntityCitizen in project minecolonies by ldtteam.

the class CitizenManager method spawnCitizenOnPosition.

@NotNull
private ICitizenData spawnCitizenOnPosition(@Nullable final ICitizenData data, @NotNull final World world, final boolean force, final BlockPos spawnPoint) {
    ICitizenData citizenData = data;
    if (citizenData == null) {
        citizenData = createAndRegisterCivilianData();
        if (getMaxCitizens() >= getCurrentCitizenCount() && !force) {
            if (maxCitizensFromResearch() <= getCurrentCitizenCount()) {
                LanguageHandler.sendPlayersMessage(colony.getMessagePlayerEntities(), "block.blockhuttownhall.messagemaxsize.research", colony.getName());
            } else {
                LanguageHandler.sendPlayersMessage(colony.getMessagePlayerEntities(), "block.blockhuttownhall.messagemaxsize.config", colony.getName());
            }
        }
        colony.getEventDescriptionManager().addEventDescription(new CitizenSpawnedEvent(spawnPoint, citizenData.getName()));
    }
    final EntityCitizen entity = (EntityCitizen) ModEntities.CITIZEN.create(world);
    entity.setPos(spawnPoint.getX() + HALF_BLOCK, spawnPoint.getY() + SLIGHTLY_UP, spawnPoint.getZ() + HALF_BLOCK);
    world.addFreshEntity(entity);
    entity.getCitizenColonyHandler().registerWithColony(citizenData.getColony().getID(), citizenData.getId());
    colony.getProgressManager().progressCitizenSpawn(citizens.size(), citizens.values().stream().filter(tempDate -> tempDate.getJob() != null).collect(Collectors.toList()).size());
    markDirty();
    return citizenData;
}
Also used : java.util(java.util) LanguageHandler(com.ldtteam.structurize.util.LanguageHandler) ALL_CITIZENS_ARE_SLEEPING(com.minecolonies.api.util.constant.TranslationConstants.ALL_CITIZENS_ARE_SLEEPING) BedHandlingModule(com.minecolonies.coremod.colony.buildings.modules.BedHandlingModule) Constants(net.minecraftforge.common.util.Constants) CompoundNBT(net.minecraft.nbt.CompoundNBT) ICitizenData(com.minecolonies.api.colony.ICitizenData) Function(java.util.function.Function) MinecoloniesAPIProxy(com.minecolonies.api.MinecoloniesAPIProxy) CitizenData(com.minecolonies.coremod.colony.CitizenData) LivingBuildingModule(com.minecolonies.coremod.colony.buildings.modules.LivingBuildingModule) Network(com.minecolonies.coremod.Network) ICitizenDataManager(com.minecolonies.api.colony.ICitizenDataManager) EntityUtils(com.minecolonies.api.util.EntityUtils) ICitizenManager(com.minecolonies.api.colony.managers.interfaces.ICitizenManager) CitizenSpawnedEvent(com.minecolonies.coremod.colony.colonyEvents.citizenEvents.CitizenSpawnedEvent) Constants(com.minecolonies.api.util.constant.Constants) ColonyViewRemoveCitizenMessage(com.minecolonies.coremod.network.messages.client.colony.ColonyViewRemoveCitizenMessage) ListNBT(net.minecraft.nbt.ListNBT) Entity(net.minecraft.entity.Entity) AbstractAssignedCitizenModule(com.minecolonies.coremod.colony.buildings.modules.AbstractAssignedCitizenModule) CITIZEN_CAP(com.minecolonies.api.research.util.ResearchConstants.CITIZEN_CAP) Colony(com.minecolonies.coremod.colony.Colony) WorkAtHomeBuildingModule(com.minecolonies.coremod.colony.buildings.modules.WorkAtHomeBuildingModule) World(net.minecraft.world.World) ModEntities(com.minecolonies.api.entity.ModEntities) JobUndertaker(com.minecolonies.coremod.colony.jobs.JobUndertaker) BlockPos(net.minecraft.util.math.BlockPos) Collectors(java.util.stream.Collectors) AbstractCivilianEntity(com.minecolonies.api.entity.citizen.AbstractCivilianEntity) ICivilianData(com.minecolonies.api.colony.ICivilianData) Nullable(org.jetbrains.annotations.Nullable) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) MineColonies(com.minecolonies.coremod.MineColonies) EntityCitizen(com.minecolonies.coremod.entity.citizen.EntityCitizen) IBuilding(com.minecolonies.api.colony.buildings.IBuilding) NBTUtils(com.minecolonies.api.util.NBTUtils) IColony(com.minecolonies.api.colony.IColony) AbstractJobGuard(com.minecolonies.coremod.colony.jobs.AbstractJobGuard) ColonyViewCitizenViewMessage(com.minecolonies.coremod.network.messages.client.colony.ColonyViewCitizenViewMessage) TAG_CITIZENS(com.minecolonies.api.util.constant.NbtTagConstants.TAG_CITIZENS) COM_MINECOLONIES_COREMOD_MOURN(com.minecolonies.api.util.constant.TranslationConstants.COM_MINECOLONIES_COREMOD_MOURN) TAG_ID(com.minecolonies.api.util.constant.NbtTagConstants.TAG_ID) WorldUtil(com.minecolonies.api.util.WorldUtil) NotNull(org.jetbrains.annotations.NotNull) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity) CitizenSpawnedEvent(com.minecolonies.coremod.colony.colonyEvents.citizenEvents.CitizenSpawnedEvent) ICitizenData(com.minecolonies.api.colony.ICitizenData) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) EntityCitizen(com.minecolonies.coremod.entity.citizen.EntityCitizen) NotNull(org.jetbrains.annotations.NotNull)

Example 8 with EntityCitizen

use of com.minecolonies.coremod.entity.citizen.EntityCitizen in project minecolonies by ldtteam.

the class ColonyPermissionEventHandler method on.

/**
 * AttackEntityEvent handler.
 * <p>
 * Check, if a player tries to attack an entity.. Deny if: - If the attacking happens in the colony - Player is less than officer to the colony.
 *
 * @param event ItemEntityPickupEvent
 */
@SubscribeEvent
public void on(final AttackEntityEvent event) {
    if (event.getTarget() instanceof MonsterEntity) {
        return;
    }
    @NotNull final PlayerEntity player = EntityUtils.getPlayerOfFakePlayer(event.getPlayer(), event.getPlayer().getCommandSenderWorld());
    if (MineColonies.getConfig().getServer().enableColonyProtection.get() && colony.isCoordInColony(player.getCommandSenderWorld(), new BlockPos(player.position()))) {
        final Permissions perms = colony.getPermissions();
        if (event.getTarget() instanceof EntityCitizen) {
            final AbstractEntityCitizen citizen = (AbstractEntityCitizen) event.getTarget();
            if (citizen.getCitizenJobHandler().getColonyJob() instanceof AbstractJobGuard && perms.hasPermission(event.getPlayer(), Action.GUARDS_ATTACK)) {
                return;
            }
            if (perms.hasPermission(event.getPlayer(), Action.ATTACK_CITIZEN)) {
                return;
            }
            cancelEvent(event, event.getPlayer(), colony, Action.ATTACK_CITIZEN, new BlockPos(event.getTarget().position()));
            return;
        }
        if (!(event.getTarget() instanceof MobEntity) && !perms.hasPermission(event.getPlayer(), Action.ATTACK_ENTITY)) {
            cancelEvent(event, event.getPlayer(), colony, Action.ATTACK_ENTITY, new BlockPos(event.getTarget().position()));
        }
    }
}
Also used : AbstractJobGuard(com.minecolonies.coremod.colony.jobs.AbstractJobGuard) Permissions(com.minecolonies.coremod.colony.permissions.Permissions) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) MonsterEntity(net.minecraft.entity.monster.MonsterEntity) BlockPos(net.minecraft.util.math.BlockPos) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) EntityCitizen(com.minecolonies.coremod.entity.citizen.EntityCitizen) NotNull(org.jetbrains.annotations.NotNull) MobEntity(net.minecraft.entity.MobEntity) PlayerEntity(net.minecraft.entity.player.PlayerEntity) ServerPlayerEntity(net.minecraft.entity.player.ServerPlayerEntity) SubscribeEvent(net.minecraftforge.eventbus.api.SubscribeEvent)

Example 9 with EntityCitizen

use of com.minecolonies.coremod.entity.citizen.EntityCitizen in project minecolonies by ldtteam.

the class EntityAIWorkHealer method cure.

/**
 * Give a citizen the cure.
 *
 * @return the next state to go to.
 */
private IAIState cure() {
    if (currentPatient == null) {
        return DECIDE;
    }
    final ICitizenData data = getOwnBuilding().getColony().getCitizenManager().getCivilian(currentPatient.getId());
    if (data == null || !data.getEntity().isPresent() || !data.getEntity().get().getCitizenDiseaseHandler().isSick()) {
        currentPatient = null;
        return DECIDE;
    }
    final EntityCitizen citizen = (EntityCitizen) data.getEntity().get();
    if (walkToBlock(data.getEntity().get().blockPosition())) {
        return CURE;
    }
    final String diseaseName = citizen.getCitizenDiseaseHandler().getDisease();
    final Disease disease = IColonyManager.getInstance().getCompatibilityManager().getDisease(diseaseName);
    if (diseaseName.isEmpty()) {
        currentPatient = null;
        citizen.heal(10);
        worker.getCitizenExperienceHandler().addExperience(BASE_XP_GAIN);
        citizen.markDirty();
        return DECIDE;
    }
    if (!hasCureInInventory(disease, worker.getInventoryCitizen())) {
        if (hasCureInInventory(disease, getOwnBuilding().getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElseGet(null))) {
            for (final ItemStack cure : disease.getCure()) {
                if (InventoryUtils.getItemCountInItemHandler(worker.getInventoryCitizen(), stack -> stack.sameItem(cure)) < cure.getCount()) {
                    needsCurrently = new Tuple<>(stack -> stack.sameItem(cure), 1);
                    return GATHERING_REQUIRED_MATERIALS;
                }
            }
        }
        currentPatient = null;
        return DECIDE;
    }
    if (!hasCureInInventory(disease, citizen.getInventoryCitizen())) {
        for (final ItemStack cure : disease.getCure()) {
            if (InventoryUtils.getItemCountInItemHandler(citizen.getInventoryCitizen(), stack -> stack.sameItem(cure)) < cure.getCount()) {
                if (InventoryUtils.isItemHandlerFull(citizen.getInventoryCitizen())) {
                    data.triggerInteraction(new StandardInteraction(new TranslationTextComponent(PATIENT_FULL_INVENTORY), ChatPriority.BLOCKING));
                    currentPatient = null;
                    return DECIDE;
                }
                InventoryUtils.transferXOfFirstSlotInItemHandlerWithIntoNextFreeSlotInItemHandler(worker.getInventoryCitizen(), cure::sameItem, cure.getCount(), citizen.getInventoryCitizen());
            }
        }
    }
    worker.getCitizenExperienceHandler().addExperience(BASE_XP_GAIN);
    currentPatient.setState(Patient.PatientState.TREATED);
    currentPatient = null;
    return DECIDE;
}
Also used : IItemHandler(net.minecraftforge.items.IItemHandler) IRequest(com.minecolonies.api.colony.requestsystem.request.IRequest) ICitizenData(com.minecolonies.api.colony.ICitizenData) TypeToken(com.google.common.reflect.TypeToken) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) ItemStack(net.minecraft.item.ItemStack) ImmutableList(com.google.common.collect.ImmutableList) IAIState(com.minecolonies.api.entity.ai.statemachine.states.IAIState) JobHealer(com.minecolonies.coremod.colony.jobs.JobHealer) AITarget(com.minecolonies.api.entity.ai.statemachine.AITarget) com.minecolonies.api.util(com.minecolonies.api.util) Network(com.minecolonies.coremod.Network) PATIENT_FULL_INVENTORY(com.minecolonies.api.util.constant.TranslationConstants.PATIENT_FULL_INVENTORY) StreamParticleEffectMessage(com.minecolonies.coremod.network.messages.client.StreamParticleEffectMessage) Stack(com.minecolonies.api.colony.requestsystem.requestable.Stack) AbstractEntityAIInteract(com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIInteract) PlayerEntity(net.minecraft.entity.player.PlayerEntity) CircleParticleEffectMessage(com.minecolonies.coremod.network.messages.client.CircleParticleEffectMessage) IColonyManager(com.minecolonies.api.colony.IColonyManager) ChatPriority(com.minecolonies.api.colony.interactionhandling.ChatPriority) StandardInteraction(com.minecolonies.coremod.colony.interactionhandling.StandardInteraction) BlockPos(net.minecraft.util.math.BlockPos) AIWorkerState(com.minecolonies.api.entity.ai.statemachine.states.AIWorkerState) ParticleTypes(net.minecraft.particles.ParticleTypes) Nullable(org.jetbrains.annotations.Nullable) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) BuildingHospital(com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingHospital) EntityCitizen(com.minecolonies.coremod.entity.citizen.EntityCitizen) CapabilityItemHandler(net.minecraftforge.items.CapabilityItemHandler) NotNull(org.jetbrains.annotations.NotNull) StandardInteraction(com.minecolonies.coremod.colony.interactionhandling.StandardInteraction) ICitizenData(com.minecolonies.api.colony.ICitizenData) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) EntityCitizen(com.minecolonies.coremod.entity.citizen.EntityCitizen) ItemStack(net.minecraft.item.ItemStack)

Example 10 with EntityCitizen

use of com.minecolonies.coremod.entity.citizen.EntityCitizen in project minecolonies by ldtteam.

the class EntityAIWorkHealer method decide.

/**
 * Decide what to do next. Check if all patients are up date, else update their states. Then check if there is any patient we can cure or request things for.
 *
 * @return the next state to go to.
 */
private IAIState decide() {
    if (walkToBuilding()) {
        return DECIDE;
    }
    final BuildingHospital hospital = getOwnBuilding();
    for (final AbstractEntityCitizen citizen : WorldUtil.getEntitiesWithinBuilding(world, AbstractEntityCitizen.class, getOwnBuilding(), cit -> cit.getCitizenDiseaseHandler().isSick())) {
        hospital.checkOrCreatePatientFile(citizen.getCivilianID());
    }
    for (final Patient patient : hospital.getPatients()) {
        final ICitizenData data = hospital.getColony().getCitizenManager().getCivilian(patient.getId());
        if (data == null || !data.getEntity().isPresent() || (data.getEntity().isPresent() && !data.getEntity().get().getCitizenDiseaseHandler().isSick())) {
            hospital.removePatientFile(patient);
            continue;
        }
        final EntityCitizen citizen = (EntityCitizen) data.getEntity().get();
        final String diseaseName = citizen.getCitizenDiseaseHandler().getDisease();
        @Nullable final Disease disease = diseaseName.isEmpty() ? null : IColonyManager.getInstance().getCompatibilityManager().getDisease(diseaseName);
        if (patient.getState() == Patient.PatientState.NEW) {
            this.currentPatient = patient;
            return REQUEST_CURE;
        }
        if (patient.getState() == Patient.PatientState.REQUESTED) {
            if (disease == null) {
                this.currentPatient = patient;
                return CURE;
            }
            if (testRandomCureChance()) {
                this.currentPatient = patient;
                return FREE_CURE;
            }
            if (!InventoryUtils.isItemHandlerFull(citizen.getInventoryCitizen())) {
                if (hasCureInInventory(disease, worker.getInventoryCitizen()) || hasCureInInventory(disease, getOwnBuilding().getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElseGet(null))) {
                    this.currentPatient = patient;
                    return CURE;
                }
                final ImmutableList<IRequest<? extends Stack>> list = getOwnBuilding().getOpenRequestsOfType(worker.getCitizenData().getId(), TypeToken.of(Stack.class));
                final ImmutableList<IRequest<? extends Stack>> completed = getOwnBuilding().getCompletedRequestsOfType(worker.getCitizenData(), TypeToken.of(Stack.class));
                for (final ItemStack cure : IColonyManager.getInstance().getCompatibilityManager().getDisease(diseaseName).getCure()) {
                    if (!InventoryUtils.hasItemInItemHandler(worker.getInventoryCitizen(), cure::sameItem)) {
                        if (InventoryUtils.getItemCountInItemHandler(getOwnBuilding().getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElseGet(null), stack -> stack.sameItem(cure)) >= cure.getCount()) {
                            needsCurrently = new Tuple<>(stack -> stack.sameItem(cure), cure.getCount());
                            return GATHERING_REQUIRED_MATERIALS;
                        }
                        boolean hasCureRequested = false;
                        for (final IRequest<? extends Stack> request : list) {
                            if (request.getRequest().getStack().sameItem(cure)) {
                                hasCureRequested = true;
                                break;
                            }
                        }
                        for (final IRequest<? extends Stack> request : completed) {
                            if (request.getRequest().getStack().sameItem(cure)) {
                                hasCureRequested = true;
                                break;
                            }
                        }
                        if (!hasCureRequested) {
                            patient.setState(Patient.PatientState.NEW);
                            break;
                        }
                    }
                }
            } else {
                data.triggerInteraction(new StandardInteraction(new TranslationTextComponent(PATIENT_FULL_INVENTORY), ChatPriority.BLOCKING));
            }
        }
        if (patient.getState() == Patient.PatientState.TREATED) {
            if (disease == null) {
                this.currentPatient = patient;
                return CURE;
            }
            if (!hasCureInInventory(disease, citizen.getInventoryCitizen())) {
                patient.setState(Patient.PatientState.NEW);
                return DECIDE;
            }
        }
    }
    for (final PlayerEntity player : WorldUtil.getEntitiesWithinBuilding(world, PlayerEntity.class, getOwnBuilding(), player -> player.getHealth() < player.getMaxHealth() - 10 - (2 * getOwnBuilding().getBuildingLevel()))) {
        playerToHeal = player;
        return CURE_PLAYER;
    }
    final ICitizenData data = getOwnBuilding().getColony().getCitizenManager().getRandomCitizen();
    if (data.getEntity().isPresent() && data.getEntity().get().getHealth() < 10.0 && BlockPosUtil.getDistance2D(data.getEntity().get().blockPosition(), getOwnBuilding().getPosition()) < getOwnBuilding().getBuildingLevel() * 40) {
        remotePatient = data;
        return WANDER;
    }
    return DECIDE;
}
Also used : IItemHandler(net.minecraftforge.items.IItemHandler) IRequest(com.minecolonies.api.colony.requestsystem.request.IRequest) ICitizenData(com.minecolonies.api.colony.ICitizenData) TypeToken(com.google.common.reflect.TypeToken) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) ItemStack(net.minecraft.item.ItemStack) ImmutableList(com.google.common.collect.ImmutableList) IAIState(com.minecolonies.api.entity.ai.statemachine.states.IAIState) JobHealer(com.minecolonies.coremod.colony.jobs.JobHealer) AITarget(com.minecolonies.api.entity.ai.statemachine.AITarget) com.minecolonies.api.util(com.minecolonies.api.util) Network(com.minecolonies.coremod.Network) PATIENT_FULL_INVENTORY(com.minecolonies.api.util.constant.TranslationConstants.PATIENT_FULL_INVENTORY) StreamParticleEffectMessage(com.minecolonies.coremod.network.messages.client.StreamParticleEffectMessage) Stack(com.minecolonies.api.colony.requestsystem.requestable.Stack) AbstractEntityAIInteract(com.minecolonies.coremod.entity.ai.basic.AbstractEntityAIInteract) PlayerEntity(net.minecraft.entity.player.PlayerEntity) CircleParticleEffectMessage(com.minecolonies.coremod.network.messages.client.CircleParticleEffectMessage) IColonyManager(com.minecolonies.api.colony.IColonyManager) ChatPriority(com.minecolonies.api.colony.interactionhandling.ChatPriority) StandardInteraction(com.minecolonies.coremod.colony.interactionhandling.StandardInteraction) BlockPos(net.minecraft.util.math.BlockPos) AIWorkerState(com.minecolonies.api.entity.ai.statemachine.states.AIWorkerState) ParticleTypes(net.minecraft.particles.ParticleTypes) Nullable(org.jetbrains.annotations.Nullable) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) BuildingHospital(com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingHospital) EntityCitizen(com.minecolonies.coremod.entity.citizen.EntityCitizen) CapabilityItemHandler(net.minecraftforge.items.CapabilityItemHandler) NotNull(org.jetbrains.annotations.NotNull) BuildingHospital(com.minecolonies.coremod.colony.buildings.workerbuildings.BuildingHospital) StandardInteraction(com.minecolonies.coremod.colony.interactionhandling.StandardInteraction) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) ICitizenData(com.minecolonies.api.colony.ICitizenData) ItemStack(net.minecraft.item.ItemStack) Stack(com.minecolonies.api.colony.requestsystem.requestable.Stack) PlayerEntity(net.minecraft.entity.player.PlayerEntity) TranslationTextComponent(net.minecraft.util.text.TranslationTextComponent) IRequest(com.minecolonies.api.colony.requestsystem.request.IRequest) AbstractEntityCitizen(com.minecolonies.api.entity.citizen.AbstractEntityCitizen) EntityCitizen(com.minecolonies.coremod.entity.citizen.EntityCitizen) ItemStack(net.minecraft.item.ItemStack) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

EntityCitizen (com.minecolonies.coremod.entity.citizen.EntityCitizen)24 AbstractEntityCitizen (com.minecolonies.api.entity.citizen.AbstractEntityCitizen)18 ICitizenData (com.minecolonies.api.colony.ICitizenData)12 ItemStack (net.minecraft.item.ItemStack)10 BlockPos (net.minecraft.util.math.BlockPos)10 NotNull (org.jetbrains.annotations.NotNull)10 CircleParticleEffectMessage (com.minecolonies.coremod.network.messages.client.CircleParticleEffectMessage)8 PlayerEntity (net.minecraft.entity.player.PlayerEntity)8 IRequest (com.minecolonies.api.colony.requestsystem.request.IRequest)6 Stack (com.minecolonies.api.colony.requestsystem.requestable.Stack)6 Network (com.minecolonies.coremod.Network)6 AbstractJobGuard (com.minecolonies.coremod.colony.jobs.AbstractJobGuard)6 StreamParticleEffectMessage (com.minecolonies.coremod.network.messages.client.StreamParticleEffectMessage)6 IItemHandler (net.minecraftforge.items.IItemHandler)6 Nullable (org.jetbrains.annotations.Nullable)6 ImmutableList (com.google.common.collect.ImmutableList)4 TypeToken (com.google.common.reflect.TypeToken)4 IColony (com.minecolonies.api.colony.IColony)4 IColonyManager (com.minecolonies.api.colony.IColonyManager)4 ChatPriority (com.minecolonies.api.colony.interactionhandling.ChatPriority)4