Skip to content

Commit 60ab6d7

Browse files
committed
Fix findPortalAround mixin close #3628
1 parent bfaf6fd commit 60ab6d7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

patches/minecraft/net/minecraft/world/level/portal/PortalForcer.java.patch

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
private static final int f_164734_ = 3;
2929
private static final int f_164735_ = 128;
3030
private static final int f_164736_ = 16;
31-
@@ -39,10 +_,23 @@
31+
@@ -39,9 +_,21 @@
3232
this.f_77648_ = p_77650_;
3333
}
3434

@@ -45,14 +45,12 @@
4545
+
4646
public Optional<BlockUtil.FoundRectangle> m_192985_(BlockPos p_192986_, boolean p_192987_, WorldBorder p_192988_) {
4747
PoiManager poimanager = this.f_77648_.m_8904_();
48-
int i = p_192987_ ? 16 : 128;
49-
- poimanager.m_27056_(this.f_77648_, p_192986_, i);
50-
+ int newi = searchRadius.get() == -1 ? i : searchRadius.getAndSet(-1);
48+
- int i = p_192987_ ? 16 : 128;
49+
+ int i = searchRadius.get() == -1 ? (p_192987_ ? 16 : 128) : searchRadius.getAndSet(-1);
5150
+ // CraftBukkit end
52-
+ poimanager.m_27056_(this.f_77648_, p_192986_, newi);
51+
poimanager.m_27056_(this.f_77648_, p_192986_, i);
5352
Optional<PoiRecord> optional = poimanager.m_27166_((p_230634_) -> {
5453
return p_230634_.m_203565_(PoiTypes.f_218064_);
55-
}, p_192986_, i, PoiManager.Occupancy.ANY).filter((p_192981_) -> {
5654
@@ -64,6 +_,12 @@
5755
});
5856
}

0 commit comments

Comments
 (0)