Moar 1.19 fixes (#7884)

This commit is contained in:
Noah van der Aa 2022-06-08 15:38:56 +02:00 committed by GitHub
parent 55d7f562b8
commit b1f5e70075
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 182 additions and 224 deletions

View file

@ -37,7 +37,7 @@ index bdc6a7e6a9fcd467f653d53afd7ca2e33776fb06..e82bf53e1d31a5dd81713fe858d1e5d7
+ // Paper start - Replace rules for Height in Swamp Biome
+ final double maxHeightSwamp = world.getMinecraftWorld().paperConfig.slimeMaxSpawnHeightInSwamp;
+ final double minHeightSwamp = world.getMinecraftWorld().paperConfig.slimeMinSpawnHeightInSwamp;
+ if (world.getBiome(pos).is(Biomes.SWAMP) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) {
+ if (world.getBiome(pos).is(net.minecraft.world.level.biome.Biomes.SWAMP) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) {
+ // Paper end
return checkMobSpawnRules(type, world, spawnReason, pos, random);
}