mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-03 22:26:12 +00:00
--------- Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> Co-authored-by: Fortern <blueten.ki@gmail.com> Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com> Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com> Co-authored-by: MC_XiaoHei <xiaohei.xor7@outlook.com>
20 lines
1.2 KiB
Diff
20 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Fri, 14 Mar 2025 10:55:57 +0800
|
|
Subject: [PATCH] Skippable raid height check
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java
|
|
index 6a45e00490f0067d25010371f7c5fa40bbe7671c..8e08a187da6f40d1b3bc990401af36e510537777 100644
|
|
--- a/net/minecraft/world/entity/raid/Raid.java
|
|
+++ b/net/minecraft/world/entity/raid/Raid.java
|
|
@@ -687,7 +687,7 @@ public class Raid {
|
|
int i2 = this.center.getX() + Mth.floor(Mth.cos(f2) * 32.0F * f) + level.random.nextInt(3) * Mth.floor(f);
|
|
int i3 = this.center.getZ() + Mth.floor(Mth.sin(f2) * 32.0F * f) + level.random.nextInt(3) * Mth.floor(f);
|
|
int height = level.getHeight(Heightmap.Types.WORLD_SURFACE, i2, i3);
|
|
- if (Mth.abs(height - this.center.getY()) <= 96) {
|
|
+ if (org.leavesmc.leaves.LeavesConfig.modify.oldMC.raid.skipHeightCheck || Mth.abs(height - this.center.getY()) <= 96) { // Leaves - skippable
|
|
mutableBlockPos.set(i2, height, i3);
|
|
if (!level.isVillage(mutableBlockPos) || i <= 7) {
|
|
int i4 = 10;
|