Properly lookup random-ticked precipitation blocks (#7606)

This commit is contained in:
Bjarne Koll 2022-03-15 19:44:25 +01:00 committed by GitHub
parent 0ca80c7ee8
commit 2d3e8f7729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..e8b4053babe46999980b926431254050
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9fa7a01db61ba91b79eda4f7e4fd4f0001712808..6dee3e414e378538e6b5ef93dc1414e0128cffbb 100644
index 8f27ef86cac71e0a0002093f4eded83f8891876f..6b90582dd0aefccab7e1b5a1718f96854d1cdd81 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -645,6 +645,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -126,13 +126,13 @@ index 9fa7a01db61ba91b79eda4f7e4fd4f0001712808..6dee3e414e378538e6b5ef93dc1414e0
if (biomebase.shouldSnow(this, blockposition)) {
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition, Blocks.SNOW.defaultBlockState(), null); // CraftBukkit
}
+ blockposition.setY(downY); // Paper
- BlockState iblockdata = this.getBlockState(blockposition1);
+ BlockState iblockdata = this.getBlockState(blockposition); // Paper
Biome.Precipitation biomebase_precipitation = biomebase.getPrecipitation();
- if (biomebase_precipitation == Biome.Precipitation.RAIN && biomebase.coldEnoughToSnow(blockposition1)) {
+ blockposition.setY(downY); // Paper
+ if (biomebase_precipitation == Biome.Precipitation.RAIN && biomebase.coldEnoughToSnow(blockposition)) { // Paper
biomebase_precipitation = Biome.Precipitation.SNOW;
}