mojira.dev
MC-254132

Wolves do not get wet when raining in Frozen Oceans

The bug

Wolves do not get wet when raining in Frozen Oceans.

Expected result

Wolves would get wet when raining in Frozen Oceans.

Code analysis

Code analysis and potential fix can be found in this comment.

Linked issues

Attachments

Comments 6

Can confirm.

[media]

Can confirm in 1.19.1.

Code analysis (Mojang mappings, 22w42a): In Wolf#tick(), Entity#isInWaterRainOrBubble() is called, which in turn calls Level#isRainingAt(BlockPos). Taking a look at the function:

...
    public boolean isRainingAt(BlockPos $$0) {
        if (!this.isRaining()) {
            return false;
        }
        if (!this.canSeeSky($$0)) {
            return false;
        }
        if (this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, $$0).getY() > $$0.getY()) {
            return false;
        }
        Biome $$1 = this.getBiome($$0).value();
        return $$1.getPrecipitation() == Biome.Precipitation.RAIN && $$1.warmEnoughToRain($$0);
    }
...

We can see that the function only returns true if the biome precipitation is RAIN. Frozen oceans have a biome precipitation of SNOW, so this will always be false for frozen oceans. This return statement should probably be changed to something like

return ($$1.getPrecipitation() == Biome.Precipitation.RAIN || $$1.getPrecipitation() == Biome.Precipitation.SNOW) && $$1.warmEnoughToRain($$0);

Edit: I have tested this in 1.19.2 with my extremely limited modding capabilities and verified that this fixes this issue, MC-233893, and MC-247836. I am unsure if it causes other issues, however.

Edit 2: this is now tracked separately at MC-255811.

Appears to be fixed for me in 23w03, most likely due to MC-255811 being fixed. Someone please double check.

Confirmed fixed in 23w03a.

ampolive

(Unassigned)

Community Consensus

Normal

Mob behaviour

frozen_ocean

1.19, 1.19.1 Pre-release 4, 1.19.1 Pre-release 5, 1.19.1, 1.19.2, 22w42a, 1.19.3

23w03a

Retrieved