mojira.dev
MC-1105

Villagers act like it is Raining when they are in the Desert, and it Rains elsewhere.

As the title says. I Don't expect villagers to take shelter from an overcast sky, when they are in the desert, and therefore it isn't actually raining.

Not a huge issue, but worth noting.

Related issues

Comments

Meta

That's because it actually is raining (technically) but it does not get displayed for you because you are in a desert.

Anon Ymus

Maybe villagers are just really scared of rain.

bugi74

Which rain would the villagers be afraid of? Bad reasoning, though I can see the joke.

However, I'd consider this a bug if burning does not stop in desert while it rains somewhere.. the behaviors (villagers and burning) should be consistent.

bugi74

In any case, the fix is easy... The AI code just forgets to check whether the entity is actually wet.

Bug

EntityAIMoveIndoors.shouldExecute()

public boolean shouldExecute() {
        if ((!this.entityObj.worldObj.isDaytime() || this.entityObj.worldObj.isRaining()) && !this.entityObj.worldObj.provider.hasNoSky) {
            ...

Fix

EntityAIMoveIndoors.shouldExecute()

public boolean shouldExecute() {
        if ((!this.entityObj.worldObj.isDaytime() || (this.entityObj.worldObj.isRaining() && this.entityObj.isWet())) && !this.entityObj.worldObj.provider.hasNoSky) {
            ...

Tested on 1.4.7 with both a desert and plains city, using /weather -command. With the fix desert villagers remain outdoors even when it rains elsewhere.

(Edit: this still leaves one case they might go in perhaps unexpectedly; if it is raining somewhere, and they get their feet wet (say, visit in the waters of their farms?), they might go in. (Perhaps to change their shoes?) Didn't test that, but I don't think that is as big an issue.)

(Edit2:
Another function that could be used is the one resolving whether it can do lightning at the villager's spot, but that one had some corner case, too. Also, the "isWet()" lets the villager stay under roofs, instead of going indoors, but then again, that is almost expected/natural behaviour for some people..)

Simons Mith

I don't believe this is 'Works as Intended'. Can the bug status and resolution be corrected, please?

Anon Ymus

I can see reasoning for and against this bug, so we should let Mojang decide if it is a problem.

bugi74

Affects 13w09b.

Arisa Bot

An attachment with a disallowed file extension has been removed from this ticket.

Executable files and documents are not allowed as attachments.
Please attach crash reports, log files and screenshots as they are instead of pasting them into a document.
-- I am a bot. This action was performed automatically! Please report any issues in Discord or Reddit

eleazzaar

migrated

Community Consensus

rain

Minecraft 1.4.2, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09a, Snapshot 13w09b

Minecraft 13w39a

Retrieved