38 lines
1.9 KiB
Diff
38 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <wangxyper@163.com>
|
|
Date: Sun, 12 Jan 2025 11:02:06 +0800
|
|
Subject: [PATCH] Skip collision check if the block is not belong to current
|
|
tick region
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
|
index c87db2d497ca9ed2e8aad5f1bc52555ff0952b80..a5c032f2e89681008c4fac6930b90d9a6c4f5531 100644
|
|
--- a/net/minecraft/world/entity/Entity.java
|
|
+++ b/net/minecraft/world/entity/Entity.java
|
|
@@ -1675,6 +1675,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
return;
|
|
}
|
|
|
|
+ // Luminol start - Try fixing folia's old position issue
|
|
+ if(!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(this.level, blockPos) && me.earthme.luminol.config.modules.fixes.FoliaOldPositionIssueFixConfig.enabled) {
|
|
+ continue;
|
|
+ }
|
|
+ // Luminol end
|
|
+
|
|
BlockState blockState = this.level().getBlockState(blockPos);
|
|
if (!blockState.isAir() && set.add(blockPos.asLong())) {
|
|
try {
|
|
diff --git a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
|
index 3df23feff6937b6a2dbeff82e489a9a4ff644843..ab33af9ea9e7729abb7cc0073c468c2f8ecbcbb9 100644
|
|
--- a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
|
+++ b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
|
@@ -2,6 +2,8 @@ package net.minecraft.world.level.block.piston;
|
|
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
+
|
|
+import me.earthme.luminol.config.modules.fixes.FoliaOldPositionIssueFixConfig;
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.core.Direction;
|
|
import net.minecraft.core.HolderGetter;
|