fix some compile issues

This commit is contained in:
Jake Potrebic 2023-06-07 14:46:56 -07:00
parent 3c8e176265
commit e09a44e169
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
6 changed files with 27 additions and 32 deletions

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index f21ba175538436e59c45d5350ef7b2605ed96775..05e8f34044241ce9b6c1afa4f90a92492d3a64b1 100644
index f21ba175538436e59c45d5350ef7b2605ed96775..627f80e726f306edc765be5e6ac59ca73aade10b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -723,11 +723,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -18,7 +18,7 @@ index f21ba175538436e59c45d5350ef7b2605ed96775..05e8f34044241ce9b6c1afa4f90a9249
- entity.fillCrashReportCategory(crashreportsystemdetails);
- throw new ReportedException(crashreport);
+ // Paper start - Prevent tile entity and entity crashes
+ final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
+ final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
+ MinecraftServer.LOGGER.error(msg, throwable);
+ entity.discard();
+ // Paper end
@ -44,7 +44,7 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..63acd109a79ed752a05df3d4f1b99309
}
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 9bd0e817cf717fe6257ceb4ace6bf6f5eed9eb82..0ebee823180e91281fbde206a16d525277f0fb3d 100644
index 09999a3f523ce6d652799215d3418284a69042c1..8e1ca484356a7eddcdb37ef7ec01dea9864eec70 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1057,11 +1057,11 @@ public class LevelChunk extends ChunkAccess {