41 lines
1.7 KiB
Diff
41 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <wangxyper@163.com>
|
|
Date: Wed, 29 Jan 2025 14:57:27 +0800
|
|
Subject: [PATCH] Skip collision check if the block is not belong to current
|
|
tick region
|
|
|
|
A temporary fix of these issues:
|
|
https://github.com/PaperMC/Folia/issues/311
|
|
|
|
Due to that mojang won't ignore the blocks the entity passed by, and sometimes the old position may not be updated and it points to a block that we don't own it, and it will access it during applyEffectsFromBlocks.So the best way to fix that is to skip the collision check of that block because it was already not owned by us and it's not necessary to check it
|
|
|
|
Related to mojang's bug fix:
|
|
https://bugs.mojang.com/browse/MC-92875
|
|
|
|
diff --git a/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaOldPositionIssueFixConfig.java b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaOldPositionIssueFixConfig.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..7294792d934e7374dcf335135dda739702fdcc62
|
|
--- /dev/null
|
|
+++ b/src/main/java/me/earthme/luminol/config/modules/fixes/FoliaOldPositionIssueFixConfig.java
|
|
@@ -0,0 +1,20 @@
|
|
+package me.earthme.luminol.config.modules.fixes;
|
|
+
|
|
+import me.earthme.luminol.config.ConfigInfo;
|
|
+import me.earthme.luminol.config.EnumConfigCategory;
|
|
+import me.earthme.luminol.config.IConfigModule;
|
|
+
|
|
+public class FoliaOldPositionIssueFixConfig implements IConfigModule {
|
|
+ @ConfigInfo(baseName = "enabled")
|
|
+ public static boolean enabled = false;
|
|
+
|
|
+ @Override
|
|
+ public EnumConfigCategory getCategory() {
|
|
+ return EnumConfigCategory.FIXES;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public String getBaseName() {
|
|
+ return "folia.fix_old_position_issue";
|
|
+ }
|
|
+}
|