[MC-1105] Villagers act like it is Raining when they are in the Desert, and it Rains elsewhere. Created: 29/Oct/12  Updated: 21/Nov/20  Resolved: 25/Sep/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09a, Snapshot 13w09b
Fix Version/s: Minecraft 13w39a

Type: Bug
Reporter: eleazzaar Assignee: EvilSeph (Warren Loo)
Resolution: Fixed Votes: 4
Labels: rain
Environment:

Mac 10.7.5


Issue Links:
Relates
relates to MC-178119 Bees go into their beehive / bee nest... Open
relates to MC-17247 Villagers running all the time Resolved
CHK:
Confirmation Status: Community Consensus
Game Mode: Survival

 Description   

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.



 Comments   
Comment by [Bot] Arisa [ 21/Nov/20 ]

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

Comment by Markku [ 28/Feb/13 ]

Affects 13w09b.

Comment by Anon Ymus [ 20/Jan/13 ]

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

Comment by Simons Mith [ 20/Jan/13 ]

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

Comment by Markku [ 20/Jan/13 ]

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..)

Comment by Markku [ 20/Jan/13 ]

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.

Comment by Anon Ymus [ 20/Jan/13 ]

Maybe villagers are just really scared of rain.

Comment by Meta [ 25/Nov/12 ]

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

Generated at Sun Jan 12 11:53:19 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.