3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-24 15:20:11 +01:00

Fix light setting in protochunk

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-04-26 11:12:19 +02:00
Ursprung 813cfbf2b0
Commit 478a971a7b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
2 geänderte Dateien mit 25 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -84,3 +84,16 @@ index 661a6274a800ca9b91bdb809d026972d23c3b263..ea72dcb064a35bc6245bc5c94d592efe
}
public static <T> SortedArraySet<T> create(Comparator<T> comparator) {
diff --git a/src/main/java/net/minecraft/world/entity/monster/Pillager.java b/src/main/java/net/minecraft/world/entity/monster/Pillager.java
index 328888db50c7ef7cae8305a6aa19d1af9a8c880d..9d75cc03c8bfe271c72920d9142dac6281bf0341 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Pillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Pillager.java
@@ -62,7 +62,7 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve
protected void registerGoals() {
super.registerGoals();
this.goalSelector.addGoal(0, new FloatGoal(this));
- this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, this, 10.0F));
+ this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, 10.0F)); // Paper - what?
this.goalSelector.addGoal(3, new RangedCrossbowAttackGoal<>(this, 1.0D, 8.0F));
this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6D));
this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 15.0F, 1.0F));

Datei anzeigen

@ -20394,7 +20394,7 @@ index 95318092f8281d98132d1d3ceb4a5c36cf32eb05..b81c548c0e1ac53784e9c94b34b65db5
public int getIndex() {
diff --git a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
index ce7f154b9dad4e78ee0189405cf57dcb3d5301b8..b66c0c4a9e9b9e5dbcb51b23319f0d4b23837139 100644
index ce7f154b9dad4e78ee0189405cf57dcb3d5301b8..a5e8078b99161272b0f826b8c39e56d17588c264 100644
--- a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
+++ b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
@@ -26,8 +26,9 @@ public class ChunkStatusTasks {
@ -20409,20 +20409,24 @@ index ce7f154b9dad4e78ee0189405cf57dcb3d5301b8..b66c0c4a9e9b9e5dbcb51b23319f0d4b
}
static CompletableFuture<ChunkAccess> generateStructureStarts(WorldGenContext context, ChunkStatus status, Executor executor, ToFullChunk fullChunkConverter, List<ChunkAccess> chunks, ChunkAccess chunk) {
@@ -113,11 +114,11 @@ public class ChunkStatusTasks {
}
@@ -125,7 +126,7 @@ public class ChunkStatusTasks {
((ProtoChunk) chunk).setLightEngine(lightingProvider);
boolean flag = ChunkStatusTasks.isLighted(chunk);
static CompletableFuture<ChunkAccess> generateInitializeLight(WorldGenContext context, ChunkStatus status, Executor executor, ToFullChunk fullChunkConverter, List<ChunkAccess> chunks, ChunkAccess chunk) {
- return ChunkStatusTasks.initializeLight(context.lightEngine(), chunk);
- return lightingProvider.initializeLight(chunk, flag);
+ return CompletableFuture.completedFuture(chunk); // Paper - rewrite chunk system
}
static CompletableFuture<ChunkAccess> loadInitializeLight(WorldGenContext context, ChunkStatus status, ToFullChunk fullChunkConverter, ChunkAccess chunk) {
- return ChunkStatusTasks.initializeLight(context.lightEngine(), chunk);
static CompletableFuture<ChunkAccess> generateLight(WorldGenContext context, ChunkStatus status, Executor executor, ToFullChunk fullChunkConverter, List<ChunkAccess> chunks, ChunkAccess chunk) {
@@ -139,7 +140,7 @@ public class ChunkStatusTasks {
private static CompletableFuture<ChunkAccess> lightChunk(ThreadedLevelLightEngine lightingProvider, ChunkAccess chunk) {
boolean flag = ChunkStatusTasks.isLighted(chunk);
- return lightingProvider.lightChunk(chunk, flag);
+ return CompletableFuture.completedFuture(chunk); // Paper - rewrite chunk system
}
private static CompletableFuture<ChunkAccess> initializeLight(ThreadedLevelLightEngine lightingProvider, ChunkAccess chunk) {
static CompletableFuture<ChunkAccess> generateSpawn(WorldGenContext context, ChunkStatus status, Executor executor, ToFullChunk fullChunkConverter, List<ChunkAccess> chunks, ChunkAccess chunk) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index 01d6b8683a9fa30d05b03ebfef8ee2dca4e83a56..b2e8082dda0d0ca32bfc32cbf9d8ae9822febc30 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java