Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/more fixes #3008

Merged
merged 6 commits into from Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -213,6 +213,10 @@ public void spawnCitizen(@Nullable final CitizenData data, @Nullable final World
colony.getStatsManager().checkAchievements();
markCitizensDirty();
}
else
{
LanguageHandler.sendPlayersMessage(colony.getMessageEntityPlayers(), "com.minecolonies.coremod.citizens.nospace");
}
}

@Override
Expand Down
Expand Up @@ -840,7 +840,7 @@ public DesiredActivity getDesiredActivity()
return DesiredActivity.MOURN;
}

if (getCitizenColonyHandler().getColony() != null && !world.isRemote && (!getCitizenColonyHandler().getColony().getBarbManager().getHorde((WorldServer) world).isEmpty()) && !(citizenJobHandler.getColonyJob() instanceof AbstractJobGuard))
if (getCitizenColonyHandler().getColony() != null && !world.isRemote && (!getCitizenColonyHandler().getColony().getBarbManager().getHorde((WorldServer) world).isEmpty()))
{
return DesiredActivity.SLEEP;
}
Expand Down
Expand Up @@ -122,9 +122,9 @@ public boolean freeStacks()
public int getFreeSlots()
{
int freeSlots = inventory.getSlots();
for (final int itemAmount : content.values())
for (final Map.Entry<ItemStorage, Integer> entry : content.entrySet())
{
final double slotsNeeded = (double) itemAmount / Constants.STACKSIZE;
final double slotsNeeded = (double) entry.getValue() / entry.getKey().getItemStack().getMaxStackSize();
freeSlots -= (int) Math.ceil(slotsNeeded);
}
return freeSlots;
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/minecolonies/lang/en_us.lang
Expand Up @@ -802,3 +802,4 @@ com.minecolonies.coremod.gui.townHall.buildingLevel=Building level
com.minecolonies.coremod.job.composter=Composter

com.minecolonies.coremod.gui.auto.hire.warning=Turn off Automatic Hiring in your Town Hall options to enable Firing!
com.minecolonies.coremod.citizens.nospace=<Mysterious Voice> Colonists can't arrive at your colony because there is not enough space around the town hall!