mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
354
This commit is contained in:
parent
1d7d7e92f2
commit
9079c90d22
@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 43c69ec522a2c91d47b5cea05aaf86f979c5fcb2..fd038c105d12c76c9e2645ad146e77b4a9cc1079 100644
|
||||
index 8254a5d2a72bf12b2f2600a99eb3058c6e76042a..d61aa8acdcbc08d131ecf1d385084e6c82663feb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2861,5 +2861,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2880,5 +2880,10 @@ public final class CraftServer implements Server {
|
||||
profile.getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
|
||||
return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile);
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Show blockstate location if we failed to read it
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
index e7fd9ebd47af277d6dbced0f17e954722c202776..ff3f88f107a4c059688566b69dcdf48bc01210ab 100644
|
||||
index fdd6f9e8164efedb3e8f29857ad35ed69e7b299d..52fe7315fa838e3b6b236127c293ac0e8528ee7d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
@@ -25,6 +25,7 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
||||
@@ -30,6 +30,7 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
||||
|
||||
this.tileEntity = tileEntity;
|
||||
|
||||
@ -16,7 +16,7 @@ index e7fd9ebd47af277d6dbced0f17e954722c202776..ff3f88f107a4c059688566b69dcdf48b
|
||||
// Paper start
|
||||
this.snapshotDisabled = DISABLE_SNAPSHOT;
|
||||
if (DISABLE_SNAPSHOT) {
|
||||
@@ -37,6 +38,14 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
||||
@@ -42,6 +43,14 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
||||
this.load(this.snapshot);
|
||||
}
|
||||
// Paper end
|
||||
@ -30,4 +30,4 @@ index e7fd9ebd47af277d6dbced0f17e954722c202776..ff3f88f107a4c059688566b69dcdf48b
|
||||
+ // Paper end - Show blockstate location if we failed to read it
|
||||
}
|
||||
|
||||
protected CraftBlockEntityState(CraftBlockEntityState<T> state) {
|
||||
protected CraftBlockEntityState(CraftBlockEntityState<T> state, Location location) {
|
@ -17,10 +17,10 @@ This should fully solve all of the issues around it so that only natural
|
||||
influences natural spawns.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index d5ada3301429e7fec0d157d7a33d4937e0f82fbb..5247782edc426107fb4b3ade5d92f148c0b6e681 100644
|
||||
index 41eef8bfd1572aecaf086bfbec300abeae2df794..58ea6a1f95a09c22125a8262b1b221004ebce0e4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -88,6 +88,13 @@ public final class NaturalSpawner {
|
||||
@@ -83,6 +83,13 @@ public final class NaturalSpawner {
|
||||
MobCategory enumcreaturetype = entity.getType().getCategory();
|
||||
|
||||
if (enumcreaturetype != MobCategory.MISC) {
|
@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this
|
||||
server-internal fix makes this change future-proof.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index 4ebc38d0666d01c67c2728355fbbef296a0672e3..20842ed5b730dda88efd0cda9292a37f879a4017 100644
|
||||
index 516999dc425d23c570dabfe4f3c829650a6d205d..40348e45b02be9a0b397a883940a476fb6738ef4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -173,7 +173,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -176,7 +176,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
this.shoot((double) f5, (double) f6, (double) f7, speed, divergence);
|
||||
Vec3 vec3d = shooter.getDeltaMovement();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] offset item frame ticking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
index aaa579ba04445aa350a439610d460a2415320cfc..4dea85a8ab8ae16d02e35d226fd155891ce2319a 100644
|
||||
index 47a62680279f15ac93eb521f7ec93c3b8d52c602..0ffff5329fa2c7833f9ec71528cb7f951cf78109 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
@@ -39,7 +39,7 @@ public abstract class HangingEntity extends Entity {
|
||||
@@ -40,7 +40,7 @@ public abstract class HangingEntity extends Entity {
|
||||
protected static final Predicate<Entity> HANGING_ENTITY = (entity) -> {
|
||||
return entity instanceof HangingEntity;
|
||||
};
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4be7b136dd2b35b0637a1455985ab99bbd3af0a5..b4a817e047a78723d746740c88503441625ac8e7 100644
|
||||
index 709bcc209299fcc5a593c1b4c93a179af2b5eff1..ba18e2decde409b40ac73c66b015419e219c759a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3730,9 +3730,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3815,9 +3815,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
public void startUsingItem(InteractionHand hand) {
|
||||
@ -24,7 +24,7 @@ index 4be7b136dd2b35b0637a1455985ab99bbd3af0a5..b4a817e047a78723d746740c88503441
|
||||
this.useItem = itemstack;
|
||||
this.useItemRemaining = itemstack.getUseDuration();
|
||||
if (!this.level().isClientSide) {
|
||||
@@ -3812,6 +3817,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3897,6 +3902,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.releaseUsingItem();
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
@ -32,7 +32,7 @@ index 4be7b136dd2b35b0637a1455985ab99bbd3af0a5..b4a817e047a78723d746740c88503441
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@@ -3846,8 +3852,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3931,8 +3937,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Dont send unnecessary sign update
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
index a822b190aeee1d644c3509bb75106fa4dfdd963f..9939cad5af2d7873f188f18978029663a8d785de 100644
|
||||
index 2e5fc484d26b5468dfb8f49d62f4518e83169618..ddf101fd613c854f77971d97a5b0f9319f21242a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
@@ -184,6 +184,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
@@ -185,6 +185,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
|
||||
} else {
|
||||
SignBlockEntity.LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString());
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable pillager patrols
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||
index 65d9211b812995869e58900a2873583658122312..c7aea059de151cf8ae6e660785e176586bc23ff3 100644
|
||||
index 7522c40ab352d3b3ce1540f043b4b5f0d411060b..7b5db53d4cf97e41175896de47303526198fb8f6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||
@@ -25,6 +25,7 @@ public class PatrolSpawner implements CustomSpawner {
|
||||
@@ -24,6 +24,7 @@ public class PatrolSpawner implements CustomSpawner {
|
||||
|
||||
@Override
|
||||
public int tick(ServerLevel world, boolean spawnMonsters, boolean spawnAnimals) {
|
@ -33,10 +33,10 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
|
||||
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 05b838f7008d5d031b18e161bbde7e72b8205b90..8805fd57e7198aa9afaafe45fab13fd343e2a545 100644
|
||||
index 1c508d1f122d287cd8dc0a905de96436c343327a..6fa52a83d343ff151667cd9ade0ec60f026ce66d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -880,6 +880,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -906,6 +906,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
entity.discard(null); // CraftBukkit - add Bukkit remove cause
|
||||
needsRemoval = true;
|
||||
}
|
||||
@ -44,7 +44,7 @@ index 05b838f7008d5d031b18e161bbde7e72b8205b90..8805fd57e7198aa9afaafe45fab13fd3
|
||||
return !needsRemoval;
|
||||
}));
|
||||
// CraftBukkit end
|
||||
@@ -930,6 +931,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -948,6 +949,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
});
|
||||
}
|
||||
|
||||
@ -87,6 +87,7 @@ index 05b838f7008d5d031b18e161bbde7e72b8205b90..8805fd57e7198aa9afaafe45fab13fd3
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Paper end - duplicate uuid resolving
|
||||
public CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> prepareTickingChunk(ChunkHolder holder) {
|
||||
CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> {
|
||||
+
|
||||
public CompletableFuture<ChunkResult<LevelChunk>> prepareTickingChunk(ChunkHolder holder) {
|
||||
CompletableFuture<ChunkResult<List<ChunkAccess>>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> {
|
||||
return ChunkStatus.FULL;
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index eb9668f94dbc36f3abc7d5c47c9b1b657aa94ced..79a0accd8230c76d792ed3f7558e8b3ea6d2f6d1 100644
|
||||
index 209d9f294a387e63b725be76cb645ca8925fa5a4..9d08ff6024c6036dce57c833c1413033c8b2ef2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -934,7 +934,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1001,7 +1001,7 @@ public class ServerPlayer extends Player {
|
||||
this.tellNeutralMobsThatIDied();
|
||||
}
|
||||
// SPIGOT-5478 must be called manually now
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent bees loading chunks checking hive position
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index d3ef1bf0be4584dbe41576fa7036b11ff405b9d8..0f7b02d39b5dc781e65537c1b6d924e6c51e5dc7 100644
|
||||
index 8b0d13513656752a0b40e25c5041d41491b9eef0..5ecf8a87a31a0243c281e2a69823f5f79be69ca5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -509,6 +509,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -499,6 +499,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
} else if (this.isTooFarAway(this.hivePos)) {
|
||||
return false;
|
||||
} else {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID
|
||||
Use the PlayerList map instead of iterating over all players
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 20de3be232ccc7ec7bbc3c6aee9acf66fd396af1..54c0aa440cd8e7e1cedc6ef9ae963c68558b6080 100644
|
||||
index e008b0b1b04dd8da118be6ee0bdd05c146a97532..0abba132f2ce4cab0fd26e1ee17442b22471b6aa 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -324,6 +324,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -329,6 +329,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
// Paper end
|
||||
|
@ -15,17 +15,17 @@ This patch resolves the conflict by offsetting checking Spigot's entity
|
||||
activation range check from an item's move method.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index bfbbb9382cf483a23acf35c17250f6f9223f7507..5994cb69575d365f435f5ef6da5fa61ee9298fe1 100644
|
||||
index f0e6375236d61f32235ed23c3bae49db1545d1a2..5782033cbe408f60340833ddb49dbca3623aaa83 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -169,7 +169,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -175,7 +175,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
}
|
||||
|
||||
- if (!this.onGround() || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) {
|
||||
+ if (!this.onGround() || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) { // Paper - Diff on change
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
float f1 = 0.98F;
|
||||
float f = 0.98F;
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 6d51464f6368151e8acc532414ee223714584e96..9fb9fa62c32445ac3c3883a6433759c86dcfc428 100644
|
@ -5,10 +5,10 @@ Subject: [PATCH] Optimize call to getFluid for explosions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index ade10a9fd93f4c0f04cd56ce5e1da06af4a05060..b057a67a416928ae30bd407b3da982b73ae3be03 100644
|
||||
index 146f5a33e1d538e46e4f7034a498d30f742a96f7..b54a5c496ea7f1999c1b10219e72e9ce79921c99 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -191,7 +191,7 @@ public class Explosion {
|
||||
@@ -192,7 +192,7 @@ public class Explosion {
|
||||
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
|
||||
BlockPos blockposition = BlockPos.containing(d4, d5, d6);
|
||||
BlockState iblockdata = this.level.getBlockState(blockposition);
|
@ -6,10 +6,10 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate
|
||||
Should help if something dumb happens
|
||||
|
||||
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 ba7a816bd9dd4aec79e2560f0968374dbb28442c..cbc8e95c8f890f0c0eb717d4d2ae3f427dc260d8 100644
|
||||
index b0518725a2e145d29bd5bc0aa7e6998a47dcb511..b3f8df13e97cbde7dd914b42004d186f90b78646 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -86,8 +86,20 @@ public class ChunkSerializer {
|
||||
@@ -88,8 +88,20 @@ public class ChunkSerializer {
|
||||
|
||||
public ChunkSerializer() {}
|
||||
|
||||
@ -32,13 +32,13 @@ index ba7a816bd9dd4aec79e2560f0968374dbb28442c..cbc8e95c8f890f0c0eb717d4d2ae3f42
|
||||
if (!Objects.equals(chunkPos, chunkcoordintpair1)) {
|
||||
ChunkSerializer.LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", new Object[]{chunkPos, chunkPos, chunkcoordintpair1});
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
index 25623dcd44edc475c5dce2756bf99fc18e142b63..eaf978d15618b80d23c443acbd42db926d570d01 100644
|
||||
index 5ed1b824978c3805e91aeed8e172206ada9fb720..09a73383867d1ffadababd24428ee7a61ab98959 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
@@ -157,6 +157,13 @@ public class ChunkStorage implements AutoCloseable {
|
||||
@@ -168,6 +168,13 @@ public class ChunkStorage implements AutoCloseable {
|
||||
}
|
||||
|
||||
public void write(ChunkPos chunkPos, CompoundTag nbt) {
|
||||
public CompletableFuture<Void> write(ChunkPos chunkPos, CompoundTag nbt) {
|
||||
+ // Paper start - guard against serializing mismatching coordinates
|
||||
+ if (nbt != null && !chunkPos.equals(ChunkSerializer.getChunkCoordinate(nbt))) {
|
||||
+ final String world = (this instanceof net.minecraft.server.level.ChunkMap) ? ((net.minecraft.server.level.ChunkMap) this).level.getWorld().getName() : null;
|
||||
@ -46,6 +46,6 @@ index 25623dcd44edc475c5dce2756bf99fc18e142b63..eaf978d15618b80d23c443acbd42db92
|
||||
+ + " but compound says coordinate is " + ChunkSerializer.getChunkCoordinate(nbt) + (world == null ? " for an unknown world" : (" for world: " + world)));
|
||||
+ }
|
||||
+ // Paper end - guard against serializing mismatching coordinates
|
||||
this.worker.store(chunkPos, nbt);
|
||||
if (this.legacyStructureHandler != null) {
|
||||
this.legacyStructureHandler.removeIndex(chunkPos.toLong());
|
||||
this.handleLegacyStructureIndex(chunkPos);
|
||||
return this.worker.store(chunkPos, nbt);
|
||||
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Alternative item-despawn-rate
|
||||
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea589ab337 100644
|
||||
index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a1619238cff94c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -57,6 +57,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -61,6 +61,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
public final float bobOffs;
|
||||
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
||||
public boolean canMobPickup = true; // Paper - Item#canEntityPickup
|
||||
@ -17,7 +17,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea
|
||||
|
||||
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -209,7 +210,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -215,7 +216,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea
|
||||
// CraftBukkit start - fire ItemDespawnEvent
|
||||
if (CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
||||
this.age = 0;
|
||||
@@ -233,7 +234,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -239,7 +240,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
this.lastTick = MinecraftServer.currentTick;
|
||||
// CraftBukkit end
|
||||
|
||||
@ -35,7 +35,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea
|
||||
// CraftBukkit start - fire ItemDespawnEvent
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
||||
this.age = 0;
|
||||
@@ -289,7 +290,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -295,7 +296,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
private boolean isMergable() {
|
||||
ItemStack itemstack = this.getItem();
|
||||
|
||||
@ -44,7 +44,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea
|
||||
}
|
||||
|
||||
private void tryToMerge(ItemEntity other) {
|
||||
@@ -532,6 +533,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -543,6 +544,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
|
||||
public void setItem(ItemStack stack) {
|
||||
this.getEntityData().set(ItemEntity.DATA_ITEM, stack);
|
||||
@ -52,7 +52,7 @@ index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -586,7 +588,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -597,7 +599,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
|
||||
public void makeFakeItem() {
|
||||
this.setNeverPickUp();
|
@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code
|
||||
Also ignores Enderdragon, defaulting it to Mojang's setting
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 8805fd57e7198aa9afaafe45fab13fd343e2a545..c69f1d970e1014f1be601e34bdd8b5fd749da339 100644
|
||||
index 6fa52a83d343ff151667cd9ade0ec60f026ce66d..f13f8119cf43711b96b4dc5834fceaa0282d632d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1761,6 +1761,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1774,6 +1774,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
int j = entity.getType().clientTrackingRange() * 16;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index 0f7b02d39b5dc781e65537c1b6d924e6c51e5dc7..06e990b6957a4ef48c8778bbd175d3afddf52ca3 100644
|
||||
index 5ecf8a87a31a0243c281e2a69823f5f79be69ca5..210e65919082205ea9227520e9cccc064cd94369 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -147,7 +147,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -143,7 +143,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
public Bee(EntityType<? extends Bee> type, Level world) {
|
||||
super(type, world);
|
||||
this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(this.random, 20, 60);
|
||||
@ -30,5 +30,5 @@ index 0f7b02d39b5dc781e65537c1b6d924e6c51e5dc7..06e990b6957a4ef48c8778bbd175d3af
|
||||
+ this.moveControl = new BeeFlyingMoveControl(this, 20, true);
|
||||
+ // Paper end - Fix MC-167279
|
||||
this.lookControl = new Bee.BeeLookControl(this);
|
||||
this.setPathfindingMalus(BlockPathTypes.DANGER_FIRE, -1.0F);
|
||||
this.setPathfindingMalus(BlockPathTypes.WATER, -1.0F);
|
||||
this.setPathfindingMalus(PathType.DANGER_FIRE, -1.0F);
|
||||
this.setPathfindingMalus(PathType.WATER, -1.0F);
|
@ -18,7 +18,7 @@ public net.minecraft.world.level.block.TurtleEggBlock decreaseEggs(Lnet/minecraf
|
||||
Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
index c919b5a382b1bfcafd938ff926d9146cc5cf0cdc..52c6c26a300cfd19c478afba411a17c8d5ea0c3c 100644
|
||||
index 46ee66d06c727a3ad6638f09ac97cd0f07676a7b..4bfe53e3a231a7bec461759e78c7a6cbcb8bb625 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
@@ -35,6 +35,11 @@ public class IceBlock extends HalfTransparentBlock {
|
@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either,
|
||||
then unwrap it...
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 369e4bf5ff52cb774f1acaf760b8bd276a0745f5..326b67c15ee3df162bf4468729c49dd98b582f02 100644
|
||||
index bc81649b09c39188697b8851abedafca0dde9d99..d41c0e4474d057c7b13427bfd896c50f24232615 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -254,6 +254,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -252,6 +252,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return this.getChunk(x, z, leastStatus, create);
|
||||
}, this.mainThreadProcessor).join();
|
||||
} else {
|
||||
@ -23,7 +23,7 @@ index 369e4bf5ff52cb774f1acaf760b8bd276a0745f5..326b67c15ee3df162bf4468729c49dd9
|
||||
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||
|
||||
gameprofilerfiller.incrementCounter("getChunk");
|
||||
@@ -300,39 +306,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -295,39 +301,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
if (Thread.currentThread() != this.mainThread) {
|
||||
return null;
|
||||
} else {
|
||||
@ -43,12 +43,12 @@ index 369e4bf5ff52cb774f1acaf760b8bd276a0745f5..326b67c15ee3df162bf4468729c49dd9
|
||||
- if (playerchunk == null) {
|
||||
- return null;
|
||||
- } else {
|
||||
- Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> either = (Either) playerchunk.getFutureIfPresent(ChunkStatus.FULL).getNow(null); // CraftBukkit - decompile error
|
||||
- ChunkResult<ChunkAccess> chunkresult = (ChunkResult) playerchunk.getFutureIfPresent(ChunkStatus.FULL).getNow(null); // CraftBukkit - decompile error
|
||||
-
|
||||
- if (either == null) {
|
||||
- if (chunkresult == null) {
|
||||
- return null;
|
||||
- } else {
|
||||
- ChunkAccess ichunkaccess1 = (ChunkAccess) either.left().orElse(null); // CraftBukkit - decompile error
|
||||
- ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
|
||||
-
|
||||
- if (ichunkaccess1 != null) {
|
||||
- this.storeInCache(k, ichunkaccess1, ChunkStatus.FULL);
|
@ -300,10 +300,10 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 326b67c15ee3df162bf4468729c49dd98b582f02..8a118a7b2878d3c99dadfa97e2ae58fda2b3f93b 100644
|
||||
index d41c0e4474d057c7b13427bfd896c50f24232615..2d9d4d06b75873f888ef4d8f5779a52706f821a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -282,6 +282,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -279,6 +279,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
Objects.requireNonNull(completablefuture);
|
||||
if (!completablefuture.isDone()) { // Paper
|
||||
@ -312,10 +312,10 @@ index 326b67c15ee3df162bf4468729c49dd98b582f02..8a118a7b2878d3c99dadfa97e2ae58fd
|
||||
chunkproviderserver_b.managedBlock(completablefuture::isDone);
|
||||
this.level.timings.syncChunkLoad.stopTiming(); // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 54c0aa440cd8e7e1cedc6ef9ae963c68558b6080..4d1d84383c11ef1e83edb50be62173533b7a641b 100644
|
||||
index 0abba132f2ce4cab0fd26e1ee17442b22471b6aa..6c09cc91bc0d229761a4af1f1a1ec46f56ce1d65 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -415,6 +415,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -421,6 +421,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Improve java version check
|
||||
Co-Authored-By: MiniDigger <admin@benndorf.dev>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index d8a7287849407c4756d4ebe4b55c358970320ce3..f21bff10aa56b418b1c3c3f1a40b88c4e992c26d 100644
|
||||
index caa7fefab037a24713e9f7f15a541d47bc7655ee..cc4f7f5bdb6b930af4130dc775e4ed754be87783 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -201,23 +201,27 @@ public class Main {
|
||||
@@ -202,23 +202,27 @@ public class Main {
|
||||
return;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Entity Jump API
|
||||
public net.minecraft.world.entity.LivingEntity jumping
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b4a817e047a78723d746740c88503441625ac8e7..2a417145d9fe4d029cf3738f3320c0bcd3e025a9 100644
|
||||
index ba18e2decde409b40ac73c66b015419e219c759a..67aa02a223345a91fe0b30b36966995e304c82bb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3304,8 +3304,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3395,8 +3395,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
} else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
|
||||
this.jumpInLiquid(FluidTags.LAVA);
|
||||
} else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {
|
||||
@ -22,10 +22,10 @@ index b4a817e047a78723d746740c88503441625ac8e7..2a417145d9fe4d029cf3738f3320c0bc
|
||||
} else {
|
||||
this.noJumpDelay = 0;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
index 9c70f3bf7cc37a7df9d1b8c5d5f0f6264680e421..4224e8e75613b6ec0228b2757cb98140d83bc2e2 100644
|
||||
index 4a1b25bb8a3d342400cb657781e9eab68decd479..fb4c7220c4edad54813036d62db7e3eefeda92a3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
@@ -528,7 +528,9 @@ public class Panda extends Animal {
|
||||
@@ -536,7 +536,9 @@ public class Panda extends Animal {
|
||||
Panda entitypanda = (Panda) iterator.next();
|
||||
|
||||
if (!entitypanda.isBaby() && entitypanda.onGround() && !entitypanda.isInWater() && entitypanda.canPerformAction()) {
|
||||
@ -36,10 +36,10 @@ index 9c70f3bf7cc37a7df9d1b8c5d5f0f6264680e421..4224e8e75613b6ec0228b2757cb98140
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
index aba20a4352d8983b01ab5d329187588f68d3e405..aac60e85cd6dba7d87f4a1663c2c62952521d112 100644
|
||||
index 1264fb03d2dcab088fc4a7c2788c9f9df53cba5d..cec801ba14bed8b043b2375f1bf9e7811a63e995 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
@@ -167,7 +167,9 @@ public class Ravager extends Raider {
|
||||
@@ -159,7 +159,9 @@ public class Ravager extends Raider {
|
||||
}
|
||||
|
||||
if (!flag && this.onGround()) {
|
||||
@ -50,10 +50,10 @@ index aba20a4352d8983b01ab5d329187588f68d3e405..aac60e85cd6dba7d87f4a1663c2c6295
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 5def5bccd8fce86ce015567e65fefae329819c18..29fa2231cc5d9c3ac36d508f14408d6077b6594c 100644
|
||||
index b2172a8c70ab77ba7c98b6b2b27595765d7eba11..539280a0265a4746ebc9ede6667df3699dfb8125 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -976,4 +976,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -961,4 +961,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(this.getHandle().getUsedItemHand());
|
||||
}
|
||||
// Paper end - active item API
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 98db75a013905ddd38ffd26d615ad8d02d8ddd22..537461e60366580bd18e3814113ef1f8b7009b39 100644
|
||||
index ce2594baa8eb5cfff75a2fb9f3277676a7b08e18..f1b8e3f06db9bef44319c6d53574b1e7188c5931 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -397,6 +397,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -399,6 +399,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
protected int numCollisions = 0; // Paper - Cap entity collisions
|
||||
@ -16,7 +16,7 @@ index 98db75a013905ddd38ffd26d615ad8d02d8ddd22..537461e60366580bd18e3814113ef1f8
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
// Paper start - Entity origin API
|
||||
@javax.annotation.Nullable
|
||||
@@ -2186,6 +2187,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2214,6 +2215,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
|
||||
}
|
||||
@ -26,7 +26,7 @@ index 98db75a013905ddd38ffd26d615ad8d02d8ddd22..537461e60366580bd18e3814113ef1f8
|
||||
// Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2328,6 +2332,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2356,6 +2360,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
@ -35,7 +35,7 @@ index 98db75a013905ddd38ffd26d615ad8d02d8ddd22..537461e60366580bd18e3814113ef1f8
|
||||
String spawnReasonName = nbt.getString("Paper.SpawnReason");
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
index c9ff8a3fd8d65033ce5a476e8ceaf9d1b8e2d887..2a8f97d97ae7f268da920b5e3b9719743fa9a8e0 100644
|
||||
index f0d4c16fffe7af7e913f4bb300c72f7bdf91e0e8..d3f2c0e3107a781b462a2b67c10cd1e5f05feefb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
@@ -71,6 +71,8 @@ public class NetherPortalBlock extends Block {
|
@ -385,7 +385,7 @@ index 0000000000000000000000000000000000000000..c3e54da4ab6440811aab2f9dd1e21880
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
index d292fdb165436f0b9b46b32110f5e09ad0e517a1..2bbc57b4869caf690f53618d60359c5133ec62a8 100644
|
||||
index 84a2c6c397604279ba821286f5c3c855e6041400..8b570b0c3967a22c085f390110cb29cbd9c8feff 100644
|
||||
--- a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
+++ b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
@@ -95,7 +95,7 @@ public class MinecraftServerGui extends JComponent {
|
@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 449dab3d6e16b2b0fcc78c9e1b7173c822be9c53..15c9150b7e48781268babe5915dc0e906645b341 100644
|
||||
index e2d74bf7e888b5161b210393e72c484058a3657b..fae07957147ee22a91d5da925e834a0495021958 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -402,13 +402,18 @@ public class CraftEventFactory {
|
||||
@@ -401,13 +401,18 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
org.bukkit.inventory.ItemStack item;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Validate tripwire hook placement before update
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
index eed36b6736a4f971022fdbce989da03f42794bb5..d9b3877257b31ca1b5acc4a47fbf5b993de69ae0 100644
|
||||
index bc4d324f086d815c139408629a561ea4d94c839b..8614fad5b3df7a6030384b108b1689bf6b9f1209 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
@@ -188,6 +188,7 @@ public class TripWireHookBlock extends Block {
|
||||
@@ -189,6 +189,7 @@ public class TripWireHookBlock extends Block {
|
||||
|
||||
TripWireHookBlock.emitState(world, pos, flag4, flag5, flag2, flag3);
|
||||
if (!flag) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
index ce83fe0b68fcb229dd37fe07e5f21b52a60c32de..6cfe0d6c46caa122db107c607d27a2bdcd82f7a8 100644
|
||||
index 3a51d3722ef8dba0e4b3ebcff0de8cede3bf3371..932fae98c551052cadba4c6fc6e575fc30a25d58 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
@@ -325,7 +325,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
@@ -317,7 +317,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
BlockPos blockposition1 = blockposition.below();
|
||||
BlockState iblockdata = world.getBlockState(blockposition1);
|
||||
|
@ -8,16 +8,14 @@ This allows you to solve an issue in vanilla behavior where:
|
||||
* On normal difficulty they will have a 50% of getting infected or dying.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index 2c8529540bf3644896f3c05d5f544bd848647807..408cbb80df72cf67e5228a76b7f267281e1752ab 100644
|
||||
index 7c206dc6f8db4b21d6d068eccc768203d041f51b..a2816b5334e962aee4beeac116e1c8543fa89808 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -452,12 +452,8 @@ public class Zombie extends Monster {
|
||||
@@ -443,10 +443,8 @@ public class Zombie extends Monster {
|
||||
public boolean killedEntity(ServerLevel world, LivingEntity other) {
|
||||
boolean flag = super.killedEntity(world, other);
|
||||
|
||||
- if ((world.getDifficulty() == Difficulty.NORMAL || world.getDifficulty() == Difficulty.HARD) && other instanceof Villager) {
|
||||
- Villager entityvillager = (Villager) other;
|
||||
-
|
||||
- if ((world.getDifficulty() == Difficulty.NORMAL || world.getDifficulty() == Difficulty.HARD) && other instanceof Villager entityvillager) {
|
||||
- if (world.getDifficulty() != Difficulty.HARD && this.random.nextBoolean()) {
|
||||
- return flag;
|
||||
- }
|
@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it
|
||||
easier to inline due to code size
|
||||
|
||||
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 82b59b7c791216aaaaaaf2972f47bd21dac7a202..5403fc4fa2ed2526d2e67c230a46dd2a75e017be 100644
|
||||
index 963d86e7505e4d9c3854d35d9b59aed3369e8a57..744db9eec4f7bdeb32f83300960a7fce63b393d8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -370,18 +370,20 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -47,7 +47,7 @@ index 82b59b7c791216aaaaaaf2972f47bd21dac7a202..5403fc4fa2ed2526d2e67c230a46dd2a
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
index 2d6daf76a56574c9727b404feb4f86347f04cbae..b606e33f8b64eaba28c008cc353d88aa45549e31 100644
|
||||
index 2c153af611399e884752f8256bee4fe32de5c572..90d1c3e23e753c29660f7d993b3c90ac022941c3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -43,7 +43,7 @@ public class LevelChunkSection {
|
@ -125,10 +125,10 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7
|
||||
|
||||
public static void registerCommands(final MinecraftServer server) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6342b7a3c4ccad528f026384da64e973e630f030..746eeb22127d8633f1eeef1bb9c20edb7fd23e5a 100644
|
||||
index fbe459664f93ec9d314cd305f1e3857710191cfd..a39753296a70a404b45dcb668ff42c1d88429e8e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -252,6 +252,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -255,6 +255,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private int playerIdleTimeout;
|
||||
private final long[] tickTimesNanos;
|
||||
private long aggregatedTickTimesNanos;
|
||||
@ -140,19 +140,19 @@ index 6342b7a3c4ccad528f026384da64e973e630f030..746eeb22127d8633f1eeef1bb9c20edb
|
||||
@Nullable
|
||||
private KeyPair keyPair;
|
||||
@Nullable
|
||||
@@ -1402,6 +1407,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1450,6 +1455,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.aggregatedTickTimesNanos += j;
|
||||
this.tickTimesNanos[k] = j;
|
||||
this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) j / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
|
||||
long l = Util.getNanos();
|
||||
|
||||
+ // Paper start - Add tick times API and /mspt command
|
||||
+ tickTimes5s.add(this.tickCount, j);
|
||||
+ tickTimes10s.add(this.tickCount, j);
|
||||
+ tickTimes60s.add(this.tickCount, j);
|
||||
+ this.tickTimes5s.add(this.tickCount, j);
|
||||
+ this.tickTimes10s.add(this.tickCount, j);
|
||||
+ this.tickTimes60s.add(this.tickCount, j);
|
||||
+ // Paper end - Add tick times API and /mspt command
|
||||
this.logTickTime(l - i);
|
||||
this.logTickMethodTime(i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -2669,4 +2679,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2790,4 +2800,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public static record ServerResourcePackInfo(UUID id, String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
||||
|
||||
}
|
||||
@ -184,10 +184,10 @@ index 6342b7a3c4ccad528f026384da64e973e630f030..746eeb22127d8633f1eeef1bb9c20edb
|
||||
+ // Paper end - Add tick times API and /mspt command
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fd038c105d12c76c9e2645ad146e77b4a9cc1079..58cf5568b97e907d840099198f3c62b9d780bd0c 100644
|
||||
index d61aa8acdcbc08d131ecf1d385084e6c82663feb..86e9a0955df9ffd5421df4c4d25393ac7cb13aac 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2629,6 +2629,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2648,6 +2648,16 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
|
||||
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 58cf5568b97e907d840099198f3c62b9d780bd0c..ae424a5cbf8868aea9e11ffd565665c50aeb780e 100644
|
||||
index 86e9a0955df9ffd5421df4c4d25393ac7cb13aac..e06b2821d29217aa6e043009cfc843da6e478a44 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2876,5 +2876,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2895,5 +2895,10 @@ public final class CraftServer implements Server {
|
||||
public int getCurrentTick() {
|
||||
return net.minecraft.server.MinecraftServer.currentTick;
|
||||
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
|
||||
Serializes using NBT which is safer for server data migrations than bukkits format.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 82d862432d061f8f1809647d9eecfff38a6311d4..7579e076793ba90e405b3ac0db600374ee8fdcb3 100644
|
||||
index 9e6e6ba95d5cd6cc5d4ada6ac5637b7b82e6fc97..291a9befb2abf95739fdc93faddb4864eb75853a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -478,6 +478,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -475,6 +475,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
return new com.destroystokyo.paper.PaperVersionFetcher();
|
||||
}
|
@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
|
||||
world and the world age for the start day.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 79a0accd8230c76d792ed3f7558e8b3ea6d2f6d1..9f0d42256d1b41242bd08939f88583e2d337ede3 100644
|
||||
index 9d08ff6024c6036dce57c833c1413033c8b2ef2c..9f88d1771cefc4700911f1cd9841eb80fc7278a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -249,6 +249,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -264,6 +264,7 @@ public class ServerPlayer extends Player {
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
||||
public long loginTime; // Paper - Replace OfflinePlayer#getLastPlayed
|
||||
@ -22,10 +22,10 @@ index 79a0accd8230c76d792ed3f7558e8b3ea6d2f6d1..9f0d42256d1b41242bd08939f88583e2
|
||||
public boolean queueHealthUpdatePacket;
|
||||
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||
index c7aea059de151cf8ae6e660785e176586bc23ff3..1c4dafdfb3898b5efe06d66792b1b0841ec5724d 100644
|
||||
index 7b5db53d4cf97e41175896de47303526198fb8f6..1741360aa3f2409b1a8ddf1d4602ffe57651a586 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||
@@ -25,7 +25,7 @@ public class PatrolSpawner implements CustomSpawner {
|
||||
@@ -24,7 +24,7 @@ public class PatrolSpawner implements CustomSpawner {
|
||||
|
||||
@Override
|
||||
public int tick(ServerLevel world, boolean spawnMonsters, boolean spawnAnimals) {
|
||||
@ -34,7 +34,7 @@ index c7aea059de151cf8ae6e660785e176586bc23ff3..1c4dafdfb3898b5efe06d66792b1b084
|
||||
if (!spawnMonsters) {
|
||||
return 0;
|
||||
} else if (!world.getGameRules().getBoolean(GameRules.RULE_DO_PATROL_SPAWNING)) {
|
||||
@@ -33,23 +33,51 @@ public class PatrolSpawner implements CustomSpawner {
|
||||
@@ -32,23 +32,51 @@ public class PatrolSpawner implements CustomSpawner {
|
||||
} else {
|
||||
RandomSource randomsource = world.random;
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown
|
||||
Bugs in the connection logic appears to leave stale connections even, preventing shutdown
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 78775feb965d6eb98a1ff655ae44b9f0399ef9aa..28fe088d97bd5fbfcc29dcc7d2a657d54578b2be 100644
|
||||
index bce5fc7337d4e29c3353600a35c999caaed1428e..3d33504eac6af17c8833de11226968d52f96232f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -390,11 +390,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -412,11 +412,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
if (this.rconThread != null) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Do not allow bees to load chunks for beehives
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index 06e990b6957a4ef48c8778bbd175d3afddf52ca3..07ecc038a1000581335b8d18c094298f2f3b100f 100644
|
||||
index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd499ab39b68 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -420,6 +420,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -410,6 +410,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
if (this.hivePos == null) {
|
||||
return false;
|
||||
} else {
|
||||
@ -16,7 +16,7 @@ index 06e990b6957a4ef48c8778bbd175d3afddf52ca3..07ecc038a1000581335b8d18c094298f
|
||||
BlockEntity tileentity = this.level().getBlockEntity(this.hivePos);
|
||||
|
||||
return tileentity instanceof BeehiveBlockEntity && ((BeehiveBlockEntity) tileentity).isFireNearby();
|
||||
@@ -453,6 +454,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -443,6 +444,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
}
|
||||
|
||||
private boolean doesHiveHaveSpace(BlockPos pos) {
|
||||
@ -24,7 +24,7 @@ index 06e990b6957a4ef48c8778bbd175d3afddf52ca3..07ecc038a1000581335b8d18c094298f
|
||||
BlockEntity tileentity = this.level().getBlockEntity(pos);
|
||||
|
||||
return tileentity instanceof BeehiveBlockEntity ? !((BeehiveBlockEntity) tileentity).isFull() : false;
|
||||
@@ -929,6 +931,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -913,6 +915,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@Override
|
||||
public boolean canBeeUse() {
|
||||
if (Bee.this.hasHive() && Bee.this.wantsToEnterHive() && Bee.this.hivePos.closerToCenterThan(Bee.this.position(), 2.0D)) {
|
||||
@ -32,19 +32,19 @@ index 06e990b6957a4ef48c8778bbd175d3afddf52ca3..07ecc038a1000581335b8d18c094298f
|
||||
BlockEntity tileentity = Bee.this.level().getBlockEntity(Bee.this.hivePos);
|
||||
|
||||
if (tileentity instanceof BeehiveBlockEntity) {
|
||||
@@ -952,6 +955,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -936,6 +939,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
+ if (!Bee.this.level().isLoadedAndInBounds(Bee.this.hivePos)) return; // Paper - Do not allow bees to load chunks for beehives
|
||||
BlockEntity tileentity = Bee.this.level().getBlockEntity(Bee.this.hivePos);
|
||||
|
||||
if (tileentity instanceof BeehiveBlockEntity) {
|
||||
if (tileentity instanceof BeehiveBlockEntity tileentitybeehive) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Vex.java b/src/main/java/net/minecraft/world/entity/monster/Vex.java
|
||||
index 30ea3f64234fd1fda8dada3c7fb12be0730322a8..f443006c1e32feee97b32312814e2447a50c45e2 100644
|
||||
index 970cd8e02464c69087756f9d1deee197c9c092af..fd3b37dde54623ba38186efb2a64d364c86b81d2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Vex.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Vex.java
|
||||
@@ -377,7 +377,10 @@ public class Vex extends Monster implements TraceableEntity {
|
||||
@@ -356,7 +356,10 @@ public class Vex extends Monster implements TraceableEntity {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
BlockPos blockposition1 = blockposition.offset(Vex.this.random.nextInt(15) - 7, Vex.this.random.nextInt(11) - 5, Vex.this.random.nextInt(15) - 7);
|
||||
|
@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding
|
||||
Stack will identify any causer of this and warn instead of crashing.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index c69f1d970e1014f1be601e34bdd8b5fd749da339..2fba58fd5c9b17512eadacb899c59a04df5d415f 100644
|
||||
index f13f8119cf43711b96b4dc5834fceaa0282d632d..66936834a80ef6b645ab44f3439defcb90237bfa 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1452,6 +1452,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1469,6 +1469,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
public void addEntity(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
|
||||
@ -25,19 +25,19 @@ index c69f1d970e1014f1be601e34bdd8b5fd749da339..2fba58fd5c9b17512eadacb899c59a04
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
int i = entitytypes.clientTrackingRange() * 16;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 4d1d84383c11ef1e83edb50be62173533b7a641b..9af1877321356348ad96b92ae8c5f4811bef50ac 100644
|
||||
index 6c09cc91bc0d229761a4af1f1a1ec46f56ce1d65..6a30ae257158267918c7114494005be528ac05dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2224,7 +2224,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2181,7 +2181,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTrackingStart(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
|
||||
- ServerLevel.this.getChunkSource().addEntity(entity);
|
||||
+ // ServerLevel.this.getChunkSource().addEntity(entity); // Paper - ignore and warn about illegal addEntity calls instead of crashing server; moved down below valid=true
|
||||
if (entity instanceof ServerPlayer) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||
|
||||
@@ -2259,6 +2259,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity instanceof ServerPlayer entityplayer) {
|
||||
ServerLevel.this.players.add(entityplayer);
|
||||
ServerLevel.this.updateSleepingPlayerList();
|
||||
@@ -2211,6 +2211,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
entity.valid = true; // CraftBukkit
|
@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
|
||||
This is safe because Spectators are skipped in unloaded chunks too in vanilla.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 9f0d42256d1b41242bd08939f88583e2d337ede3..ca75d22e90fd879d464733813939f877ec875905 100644
|
||||
index 9f88d1771cefc4700911f1cd9841eb80fc7278a4..74e8aef45702eef0dcabc7841a7c7125cc066cbe 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -684,7 +684,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -748,7 +748,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
public void doTick() {
|
||||
try {
|
@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
|
||||
due to 1.15's new queue but processed while dead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 3c3c953f05c18279d3245fe6bc8afef83cd62cd1..603e003fbd39870a0e249151885b3b8f3e120afe 100644
|
||||
index 42911a87a9028a7ba8c3f63f498e4f15bcd07f24..8fe41d4291736fd8c45d73429062a597d54ac30b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1153,7 +1153,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1162,7 +1162,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
protected boolean isImmobile() {
|
@ -13,19 +13,19 @@ By skipping this, we avoid potential for a large spike on server start.
|
||||
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index ca75d22e90fd879d464733813939f877ec875905..04e54d2214d0ae0202490aceab54b8b10ef38229 100644
|
||||
index 74e8aef45702eef0dcabc7841a7c7125cc066cbe..618efe10752c968142fcc0f28a533d3515ef3367 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -337,7 +337,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -352,7 +352,7 @@ public class ServerPlayer extends Player {
|
||||
this.server = server;
|
||||
this.stats = server.getPlayerList().getPlayerStats(this);
|
||||
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
|
||||
this.setMaxUpStep(1.0F);
|
||||
- this.fudgeSpawnLocation(world);
|
||||
+ // this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn
|
||||
this.updateOptions(clientOptions);
|
||||
this.object = null;
|
||||
|
||||
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
||||
@@ -571,7 +571,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -611,7 +611,7 @@ public class ServerPlayer extends Player {
|
||||
position = Vec3.atCenterOf(world.getSharedSpawnPos());
|
||||
}
|
||||
this.setLevel(world);
|
||||
@ -35,10 +35,10 @@ index ca75d22e90fd879d464733813939f877ec875905..04e54d2214d0ae0202490aceab54b8b1
|
||||
this.gameMode.setLevel((ServerLevel) world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 6bd83549e2ff84b1bc993ef2be79a336ced28f67..8f23597eee06e721a25f7be3a5a65dff6a59ee55 100644
|
||||
index 03051e2252d7b871adc06dbbe48d2a90854c7adf..86d518f7c7b638802c08c896d758541ac6ab6176 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -227,6 +227,7 @@ public abstract class PlayerList {
|
||||
@@ -226,6 +226,7 @@ public abstract class PlayerList {
|
||||
// Paper start - Entity#getEntitySpawnReason
|
||||
if (nbttagcompound == null) {
|
||||
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
|
@ -7,10 +7,10 @@ Prevents pathfinding from spamming failures for things such as
|
||||
arrow attacks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
index 25a9f1fd69fbafab5129740e26e9741e35885ce0..e3a7eaf31ab19cc9f23a0c87649b74bb42976cb4 100644
|
||||
index 188904c9f0f81db1d63eec953d6746f2dc23dc81..2e9991e6b3c05584002744a2ee2579b1dba218b2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
@@ -192,9 +192,29 @@ public abstract class PathNavigation {
|
||||
@@ -192,13 +192,33 @@ public abstract class PathNavigation {
|
||||
return this.moveTo(this.createPath(x, y, z, 1), speed);
|
||||
}
|
||||
|
||||
@ -19,6 +19,10 @@ index 25a9f1fd69fbafab5129740e26e9741e35885ce0..e3a7eaf31ab19cc9f23a0c87649b74bb
|
||||
+ private int pathfindFailures = 0;
|
||||
+ // Paper end - Perf: Optimise pathfinding
|
||||
+
|
||||
public boolean moveTo(double x, double y, double z, int distance, double speed) {
|
||||
return this.moveTo(this.createPath(x, y, z, distance), speed);
|
||||
}
|
||||
|
||||
public boolean moveTo(Entity entity, double speed) {
|
||||
+ // Paper start - Perf: Optimise pathfinding
|
||||
+ if (this.pathfindFailures > 10 && this.path == null && net.minecraft.server.MinecraftServer.currentTick < this.lastFailure + 40) {
|
@ -7,7 +7,7 @@ In order to get chunk values, we shouldn't need to create
|
||||
an optional each time.
|
||||
|
||||
diff --git a/src/main/java/com/mojang/datafixers/util/Either.java b/src/main/java/com/mojang/datafixers/util/Either.java
|
||||
index de524d485fada3c3cca8c2fe6c63db0e0b33dad8..a51e8e3eafff17f4f2ff790bf96a2f0e89abca2a 100644
|
||||
index 698ff6caf5924ce5c731254acd466c381c55c9b3..d54e617fc583ae7a045ebba8fde6bc5a486d73d5 100644
|
||||
--- a/src/main/java/com/mojang/datafixers/util/Either.java
|
||||
+++ b/src/main/java/com/mojang/datafixers/util/Either.java
|
||||
@@ -22,7 +22,7 @@ public abstract class Either<L, R> implements App<Either.Mu<R>, L> {
|
@ -8,7 +8,7 @@ is important because we clone chunk data after reading it for safety.
|
||||
So, reduce the impact of the clone on GC.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
index 1e2f58f2f95c558ce28706c405050c4c5701dd40..c7945686a4ee50d7a9d5f1173aa90e456f68b410 100644
|
||||
index 1cbc42c44911b71dfadebc2d60e0e5cb9b6cafe6..df246d69591e1a5822a0109c99b0f67996da71fa 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
@@ -49,7 +49,7 @@ public class CompoundTag implements Tag {
|
||||
@ -29,7 +29,7 @@ index 1e2f58f2f95c558ce28706c405050c4c5701dd40..c7945686a4ee50d7a9d5f1173aa90e45
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -477,8 +477,16 @@ public class CompoundTag implements Tag {
|
||||
@@ -481,8 +481,16 @@ public class CompoundTag implements Tag {
|
||||
|
||||
@Override
|
||||
public CompoundTag copy() {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 04e54d2214d0ae0202490aceab54b8b10ef38229..3a856f28237246660665aef983e5e9fe2bac8c37 100644
|
||||
index 618efe10752c968142fcc0f28a533d3515ef3367..f6e4172f1c7ad38128e77e53f099e67a4c4be620 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -653,7 +653,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -693,7 +693,7 @@ public class ServerPlayer extends Player {
|
||||
containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
|
||||
}
|
||||
// Paper end - Configurable container update tick rate
|
||||
@ -17,7 +17,7 @@ index 04e54d2214d0ae0202490aceab54b8b10ef38229..3a856f28237246660665aef983e5e9fe
|
||||
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
@@ -1508,7 +1508,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1592,7 +1592,7 @@ public class ServerPlayer extends Player {
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
this.containerMenu = container;
|
||||
@ -27,10 +27,10 @@ index 04e54d2214d0ae0202490aceab54b8b10ef38229..3a856f28237246660665aef983e5e9fe
|
||||
this.initMenu(container);
|
||||
return OptionalInt.of(this.containerCounter);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 0886cb3367022c4ab7e4dbebafb70fc651bcb9aa..35f03bea2b1206b420ac46dfd77811fb485c5319 100644
|
||||
index c79607a2f45b7a487a95cf98b9b0eb6b36501410..eb2d39d408e7f46a8f047a2b0d76981f24e1320a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -328,7 +328,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -326,7 +326,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(container.getBukkitView().getTitle()); // Paper
|
||||
|
||||
//player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment
|
||||
@ -39,7 +39,7 @@ index 0886cb3367022c4ab7e4dbebafb70fc651bcb9aa..35f03bea2b1206b420ac46dfd77811fb
|
||||
player.containerMenu = container;
|
||||
player.initMenu(container);
|
||||
}
|
||||
@@ -402,7 +402,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -400,7 +400,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper
|
||||
if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(inventory.getTitle()); // Paper
|
||||
//player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment
|
@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
|
||||
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 2a417145d9fe4d029cf3738f3320c0bcd3e025a9..e8410acb2f4be966177a0ec62fc93b8fe2cc0af3 100644
|
||||
index 67aa02a223345a91fe0b30b36966995e304c82bb..bca65fe3b38da83ce5f8fe67867b7cf19d02adbb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3419,10 +3419,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3506,10 +3506,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (this.level().isClientSide()) {
|
||||
this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
|
||||
} else {
|
@ -87,19 +87,19 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 3a856f28237246660665aef983e5e9fe2bac8c37..3d7a938f72424a4f30f75563393a953cf9f11933 100644
|
||||
index f6e4172f1c7ad38128e77e53f099e67a4c4be620..62bdc3016120271da2ca3a1f6ac46757e2e1dab4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -338,7 +338,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -353,7 +353,7 @@ public class ServerPlayer extends Player {
|
||||
this.stats = server.getPlayerList().getPlayerStats(this);
|
||||
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
|
||||
this.setMaxUpStep(1.0F);
|
||||
// this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn
|
||||
- this.updateOptions(clientOptions);
|
||||
+ this.updateOptionsNoEvents(clientOptions); // Paper - don't call options events on login
|
||||
this.object = null;
|
||||
|
||||
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
||||
|
||||
@@ -2004,7 +2004,23 @@ public class ServerPlayer extends Player {
|
||||
@@ -2086,7 +2086,23 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ index 3a856f28237246660665aef983e5e9fe2bac8c37..3d7a938f72424a4f30f75563393a953c
|
||||
// CraftBukkit start
|
||||
if (this.getMainArm() != clientOptions.mainHand()) {
|
||||
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
|
||||
@@ -2016,6 +2032,11 @@ public class ServerPlayer extends Player {
|
||||
@@ -2098,6 +2114,11 @@ public class ServerPlayer extends Player {
|
||||
this.server.server.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.language, clientOptions.language())); // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -136,10 +136,10 @@ index 3a856f28237246660665aef983e5e9fe2bac8c37..3d7a938f72424a4f30f75563393a953c
|
||||
this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(this.language), java.util.Locale.US); // Paper
|
||||
this.requestedViewDistance = clientOptions.viewDistance();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 314e01920fe0302441d2cc08a0098ff8fee263e5..587689c5d4f24c3cb40218b0a1e62e7d10a94a7a 100644
|
||||
index 356d814e09c4804dc32e320c01c26f4a059693da..665ba6c4b2f6968b1311217dad9c3306c0895c07 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -575,6 +575,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -650,6 +650,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
|
||||
}
|
||||
}
|
@ -7,10 +7,10 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from
|
||||
I suspect it deals with teleporting as it uses players current x/y/z
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
index 76005b3c48bfa323a77781c20c63708eeaa66b2b..4e1618462840a1378dbe6492696c97544815edf2 100644
|
||||
index e8640bcbc1d4e2965049974385585f5060cb6a44..c473cb1888e9ab0e91ba44f1439b81742758304e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
@@ -285,8 +285,8 @@ public abstract class DistanceManager {
|
||||
@@ -284,8 +284,8 @@ public abstract class DistanceManager {
|
||||
ObjectSet<ServerPlayer> objectset = (ObjectSet) this.playersPerChunk.get(i);
|
||||
if (objectset == null) return; // CraftBukkit - SPIGOT-6208
|
||||
|
@ -31,10 +31,10 @@ delays anymore.
|
||||
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 2fba58fd5c9b17512eadacb899c59a04df5d415f..4c1dd470ac561f61d7f49adf90d273b1f293d296 100644
|
||||
index 66936834a80ef6b645ab44f3439defcb90237bfa..406c78dcb97d954f16f05d379d4dbf74c61c8fd1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1459,6 +1459,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1476,6 +1476,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return;
|
||||
}
|
||||
// Paper end - ignore and warn about illegal addEntity calls instead of crashing server
|
||||
@ -43,10 +43,10 @@ index 2fba58fd5c9b17512eadacb899c59a04df5d415f..4c1dd470ac561f61d7f49adf90d273b1
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
int i = entitytypes.clientTrackingRange() * 16;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 3d7a938f72424a4f30f75563393a953cf9f11933..b64b20312396638b8fd596bca3794863601d2bb4 100644
|
||||
index 62bdc3016120271da2ca3a1f6ac46757e2e1dab4..e3f73ccbc2d62eef386adc6c66428c6081a68b8b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -267,6 +267,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -283,6 +283,7 @@ public class ServerPlayer extends Player {
|
||||
public double maxHealthCache;
|
||||
public boolean joining = true;
|
||||
public boolean sentListPacket = false;
|
||||
@ -55,10 +55,10 @@ index 3d7a938f72424a4f30f75563393a953cf9f11933..b64b20312396638b8fd596bca3794863
|
||||
// CraftBukkit end
|
||||
public boolean isRealPlayer; // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 8f23597eee06e721a25f7be3a5a65dff6a59ee55..c5614cc12789fdfad3519434e115a50c12844b3b 100644
|
||||
index 86d518f7c7b638802c08c896d758541ac6ab6176..e2e1ed794e4601b93cffb4ff7cc7a538f2d56cc9 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -296,6 +296,12 @@ public abstract class PlayerList {
|
||||
@@ -297,6 +297,12 @@ public abstract class PlayerList {
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
|
||||
|
||||
@ -66,12 +66,12 @@ index 8f23597eee06e721a25f7be3a5a65dff6a59ee55..c5614cc12789fdfad3519434e115a50c
|
||||
+ player.supressTrackerForLogin = true;
|
||||
+ worldserver1.addNewPlayer(player);
|
||||
+ this.server.getCustomBossEvents().onPlayerConnect(player); // see commented out section below worldserver.addPlayerJoin(entityplayer);
|
||||
+ mountSavedVehicle(player, worldserver1, nbttagcompound);
|
||||
+ this.mountSavedVehicle(player, worldserver1, optional);
|
||||
+ // Paper end - Fire PlayerJoinEvent when Player is actually ready
|
||||
// CraftBukkit start
|
||||
CraftPlayer bukkitPlayer = player.getBukkitEntity();
|
||||
|
||||
@@ -334,6 +340,8 @@ public abstract class PlayerList {
|
||||
@@ -335,6 +341,8 @@ public abstract class PlayerList {
|
||||
player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
|
||||
}
|
||||
player.sentListPacket = true;
|
||||
@ -79,20 +79,21 @@ index 8f23597eee06e721a25f7be3a5a65dff6a59ee55..c5614cc12789fdfad3519434e115a50c
|
||||
+ ((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - Fire PlayerJoinEvent when Player is actually ready; track entity now
|
||||
// CraftBukkit end
|
||||
|
||||
player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
|
||||
@@ -356,6 +364,11 @@ public abstract class PlayerList {
|
||||
playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect));
|
||||
}
|
||||
player.refreshEntityData(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
|
||||
@@ -356,7 +364,11 @@ public abstract class PlayerList {
|
||||
|
||||
playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect, false));
|
||||
}
|
||||
-
|
||||
+ // Paper start - Fire PlayerJoinEvent when Player is actually ready; move vehicle into method so it can be called above - short circuit around that code
|
||||
+ onPlayerJoinFinish(player, worldserver1, s1);
|
||||
+ this.onPlayerJoinFinish(player, worldserver1, s1);
|
||||
+ }
|
||||
+ private void mountSavedVehicle(ServerPlayer player, ServerLevel worldserver1, CompoundTag nbttagcompound) {
|
||||
+ private void mountSavedVehicle(ServerPlayer player, ServerLevel worldserver1, Optional<CompoundTag> optional) {
|
||||
+ // Paper end - Fire PlayerJoinEvent when Player is actually ready
|
||||
if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) {
|
||||
CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle");
|
||||
// CraftBukkit start
|
||||
@@ -404,6 +417,10 @@ public abstract class PlayerList {
|
||||
if (optional.isPresent() && ((CompoundTag) optional.get()).contains("RootVehicle", 10)) {
|
||||
CompoundTag nbttagcompound = ((CompoundTag) optional.get()).getCompound("RootVehicle");
|
||||
ServerLevel finalWorldServer = worldserver1; // CraftBukkit - decompile error
|
||||
@@ -403,6 +415,10 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Fri, 17 Jan 2020 18:44:55 -0800
|
||||
Subject: [PATCH] Fix last firework in stack not having effects when dispensed
|
||||
|
||||
CB used the resulting item in the dispenser rather than the item
|
||||
dispensed. The resulting item would have size == 0 and therefore
|
||||
be convertered to air, hence why the effects disappeared.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
index 42f541c609c3d94bee9b40b8e5307ad41a39c619..8c8d2e81f0866dc1441e181f2580852d87263bcc 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -516,7 +516,7 @@ public interface DispenseItemBehavior {
|
||||
|
||||
itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
|
||||
Vec3 vec3d = DispenseItemBehavior.getEntityPokingOutOfBlockPos(pointer, EntityType.FIREWORK_ROCKET, enumdirection);
|
||||
- FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.level(), stack, vec3d.x(), vec3d.y(), vec3d.z(), true);
|
||||
+ FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.level(), itemstack1, vec3d.x(), vec3d.y(), vec3d.z(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed
|
||||
|
||||
entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F);
|
||||
pointer.level().addFreshEntity(entityfireworks);
|
@ -1,26 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AJMFactsheets <AJMFactsheets@gmail.com>
|
||||
Date: Wed, 22 Jan 2020 19:52:28 -0600
|
||||
Subject: [PATCH] Fix items vanishing through end portal
|
||||
|
||||
If the Paper configuration option "keep-spawn-loaded" is set to false,
|
||||
items entering the overworld from the end will spawn at Y = 0.
|
||||
|
||||
This is due to logic in the getHighestBlockYAt method in World.java
|
||||
only searching the heightmap if the chunk is loaded.
|
||||
|
||||
Quickly loading the exact world spawn chunk before searching the
|
||||
heightmap resolves the issue without having to load all spawn chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 257be4dd3f38c089dd970b9ac6f292b4f010a01c..98db75a013905ddd38ffd26d615ad8d02d8ddd22 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3363,6 +3363,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (flag1) {
|
||||
blockposition1 = ServerLevel.END_SPAWN_POINT;
|
||||
} else {
|
||||
+ destination.getChunkAt(destination.getSharedSpawnPos()); // Paper - Ensure spawn chunk is always loaded before calculating Y coordinate
|
||||
blockposition1 = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, destination.getSharedSpawnPos());
|
||||
}
|
||||
// CraftBukkit start
|
Loading…
Reference in New Issue
Block a user