Fix light setting in protochunk

This commit is contained in:
Nassim Jahnke 2024-04-26 11:12:19 +02:00
parent 335f485dd4
commit c0ac50971d
2 changed files with 23 additions and 6 deletions

View File

@ -84,3 +84,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Pillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Pillager.java
@@ -0,0 +0,0 @@ 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));

View File

@ -20410,19 +20410,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
static CompletableFuture<ChunkAccess> generateStructureStarts(WorldGenContext context, ChunkStatus status, Executor executor, ToFullChunk fullChunkConverter, List<ChunkAccess> chunks, ChunkAccess chunk) {
@@ -0,0 +0,0 @@ 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) {
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java