mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
more compile fixes
This commit is contained in:
parent
957d248aff
commit
dc11e08746
4 changed files with 7 additions and 8 deletions
|
@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@Override
|
@Override
|
||||||
public boolean canBeAffected(MobEffectInstance effect) {
|
public boolean canBeAffected(MobEffectInstance effect) {
|
||||||
- return effect.getEffect() == MobEffects.WITHER ? false : super.canBeAffected(effect);
|
- return effect.getEffect() == MobEffects.WITHER ? false : super.canBeAffected(effect);
|
||||||
+ return effect.getEffect() == MobEffects.WITHER && this.level.paperConfig().entities.mobEffects.immuneToWitherEffect.wither ? false : super.canBeAffected(effect); // Paper
|
+ return effect.getEffect() == MobEffects.WITHER && this.level().paperConfig().entities.mobEffects.immuneToWitherEffect.wither ? false : super.canBeAffected(effect); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
private class WitherDoNothingGoal extends Goal {
|
private class WitherDoNothingGoal extends Goal {
|
||||||
|
|
|
@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ .getHolderOrThrow(net.minecraft.world.level.biome.Biomes.PLAINS);
|
+ .getHolderOrThrow(net.minecraft.world.level.biome.Biomes.PLAINS);
|
||||||
+ player.connection.send(new net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket(
|
+ player.connection.send(new net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket(
|
||||||
+ new net.minecraft.world.level.chunk.EmptyLevelChunk(worldserver1, player.chunkPosition(), plains),
|
+ new net.minecraft.world.level.chunk.EmptyLevelChunk(worldserver1, player.chunkPosition(), plains),
|
||||||
+ worldserver1.getLightEngine(), null, null, true, false)
|
+ worldserver1.getLightEngine(), null, null)
|
||||||
+ );
|
+ );
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
|
@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
public class CraftWorld extends CraftRegionAccessor implements World {
|
public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
public static final int CUSTOM_DIMENSION_OFFSET = 10;
|
public static final int CUSTOM_DIMENSION_OFFSET = 10;
|
||||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||||
+ private static final ChunkStatus[] REGEN_CHUNK_STATUSES = {ChunkStatus.BIOMES, ChunkStatus.NOISE, ChunkStatus.SURFACE, ChunkStatus.CARVERS, ChunkStatus.LIQUID_CARVERS, ChunkStatus.FEATURES}; // Paper - implement regenerate chunk method
|
+ private static final ChunkStatus[] REGEN_CHUNK_STATUSES = {ChunkStatus.BIOMES, ChunkStatus.NOISE, ChunkStatus.SURFACE, ChunkStatus.CARVERS, ChunkStatus.FEATURES, ChunkStatus.INITIALIZE_LIGHT}; // Paper - implement regenerate chunk method
|
||||||
|
|
||||||
private final ServerLevel world;
|
private final ServerLevel world;
|
||||||
private WorldBorder worldBorder;
|
private WorldBorder worldBorder;
|
||||||
|
@ -67,8 +67,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ chunk -> {
|
+ chunk -> {
|
||||||
+ throw new UnsupportedOperationException("Not creating full chunks here");
|
+ throw new UnsupportedOperationException("Not creating full chunks here");
|
||||||
+ },
|
+ },
|
||||||
+ list,
|
+ list
|
||||||
+ true
|
|
||||||
+ );
|
+ );
|
||||||
+ serverChunkCache.mainThreadProcessor.managedBlock(future::isDone);
|
+ serverChunkCache.mainThreadProcessor.managedBlock(future::isDone);
|
||||||
+ if (chunkStatus == ChunkStatus.NOISE) {
|
+ if (chunkStatus == ChunkStatus.NOISE) {
|
||||||
|
|
|
@ -10031,7 +10031,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ completeFuture = this.toStatus.generate(Runnable::run, this.world, chunkMap.generator, chunkMap.structureTemplateManager,
|
+ completeFuture = this.toStatus.generate(Runnable::run, this.world, chunkMap.generator, chunkMap.structureTemplateManager,
|
||||||
+ serverChunkCache.getLightEngine(), null, this.neighbours, false)
|
+ serverChunkCache.getLightEngine(), null, this.neighbours)
|
||||||
+ .whenComplete((final Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> either, final Throwable throwable) -> {
|
+ .whenComplete((final Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> either, final Throwable throwable) -> {
|
||||||
+ final ChunkAccess newChunk = (either == null) ? null : either.left().orElse(null);
|
+ final ChunkAccess newChunk = (either == null) ? null : either.left().orElse(null);
|
||||||
+ if (newChunk instanceof ProtoChunk) {
|
+ if (newChunk instanceof ProtoChunk) {
|
||||||
|
@ -17700,7 +17700,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
- throw (IllegalStateException) Util.pauseInIde(new IllegalStateException("No chunk holder after ticket has been added"));
|
- throw (IllegalStateException) Util.pauseInIde(new IllegalStateException("No chunk holder after ticket has been added"));
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
+ boolean needsFullScheduling = leastStatus == ChunkStatus.FULL && (chunkHolder == null || !chunkHolder.getChunkStatus().isOrAfter(ChunkHolder.FullChunkStatus.BORDER));
|
+ boolean needsFullScheduling = leastStatus == ChunkStatus.FULL && (chunkHolder == null || !chunkHolder.getChunkStatus().isOrAfter(FullChunkStatus.FULL));
|
||||||
+
|
+
|
||||||
+ if ((chunkHolder == null || chunkHolder.getTicketLevel() > minLevel || needsFullScheduling) && !create) {
|
+ if ((chunkHolder == null || chunkHolder.getTicketLevel() > minLevel || needsFullScheduling) && !create) {
|
||||||
+ return ChunkHolder.UNLOADED_CHUNK_FUTURE;
|
+ return ChunkHolder.UNLOADED_CHUNK_FUTURE;
|
||||||
|
@ -19554,7 +19554,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
|
|
||||||
public FullChunkStatus getFullStatus() {
|
public FullChunkStatus getFullStatus() {
|
||||||
- return this.fullStatus == null ? FullChunkStatus.FULL : (FullChunkStatus) this.fullStatus.get();
|
- return this.fullStatus == null ? FullChunkStatus.FULL : (FullChunkStatus) this.fullStatus.get();
|
||||||
+ return this.chunkHolder == null ? FullChunkStaatus.INACCESSIBLE : this.chunkHolder.getChunkStatus(); // Paper - rewrite chunk system
|
+ return this.chunkHolder == null ? FullChunkStatus.INACCESSIBLE : this.chunkHolder.getChunkStatus(); // Paper - rewrite chunk system
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFullStatus(Supplier<FullChunkStatus> levelTypeProvider) {
|
public void setFullStatus(Supplier<FullChunkStatus> levelTypeProvider) {
|
||||||
|
|
Loading…
Reference in a new issue