Archiviert
13
0
Dieser Commit ist enthalten in:
Nassim Jahnke 2023-06-07 20:31:32 +02:00
Ursprung c1bbde4bc6
Commit 197786ead0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
45 geänderte Dateien mit 170 neuen und 187 gelöschten Zeilen

Datei anzeigen

@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 3a7d50651ab149665ac655b4f264278608335486..0a7979357a8c1e815d9527c341381b231d9e7bbd 100644 index 1b6ca18237de5f154a1b0ddaea34347869fa637e..1aeff8d9ff446369dbcae30bcff26f94f7af0a25 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -423,6 +423,35 @@ public final class CraftServer implements Server { @@ -423,6 +423,35 @@ public final class CraftServer implements Server {
@ -47,7 +47,7 @@ index 3a7d50651ab149665ac655b4f264278608335486..0a7979357a8c1e815d9527c341381b23
if (type == PluginLoadOrder.STARTUP) { if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear(); this.helpMap.clear();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index ab22205c758768cd0c8a4fc6bca3d7de2e823078..ff955d3a20bf953770cc81f8b89a6d4425a5f813 100644 index 15b886634112b2a18b7952107b49ae1430376a3d..47c3c7484687b808341937f7e4ef1c0c410fa59f 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -159,6 +159,12 @@ public class Main { @@ -159,6 +159,12 @@ public class Main {

Datei anzeigen

@ -65,7 +65,7 @@ index 0d05ad9c0b5043e58d639041cfe3fb7a27f373a3..a5d391af2c6b733d653188f4aeeec2af
} }
diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
index 812813180b7022107ebb09d51ebfd1315d6f8085..f5c21d510351ea8ff76d89fe859f187a3106cc30 100644 index a7e8be5545ef6c2ff9a056d297d11850d07bdd1c..2c3bbe4f295be9782c11af13c2cf9c05f27313d9 100644
--- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java --- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
@@ -54,7 +54,7 @@ public class CactusBlock extends Block { @@ -54,7 +54,7 @@ public class CactusBlock extends Block {
@ -78,7 +78,7 @@ index 812813180b7022107ebb09d51ebfd1315d6f8085..f5c21d510351ea8ff76d89fe859f187a
int modifier = world.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution int modifier = world.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution
diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
index 2aa81f93a2e1e94d0788b4d7b67f94494101c397..6b400a4759c8c8612a3b5c96ca0d87ef9dc71435 100644 index 7fbc511eb1cbfedc3bbf5bff7a61e8f74c294140..c3f500580d257e1397f2eb7c47b063a6fe6bb405 100644
--- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java --- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
@@ -52,7 +52,7 @@ public class SugarCaneBlock extends Block { @@ -52,7 +52,7 @@ public class SugarCaneBlock extends Block {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable baby zombie movement speed
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java 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 251487682550af7492068bd461bf0c61760de0fa..8ea60d388fff4a6368652ff96f648e5880053a2b 100644 index 5508dd33111a8206cbda4caf9d5003574d91d371..41e4903b4feb860309510f8f4ff89a4e3710b395 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -77,6 +77,7 @@ public class Zombie extends Monster { @@ -77,6 +77,7 @@ public class Zombie extends Monster {
@ -17,7 +17,7 @@ index 251487682550af7492068bd461bf0c61760de0fa..8ea60d388fff4a6368652ff96f648e58
private static final EntityDataAccessor<Integer> DATA_SPECIAL_TYPE_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.INT); private static final EntityDataAccessor<Integer> DATA_SPECIAL_TYPE_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.INT);
public static final EntityDataAccessor<Boolean> DATA_DROWNED_CONVERSION_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN); public static final EntityDataAccessor<Boolean> DATA_DROWNED_CONVERSION_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN);
@@ -185,9 +186,9 @@ public class Zombie extends Monster { @@ -185,9 +186,9 @@ public class Zombie extends Monster {
if (this.level != null && !this.level.isClientSide) { if (this.level() != null && !this.level().isClientSide) {
AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED); AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
- attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY); - attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable fishing time ranges
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index b202a522606b9335ebab1c21a2c50fb5f7e9791b..9a753ffd35403358df07408ffe85197ee3318f39 100644 index 94ca8ae42ef02cea92c4029d219edfe69abb4ce3..4377a0f7387a09983a5580d408775f386ea5f487 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -92,6 +92,10 @@ public class FishingHook extends Projectile { @@ -92,6 +92,10 @@ public class FishingHook extends Projectile {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Allow nerfed mobs to jump and take water damage
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index a290487b153a66a3e936ed1183f3c2ce343e59b1..ce1b3b607c21307fe3ea65590fa63265a6f67ac8 100644 index c2c2c24a593f67abc1eec4a20ced1ec0b5fa8cad..b3de20af553414369784b17139dd9185cc715db2 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -110,6 +110,7 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -109,6 +109,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
private final BodyRotationControl bodyRotationControl; private final BodyRotationControl bodyRotationControl;
protected PathNavigation navigation; protected PathNavigation navigation;
public GoalSelector goalSelector; public GoalSelector goalSelector;
@ -16,7 +16,7 @@ index a290487b153a66a3e936ed1183f3c2ce343e59b1..ce1b3b607c21307fe3ea65590fa63265
public GoalSelector targetSelector; public GoalSelector targetSelector;
@Nullable @Nullable
private LivingEntity target; private LivingEntity target;
@@ -865,7 +866,17 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -868,7 +869,17 @@ public abstract class Mob extends LivingEntity implements Targeting {
@Override @Override
protected final void serverAiStep() { protected final void serverAiStep() {
++this.noActionTime; ++this.noActionTime;
@ -32,9 +32,9 @@ index a290487b153a66a3e936ed1183f3c2ce343e59b1..ce1b3b607c21307fe3ea65590fa63265
+ return; + return;
+ } + }
+ // Paper end + // Paper end
this.level.getProfiler().push("sensing"); this.level().getProfiler().push("sensing");
this.sensing.tick(); this.sensing.tick();
this.level.getProfiler().pop(); this.level().getProfiler().pop();
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java
index 01950951ea06e43bedeeede489a112e577617829..7093c62be53fe99ed9880fc8ddaa07440fe4f715 100644 index 01950951ea06e43bedeeede489a112e577617829..7093c62be53fe99ed9880fc8ddaa07440fe4f715 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java --- a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable despawn distances for living entities
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 8dea6df3456fd37095400711c94b0d0866988745..f74e1788692c3f9b291e6ba5043944a3179b97e1 100644 index b3de20af553414369784b17139dd9185cc715db2..cb58d527b72f047299ae5ed71a29ce0178de6e6a 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -841,14 +841,14 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -844,14 +844,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
if (entityhuman != null) { if (entityhuman != null) {
double d0 = entityhuman.distanceToSqr((Entity) this); double d0 = entityhuman.distanceToSqr((Entity) this);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 0517c0932b79db1a0e27673654ae8bb5fd740425..0ce746ac2f448191854f6faa4e1876d869d8d38d 100644 index d87f02c748fe2e5b4ea251f6691e8907a152cb6d..f21ba175538436e59c45d5350ef7b2605ed96775 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -262,6 +262,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -261,6 +261,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}); });
// CraftBukkit end // CraftBukkit end
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings

Datei anzeigen

@ -6,14 +6,13 @@ Subject: [PATCH] Drop falling block and tnt entities at the specified height
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index 7726bef38c7b9a81fd82960143fd07db18960087..88ea09b2f1c33e9fb528aad1564ae858c3c8b064 100644 index da6e806288cf3afc2c72228844d1d05eee8324a5..2905556cbb4715b0dcbaab54222e76669ce0e81d 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -140,6 +140,17 @@ public class FallingBlockEntity extends Entity { @@ -140,6 +140,16 @@ public class FallingBlockEntity extends Entity {
} }
this.move(MoverType.SELF, this.getDeltaMovement()); this.move(MoverType.SELF, this.getDeltaMovement());
+
+ // Paper start - Configurable EntityFallingBlock height nerf + // Paper start - Configurable EntityFallingBlock height nerf
+ if (this.level.paperConfig().fixes.fallingBlockHeightNerf.test(v -> this.getY() > v)) { + if (this.level.paperConfig().fixes.fallingBlockHeightNerf.test(v -> this.getY() > v)) {
+ if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { + if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
@ -24,11 +23,11 @@ index 7726bef38c7b9a81fd82960143fd07db18960087..88ea09b2f1c33e9fb528aad1564ae858
+ return; + return;
+ } + }
+ // Paper end + // Paper end
if (!this.level.isClientSide) { if (!this.level().isClientSide) {
BlockPos blockposition = this.blockPosition(); BlockPos blockposition = this.blockPosition();
boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock; boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock;
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
index 6999fa7217a76e1e41c96b8522a2e210a7e6e4cf..c133d51a363900164c1492359be5b1579806d5cb 100644 index 320966e6e55dad3a96fee25fe0f69135d86ee8bc..c1a1b320a6f2a97e8d51a3e8fac624243603e368 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -66,6 +66,12 @@ public class PrimedTnt extends Entity implements TraceableEntity { @@ -66,6 +66,12 @@ public class PrimedTnt extends Entity implements TraceableEntity {
@ -42,10 +41,10 @@ index 6999fa7217a76e1e41c96b8522a2e210a7e6e4cf..c133d51a363900164c1492359be5b157
+ } + }
+ // Paper end + // Paper end
this.setDeltaMovement(this.getDeltaMovement().scale(0.98D)); this.setDeltaMovement(this.getDeltaMovement().scale(0.98D));
if (this.onGround) { if (this.onGround()) {
this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D)); this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D));
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
index 5b8574af6eae84a5957e4ce6acd4e9722835a320..accfb39539aea045e0c741a74b8bd50c752d326c 100644 index 137f9052701c5b10ff03b01316ced37220dbf280..ca61c84cffb4ed80281bbc587f882840964ac92d 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java --- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
@@ -53,6 +53,12 @@ public class MinecartTNT extends AbstractMinecart { @@ -53,6 +53,12 @@ public class MinecartTNT extends AbstractMinecart {
@ -59,5 +58,5 @@ index 5b8574af6eae84a5957e4ce6acd4e9722835a320..accfb39539aea045e0c741a74b8bd50c
+ } + }
+ // Paper end + // Paper end
--this.fuse; --this.fuse;
this.level.addParticle(ParticleTypes.SMOKE, this.getX(), this.getY() + 0.5D, this.getZ(), 0.0D, 0.0D, 0.0D); this.level().addParticle(ParticleTypes.SMOKE, this.getX(), this.getY() + 0.5D, this.getZ(), 0.0D, 0.0D, 0.0D);
} else if (this.fuse == 0) { } else if (this.fuse == 0) {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6251d93c2ea61c471b4e1069048327782acc78e7..d3cd196e1a6f707ed5e0008123cc65df80422859 100644 index 96897d883671e018bae5f71545c5f7af205e309c..ff3073b6780c04f5f11b5384bb6b6289eafd0c4f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1462,7 +1462,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1466,7 +1466,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate @DontObfuscate
public String getServerModName() { public String getServerModName() {
@ -19,7 +19,7 @@ index 6251d93c2ea61c471b4e1069048327782acc78e7..d3cd196e1a6f707ed5e0008123cc65df
public SystemReport fillSystemReport(SystemReport details) { public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0a7979357a8c1e815d9527c341381b231d9e7bbd..de60f523f589bcaadb037d660953f2ddd06d69a5 100644 index 1aeff8d9ff446369dbcae30bcff26f94f7af0a25..57685febc623e99c752cd7536f666fedd3e13df8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -260,7 +260,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -260,7 +260,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@ -32,11 +32,11 @@ index 0a7979357a8c1e815d9527c341381b231d9e7bbd..de60f523f589bcaadb037d660953f2dd
private final String bukkitVersion = Versioning.getBukkitVersion(); private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft"); private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index ff955d3a20bf953770cc81f8b89a6d4425a5f813..268192b06592eaa56a454e0f02b2d848f766d9ac 100644 index 47c3c7484687b808341937f7e4ef1c0c410fa59f..a20eaa9b1d030ccd7e1fc49df47acee46f4e7e20 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -240,12 +240,25 @@ public class Main { @@ -240,12 +240,25 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -21); deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) { if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***"); System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***"); - System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
@ -63,10 +63,10 @@ index ff955d3a20bf953770cc81f8b89a6d4425a5f813..268192b06592eaa56a454e0f02b2d848
net.minecraft.server.Main.main(options); net.minecraft.server.Main.main(options);
} catch (Throwable t) { } catch (Throwable t) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index f1194eb6fdfba60959e00080d0562f2820d13b27..11d7ede26b46d0bf9cced65e8c3bcc41c8b66dbf 100644 index 335120afc88a8fc1543c2e6df516fd728e3ab032..d5863b0b06384b25eaa33572fa02649795463ed8 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java --- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -19,7 +19,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -19,7 +19,7 @@ public class WatchdogThread extends Thread
private WatchdogThread(long timeoutTime, boolean restart) private WatchdogThread(long timeoutTime, boolean restart)
{ {
@ -75,7 +75,7 @@ index f1194eb6fdfba60959e00080d0562f2820d13b27..11d7ede26b46d0bf9cced65e8c3bcc41
this.timeoutTime = timeoutTime; this.timeoutTime = timeoutTime;
this.restart = restart; this.restart = restart;
} }
@@ -65,14 +65,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -65,14 +65,14 @@ public class WatchdogThread extends Thread
{ {
Logger log = Bukkit.getServer().getLogger(); Logger log = Bukkit.getServer().getLogger();
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
@ -93,12 +93,12 @@ index f1194eb6fdfba60959e00080d0562f2820d13b27..11d7ede26b46d0bf9cced65e8c3bcc41
// //
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null ) if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
{ {
@@ -82,7 +82,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -82,7 +82,7 @@ public class WatchdogThread extends Thread
} }
// //
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" ); - log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" );
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper + log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log ); WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
//

Datei anzeigen

@ -140,7 +140,7 @@ index 0000000000000000000000000000000000000000..22a55be34fde453fedd987173d95b8b3
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index a2203cd809810eb8793ae730d163192d87f615c8..4aa7969297cfbbbfe4964a3f793d9f11d684a713 100644 index 24319441ea6655c5cbd760c77cdde1e05c1877c4..f5f528e4520c5e52e1e9dae5228525f29e4eee92 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -463,6 +463,11 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -463,6 +463,11 @@ public final class CraftMagicNumbers implements UnsafeValues {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add version history to version command
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
index 351159bbdb0c8045f4983f54dee34430dbcc423e..bf42969859545a8a520923ef1836ffa4a5cc24a0 100644 index 22a55be34fde453fedd987173d95b8b347a03588..9d687da5bdf398bb3f6c84cdf1249a7213d09f2e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java --- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java +++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
@@ -7,6 +7,8 @@ import com.google.gson.*; @@ -7,6 +7,8 @@ import com.google.gson.*;
@ -201,7 +201,7 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 8318af4db5fa7242b5cb2ae50fd08174017d6f7d..18f7d73fd8a780753e2249a9fec6bb335ebfdeed 100644 index 51eac8b7177db66c005e4eaca689cf96d10edeaa..6f64d98021e842905cdd6410ec355a6f136ec18f 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -189,6 +189,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -189,6 +189,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
index 5c3b11f738c1ea19981cc878aa6c2323497391a0..6fd874a83a248e6a7d427d18d11fc608544662c5 100644 index 984a13267cc1bb960507bc9231359bb4bb837205..668a7c3f36cdbe48e472cb810b27ae4ab39a65d6 100644
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java --- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java +++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
@@ -29,6 +29,11 @@ public final class EntitySelector { @@ -29,6 +29,11 @@ public final class EntitySelector {
@ -21,33 +21,33 @@ index 5c3b11f738c1ea19981cc878aa6c2323497391a0..6fd874a83a248e6a7d427d18d11fc608
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) { public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
double d4 = max * max; double d4 = max * max;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 9feb422045c5c47bbf48a5f75f437e51f19e1595..e06dc3f6c03276afb2ab3e0ec24cba707e09a24e 100644 index cb58d527b72f047299ae5ed71a29ce0178de6e6a..2dc21048b968e7aa63b5b28cacdd1ae407c06958 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -837,7 +837,7 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -840,7 +840,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) { if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
this.discard(); this.discard();
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) { } else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
- Player entityhuman = this.level.getNearestPlayer(this, -1.0D); - Player entityhuman = this.level().getNearestPlayer(this, -1.0D);
+ Player entityhuman = this.level.findNearbyPlayer(this, -1.0D, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper + Player entityhuman = this.level().getNearestPlayer(this, -1.0D, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper
if (entityhuman != null) { if (entityhuman != null) {
double d0 = entityhuman.distanceToSqr((Entity) this); double d0 = entityhuman.distanceToSqr((Entity) this);
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
index e368478dba01a9b11adf23ed64bed61c73a78a28..17fda4857f74d2994525262472700e7788dec383 100644 index c7ab59aa0e2fd0f3e7252647ddb25b82ac604830..8f20239f3ef7ebe41fac8ee6e024c36dafec33c4 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java --- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
@@ -25,7 +25,7 @@ public class SkeletonTrapGoal extends Goal { @@ -25,7 +25,7 @@ public class SkeletonTrapGoal extends Goal {
@Override @Override
public boolean canUse() { public boolean canUse() {
- return this.horse.level.hasNearbyAlivePlayer(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); - return this.horse.level().hasNearbyAlivePlayer(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D);
+ return this.horse.level.hasNearbyAlivePlayerThatAffectsSpawning(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); // Paper - Affects Spawning API + return this.horse.level().hasNearbyAlivePlayerThatAffectsSpawning(this.horse.getX(), this.horse.getY(), this.horse.getZ(), 10.0D); // Paper - Affects Spawning API
} }
@Override @Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
index b5ee60c62cf1b8c59fdd7c8e6934321453015fd6..23ded94c7c7e4f96951e281efff499f1c61ec5c0 100644 index 1d1bd8c8088e9dfbcbd7e9d2971b6241614fc5d6..d99923c355e50bfa4682dd147d83dd1cf58553f1 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java --- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java +++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
@@ -127,7 +127,7 @@ public class Silverfish extends Monster { @@ -127,7 +127,7 @@ public class Silverfish extends Monster {
@ -60,23 +60,23 @@ index b5ee60c62cf1b8c59fdd7c8e6934321453015fd6..23ded94c7c7e4f96951e281efff499f1
return false; return false;
} }
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java 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 8ea60d388fff4a6368652ff96f648e5880053a2b..8ecbb64f9db9346757c5597404489496a0945508 100644 index 41e4903b4feb860309510f8f4ff89a4e3710b395..d07e321a3836a15058f11c88cc0deedb124bb407 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -325,7 +325,7 @@ public class Zombie extends Monster { @@ -325,7 +325,7 @@ public class Zombie extends Monster {
if (NaturalSpawner.isSpawnPositionOk(entitypositiontypes_surface, this.level, blockposition, entitytypes) && SpawnPlacements.checkSpawnRules(entitytypes, worldserver, MobSpawnType.REINFORCEMENT, blockposition, this.level.random)) { if (NaturalSpawner.isSpawnPositionOk(entitypositiontypes_surface, this.level(), blockposition, entitytypes) && SpawnPlacements.checkSpawnRules(entitytypes, worldserver, MobSpawnType.REINFORCEMENT, blockposition, this.level().random)) {
entityzombie.setPos((double) i1, (double) j1, (double) k1); entityzombie.setPos((double) i1, (double) j1, (double) k1);
- if (!this.level.hasNearbyAlivePlayer((double) i1, (double) j1, (double) k1, 7.0D) && this.level.isUnobstructed(entityzombie) && this.level.noCollision((Entity) entityzombie) && !this.level.containsAnyLiquid(entityzombie.getBoundingBox())) { - if (!this.level().hasNearbyAlivePlayer((double) i1, (double) j1, (double) k1, 7.0D) && this.level().isUnobstructed(entityzombie) && this.level().noCollision((Entity) entityzombie) && !this.level().containsAnyLiquid(entityzombie.getBoundingBox())) {
+ if (!this.level.hasNearbyAlivePlayerThatAffectsSpawning((double) i1, (double) j1, (double) k1, 7.0D) && this.level.isUnobstructed(entityzombie) && this.level.noCollision((Entity) entityzombie) && !this.level.containsAnyLiquid(entityzombie.getBoundingBox())) { // Paper - Affects Spawning API + if (!this.level().hasNearbyAlivePlayerThatAffectsSpawning((double) i1, (double) j1, (double) k1, 7.0D) && this.level().isUnobstructed(entityzombie) && this.level().noCollision((Entity) entityzombie) && !this.level().containsAnyLiquid(entityzombie.getBoundingBox())) { // Paper - Affects Spawning API
entityzombie.setTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true); // CraftBukkit entityzombie.setTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true); // CraftBukkit
entityzombie.finalizeSpawn(worldserver, this.level.getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.REINFORCEMENT, (SpawnGroupData) null, (CompoundTag) null); entityzombie.finalizeSpawn(worldserver, this.level().getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.REINFORCEMENT, (SpawnGroupData) null, (CompoundTag) null);
worldserver.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit worldserver.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java 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 018abaa48614ce2d25df2085bbb65b0b6e0312e7..b36a601ac792f2b1a51f0ae72ae12d992ac38d61 100644 index a76f1ed7b8dc1aacda987931772cb3bf8f29be42..c20753645585143421eb544a03884f0765eafb8b 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -182,6 +182,9 @@ public abstract class Player extends LivingEntity { @@ -183,6 +183,9 @@ public abstract class Player extends LivingEntity {
@Nullable @Nullable
public FishingHook fishing; public FishingHook fishing;
protected float hurtDir; protected float hurtDir;
@ -87,7 +87,7 @@ index 018abaa48614ce2d25df2085bbb65b0b6e0312e7..b36a601ac792f2b1a51f0ae72ae12d99
// CraftBukkit start // CraftBukkit start
public boolean fauxSleeping; public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 776dfbf3b33317370db3b50b8bbb95823344ee06..7b60c13cbe3d2a0d0657391a7b6be4e3706720fa 100644 index 8d60b430357a1b761de325a21e1c52639a049403..213fed3a2b32226fc128d213ee3e9fa3ae76e88e 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -54,7 +54,7 @@ public abstract class BaseSpawner { @@ -54,7 +54,7 @@ public abstract class BaseSpawner {
@ -100,10 +100,10 @@ index 776dfbf3b33317370db3b50b8bbb95823344ee06..7b60c13cbe3d2a0d0657391a7b6be4e3
public void clientTick(Level world, BlockPos pos) { public void clientTick(Level world, BlockPos pos) {
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75df4189a5 100644 index 127c4ebedb94631ceac92dbdcd465e904217d715..5e19b91e6fb7e5e354f55ea206b3d59e8767e714 100644
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java --- a/src/main/java/net/minecraft/world/level/EntityGetter.java
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java +++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
@@ -82,6 +82,11 @@ public interface EntityGetter { @@ -70,6 +70,11 @@ public interface EntityGetter {
} }
} }
@ -115,7 +115,7 @@ index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75
@Nullable @Nullable
default Player getNearestPlayer(double x, double y, double z, double maxDistance, @Nullable Predicate<Entity> targetPredicate) { default Player getNearestPlayer(double x, double y, double z, double maxDistance, @Nullable Predicate<Entity> targetPredicate) {
double d = -1.0D; double d = -1.0D;
@@ -111,6 +116,20 @@ public interface EntityGetter { @@ -99,6 +104,20 @@ public interface EntityGetter {
return this.getNearestPlayer(x, y, z, maxDistance, predicate); return this.getNearestPlayer(x, y, z, maxDistance, predicate);
} }
@ -137,10 +137,10 @@ index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75
for(Player player : this.players()) { for(Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) { if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5237eb9d18fa3ed0474b9c3aa166058c21a66d5e..50612858a0000d488dd9838ebd79403e1edd03e4 100644 index ebe5ed6ec66ec5f0979c8ff2998a9d6c1539b2fe..e68f0f2cde8ab40087bf26b93d053c2a0a49436c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2238,8 +2238,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2169,8 +2169,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public String getLocale() { public String getLocale() {
return this.getHandle().locale; return this.getHandle().locale;

Datei anzeigen

@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d3cd196e1a6f707ed5e0008123cc65df80422859..a7f9a3e57c7736b065b8dc4dba6e018ce73e5157 100644 index ff3073b6780c04f5f11b5384bb6b6289eafd0c4f..2aeeffe6d011a1ecc848b80f0236c8a3f871a01c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -285,7 +285,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -285,7 +285,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -33,7 +33,7 @@ index d3cd196e1a6f707ed5e0008123cc65df80422859..a7f9a3e57c7736b065b8dc4dba6e018c
public final double[] recentTps = new double[ 3 ]; public final double[] recentTps = new double[ 3 ];
// Spigot end // Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
@@ -956,6 +956,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -973,6 +973,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{ {
return ( avg * exp ) + ( tps * ( 1 - exp ) ); return ( avg * exp ) + ( tps * ( 1 - exp ) );
} }
@ -90,8 +90,8 @@ index d3cd196e1a6f707ed5e0008123cc65df80422859..a7f9a3e57c7736b065b8dc4dba6e018c
+ // Paper End + // Paper End
// Spigot End // Spigot End
public static volatile RuntimeException chunkSystemCrash; // Paper - rewrite chunk system protected void runServer() {
@@ -972,7 +1023,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -987,9 +1038,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start // Spigot start
Arrays.fill( recentTps, 20 ); Arrays.fill( recentTps, 20 );
@ -99,18 +99,12 @@ index d3cd196e1a6f707ed5e0008123cc65df80422859..a7f9a3e57c7736b065b8dc4dba6e018c
+ long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop + long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
+ lastTick = start - TICK_TIME; // Paper + lastTick = start - TICK_TIME; // Paper
while (this.running) { while (this.running) {
// Paper start - rewrite chunk system
// guarantee that nothing can stop the server from halting if it can at least still tick
@@ -980,7 +1032,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw this.chunkSystemCrash;
}
// Paper end - rewrite chunk system
- long i = (curTime = Util.getMillis()) - this.nextTickTime; - long i = (curTime = Util.getMillis()) - this.nextTickTime;
+ long i = ((curTime = System.nanoTime()) / (1000L * 1000L)) - this.nextTickTime; // Paper + long i = ((curTime = System.nanoTime()) / (1000L * 1000L)) - this.nextTickTime; // Paper
if (i > 5000L && this.nextTickTime - this.lastOverloadWarning >= 30000L) { // CraftBukkit if (i > 5000L && this.nextTickTime - this.lastOverloadWarning >= 30000L) { // CraftBukkit
long j = i / 50L; long j = i / 50L;
@@ -992,12 +1044,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1001,12 +1053,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
++MinecraftServer.currentTickLong; // Paper ++MinecraftServer.currentTickLong; // Paper
@ -134,7 +128,7 @@ index d3cd196e1a6f707ed5e0008123cc65df80422859..a7f9a3e57c7736b065b8dc4dba6e018c
tickSection = curTime; tickSection = curTime;
} }
// Spigot end // Spigot end
@@ -1007,7 +1065,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1016,7 +1074,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount); this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
} }
@ -145,10 +139,10 @@ index d3cd196e1a6f707ed5e0008123cc65df80422859..a7f9a3e57c7736b065b8dc4dba6e018c
this.startMetricsRecordingTick(); this.startMetricsRecordingTick();
this.profiler.push("tick"); this.profiler.push("tick");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index de60f523f589bcaadb037d660953f2ddd06d69a5..c454a9078e8a498095a078ec8d2acd2c32ccb991 100644 index 57685febc623e99c752cd7536f666fedd3e13df8..1e601581d7b6bb59ccec3c0b4a87747ec6c64f84 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2439,6 +2439,17 @@ public final class CraftServer implements Server { @@ -2437,6 +2437,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE; return CraftMagicNumbers.INSTANCE;
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 50612858a0000d488dd9838ebd79403e1edd03e4..a80cd0e9d8c1ff3d653a21b2302d0d27dd0d95b2 100644 index e68f0f2cde8ab40087bf26b93d053c2a0a49436c..40e48c6ae95db4eb6241a7613a09597943fad200 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1907,12 +1907,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1838,12 +1838,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setFlying(boolean value) { public void setFlying(boolean value) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index fb7930009db2c219347e6601ca2cde0c8601e2b4..26cc626ad0c5328c20f7ef20e8e270c9a3c22dc4 100644 index 7cb5abfa89f842194325d26c6e95b49460c5968f..871234c2c381c6ff7a2a27a8542bbd498c1aec03 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2214,6 +2214,15 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2116,6 +2116,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.valid = true; // CraftBukkit entity.valid = true; // CraftBukkit
@ -25,10 +25,10 @@ index fb7930009db2c219347e6601ca2cde0c8601e2b4..26cc626ad0c5328c20f7ef20e8e270c9
public void onTrackingEnd(Entity entity) { public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index dc20ca25f17a6a9b24833e181344dc666be7d424..5fb5e97c7480eea1592b80f8d8e4c4febbb6faa8 100644 index f668a80c6bff67bf766207985c1af73f09e1bd1c..06d8211ef27a21da66d4622795cbcc8b37d2ce4e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -308,7 +308,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -312,7 +312,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public long activatedTick = Integer.MIN_VALUE; public long activatedTick = Integer.MIN_VALUE;
public void inactiveTick() { } public void inactiveTick() { }
// Spigot end // Spigot end
@ -56,7 +56,7 @@ index dc20ca25f17a6a9b24833e181344dc666be7d424..5fb5e97c7480eea1592b80f8d8e4c4fe
public float getBukkitYaw() { public float getBukkitYaw() {
return this.yRot; return this.yRot;
} }
@@ -1943,6 +1963,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2010,6 +2030,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.bukkitEntity.storeBukkitValues(nbt); this.bukkitEntity.storeBukkitValues(nbt);
} }
// CraftBukkit end // CraftBukkit end
@ -72,7 +72,7 @@ index dc20ca25f17a6a9b24833e181344dc666be7d424..5fb5e97c7480eea1592b80f8d8e4c4fe
return nbt; return nbt;
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
@@ -2070,6 +2099,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2137,6 +2166,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
} }
// CraftBukkit end // CraftBukkit end
@ -94,10 +94,10 @@ index dc20ca25f17a6a9b24833e181344dc666be7d424..5fb5e97c7480eea1592b80f8d8e4c4fe
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded"); CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index 4051c7ea5f3ac70df2329c6f6938dff076206797..ef29262fd2f51c6d90e2bb01fbf843a1a1d5043d 100644 index 2905556cbb4715b0dcbaab54222e76669ce0e81d..4488d112b280a2020712708940adf65b69ca0a3c 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -340,6 +340,14 @@ public class FallingBlockEntity extends Entity { @@ -341,6 +341,14 @@ public class FallingBlockEntity extends Entity {
this.blockState = Blocks.SAND.defaultBlockState(); this.blockState = Blocks.SAND.defaultBlockState();
} }
@ -113,7 +113,7 @@ index 4051c7ea5f3ac70df2329c6f6938dff076206797..ef29262fd2f51c6d90e2bb01fbf843a1
public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) { public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) {
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
index c133d51a363900164c1492359be5b1579806d5cb..ab5817df2c98d24ee627fd5cf1f71e40b044e43e 100644 index c1a1b320a6f2a97e8d51a3e8fac624243603e368..223cd451a952addec522711b6d3a0d6c0ab0f797 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -118,6 +118,14 @@ public class PrimedTnt extends Entity implements TraceableEntity { @@ -118,6 +118,14 @@ public class PrimedTnt extends Entity implements TraceableEntity {
@ -132,7 +132,7 @@ index c133d51a363900164c1492359be5b1579806d5cb..ab5817df2c98d24ee627fd5cf1f71e40
@Nullable @Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 2849f70314f1cd8aeac38c8ab37d293732d4504c..3a0d2613bc84659f9c618e20f3af27e75538331f 100644 index db585082251005e2d2f861a0b292f229bd43485d..0a6926f9b6be67d4d710d2fbc6bd2b1fcb0677a0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1252,5 +1252,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1252,5 +1252,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 0ce746ac2f448191854f6faa4e1876d869d8d38d..537ce62ba966cc5765b9e7e48e1ba043fa1a6df9 100644 index f21ba175538436e59c45d5350ef7b2605ed96775..05e8f34044241ce9b6c1afa4f90a92492d3a64b1 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -735,11 +735,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -723,11 +723,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try { try {
tickConsumer.accept(entity); tickConsumer.accept(entity);
} catch (Throwable throwable) { } catch (Throwable throwable) {
@ -44,10 +44,10 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..63acd109a79ed752a05df3d4f1b99309
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java 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 a17ea775afb51dd31871a66a1b6f9f623dd7751a..8254e72595ae5c1ddf5cf969570d83758b744c7b 100644 index 9bd0e817cf717fe6257ceb4ace6bf6f5eed9eb82..0ebee823180e91281fbde206a16d525277f0fb3d 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1191,11 +1191,11 @@ public class LevelChunk extends ChunkAccess { @@ -1057,11 +1057,11 @@ public class LevelChunk extends ChunkAccess {
gameprofilerfiller.pop(); gameprofilerfiller.pop();
} catch (Throwable throwable) { } catch (Throwable throwable) {

Datei anzeigen

@ -6,24 +6,24 @@ Subject: [PATCH] Configurable top of nether void damage
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5fb5e97c7480eea1592b80f8d8e4c4febbb6faa8..e660773a2b0da661e151559f9bf988c4cb148a77 100644 index 06d8211ef27a21da66d4622795cbcc8b37d2ce4e..7358b918d03b0dee0541843a952d6b8bf939d877 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -709,7 +709,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -663,7 +663,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
} }
public void checkOutOfWorld() { public void checkBelowWorld() {
- if (this.getY() < (double) (this.level.getMinBuildHeight() - 64)) { - if (this.getY() < (double) (this.level().getMinBuildHeight() - 64)) {
+ // Paper start - Configurable nether ceiling damage + // Paper start - Configurable nether ceiling damage
+ if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER + if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
+ && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) + && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
+ && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { + && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
+ // Paper end + // Paper end
this.outOfWorld(); this.onBelowWorld();
} }
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
index 98cdf291a5d0248091891ad30104adef708eec55..ff57611088eabfb7e2db8fcf6344b1551b17b87b 100644 index 02e3322ec41108fe9275510e2daa833d180353dc..3668f9775f377434779a8e519b10a11cf7b14dd5 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java --- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
@@ -55,7 +55,7 @@ public class PortalForcer { @@ -55,7 +55,7 @@ public class PortalForcer {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Check online mode before converting and renaming player data
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
index e0bb30446757045e89b227ff2f0136b371ca64cd..9d25ab52fac9e22d74f874491c7efbcaafa2ffc6 100644 index e2c0ab0ab06b15dcfa6ce8c82ad4136f2be33b5c..984b75e12b5feab63767e030df925b3cbf26d559 100644
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java --- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
@@ -56,7 +56,7 @@ public class PlayerDataStorage { @@ -56,7 +56,7 @@ public class PlayerDataStorage {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Always tick falling blocks
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index d3639643cda7d8ccf3c1208502605120590a2d30..e2dfc4d9a16a738dd0fe91838603e1d4370afa56 100644 index 3e5d541d3d7fc3956b2fc68da9f22a0ab0367ce9..66dbfabdb104d272d48588a4773d198d3938f1ef 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -89,6 +89,7 @@ public class ActivationRange @@ -89,6 +89,7 @@ public class ActivationRange

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] Configurable end credits
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8105a30251c45b4ab111c97d34029c66180922fd..0d06bb85f2c81331dcf5cccde31c650a7c46f0b9 100644 index 5872ead2fe3a64f02f8bc36603fbb856728fd255..d5fda07eb5408513fa0b4bca3fa14679b2beebe7 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1025,6 +1025,7 @@ public class ServerPlayer extends Player { @@ -1024,6 +1024,7 @@ public class ServerPlayer extends Player {
this.unRide(); this.unRide();
this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
if (!this.wonGame) { if (!this.wonGame) {
+ if (level.paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Toggle to always disable end credits + if (level.paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Toggle to always disable end credits
this.wonGame = true; this.wonGame = true;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix lag from explosions processing dead entities
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index a1ef2b5bc6c93b6117fba4c5664cff8131f0df2e..594ac935ae8f77fc16be90ac178581cbdfc65eb7 100644 index 31bc6aa727a1828cd353a0bdf51e40baabb50203..e360022498b91a8371b33d84bf6fff96c503999d 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java --- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -202,7 +202,7 @@ public class Explosion { @@ -202,7 +202,7 @@ public class Explosion {

Datei anzeigen

@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving
an entity's exposure during an explosion. an entity's exposure during an explosion.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a7f9a3e57c7736b065b8dc4dba6e018ce73e5157..1554f8847e42cdd584b16c0648c21c4071aea6de 100644 index 2aeeffe6d011a1ecc848b80f0236c8a3f871a01c..d5ad3368a397e9fc02506187ccb1c386afd9ce2b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1408,6 +1408,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1412,6 +1412,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop(); this.profiler.pop();
this.profiler.pop(); this.profiler.pop();
@ -22,7 +22,7 @@ index a7f9a3e57c7736b065b8dc4dba6e018ce73e5157..1554f8847e42cdd584b16c0648c21c40
this.profiler.popPush("connection"); this.profiler.popPush("connection");
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 8752dee5dc0ed1c2d81994b627aa187049a3cd7d..65168326eb92dbd45e7b992a34f69aaa12d3e8ff 100644 index e360022498b91a8371b33d84bf6fff96c503999d..925d37ca684e7e6a3ad88e6e040f3599225f0b1d 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java --- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -221,7 +221,7 @@ public class Explosion { @@ -221,7 +221,7 @@ public class Explosion {
@ -120,10 +120,10 @@ index 8752dee5dc0ed1c2d81994b627aa187049a3cd7d..65168326eb92dbd45e7b992a34f69aaa
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 537ce62ba966cc5765b9e7e48e1ba043fa1a6df9..ad42b1f9dae76a507a6eca51d096b7774905f623 100644 index 05e8f34044241ce9b6c1afa4f90a92492d3a64b1..9ba534fe0aa464a01fc7ed5927bd190669351100 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -167,6 +167,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private org.spigotmc.TickLimiter entityLimiter; private org.spigotmc.TickLimiter entityLimiter;
private org.spigotmc.TickLimiter tileLimiter; private org.spigotmc.TickLimiter tileLimiter;
private int tileTickPosition; private int tileTickPosition;

Datei anzeigen

@ -5,23 +5,23 @@ Subject: [PATCH] Disable explosion knockback
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index aa34f59f7ffaa40fb43b6784361c0f7edb0461c5..4dcaaa2c10966b975d612de8453af7a7f1c32b16 100644 index 3fa9f639a598294b4956c6525fc8a630ae10da2d..da488c4dbf8f6c36cb7cfa64be1645be8a7e4ecf 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1405,10 +1405,12 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1454,10 +1454,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
} }
+ boolean knockbackCancelled = level.paperConfig().environment.disableExplosionKnockback && source.is(DamageTypeTags.IS_EXPLOSION) && this instanceof net.minecraft.world.entity.player.Player; // Paper - Disable explosion knockback + boolean knockbackCancelled = level.paperConfig().environment.disableExplosionKnockback && source.is(DamageTypeTags.IS_EXPLOSION) && this instanceof net.minecraft.world.entity.player.Player; // Paper - Disable explosion knockback
if (flag1) { if (flag1) {
if (flag) { if (flag) {
this.level.broadcastEntityEvent(this, (byte) 29); this.level().broadcastEntityEvent(this, (byte) 29);
} else { } else {
+ if (!knockbackCancelled) // Paper - Disable explosion knockback + if (!knockbackCancelled) // Paper - Disable explosion knockback
this.level.broadcastDamageEvent(this, source); this.level().broadcastDamageEvent(this, source);
} }
@@ -1432,6 +1434,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1481,6 +1483,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
} }
@ -30,7 +30,7 @@ index aa34f59f7ffaa40fb43b6784361c0f7edb0461c5..4dcaaa2c10966b975d612de8453af7a7
if (!this.checkTotemDeathProtection(source)) { if (!this.checkTotemDeathProtection(source)) {
SoundEvent soundeffect = this.getDeathSound(); SoundEvent soundeffect = this.getDeathSound();
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index d21422dfac366037398101626d7d33640725f018..e09e6be4f7c8b6c3761b38e181e4c0288a5c1871 100644 index 925d37ca684e7e6a3ad88e6e040f3599225f0b1d..401076c5350429052994d98c414a83a21f908010 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java --- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -262,7 +262,7 @@ public class Explosion { @@ -262,7 +262,7 @@ public class Explosion {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 26cc626ad0c5328c20f7ef20e8e270c9a3c22dc4..51ab340588518203c5b1e5a7ca06127bea445dbb 100644 index 871234c2c381c6ff7a2a27a8542bbd498c1aec03..fdb2996562010fa6dd43b6a79b707cb86146bb48 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -692,7 +692,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -603,7 +603,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.push("thunder"); gameprofilerfiller.push("thunder");
BlockPos blockposition; BlockPos blockposition;

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] Disable ice and snow
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 51ab340588518203c5b1e5a7ca06127bea445dbb..a08c81030cf4974397205b200d27c559cdb75a12 100644 index fdb2996562010fa6dd43b6a79b707cb86146bb48..ef48e76ca18576e631d5d2f1652d3449d558a582 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -722,7 +722,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -634,7 +634,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.popPush("iceandsnow");
int l; int l;
int i1;
- if (this.random.nextInt(16) == 0) { - if (this.random.nextInt(16) == 0) {
+ if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow + if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable mob spawner tick rate
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 7b60c13cbe3d2a0d0657391a7b6be4e3706720fa..3d4e77327295344a5ef8d1fcde96f1ed2fecfbfa 100644 index 213fed3a2b32226fc128d213ee3e9fa3ae76e88e..64bd7d265a45575ce46c1a792f90cadc76763871 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -45,6 +45,7 @@ public abstract class BaseSpawner { @@ -45,6 +45,7 @@ public abstract class BaseSpawner {
@ -37,13 +37,3 @@ index 7b60c13cbe3d2a0d0657391a7b6be4e3706720fa..3d4e77327295344a5ef8d1fcde96f1ed
} else { } else {
boolean flag = false; boolean flag = false;
RandomSource randomsource = world.getRandom(); RandomSource randomsource = world.getRandom();
@@ -152,8 +158,7 @@ public abstract class BaseSpawner {
((Mob) entity).finalizeSpawn(world, world.getCurrentDifficultyAt(entity.blockPosition()), MobSpawnType.SPAWNER, (SpawnGroupData) null, (CompoundTag) null);
}
// Spigot Start
- if ( entityinsentient.level.spigotConfig.nerfSpawnerMobs )
- {
+ if (entityinsentient.level.spigotConfig.nerfSpawnerMobs) {
entityinsentient.aware = false;
}
// Spigot End

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0d06bb85f2c81331dcf5cccde31c650a7c46f0b9..10660cd8df20269f07726af53dc07fa7d9880807 100644 index d5fda07eb5408513fa0b4bca3fa14679b2beebe7..8f8ff85199445fae3c42acdfdfe5a8c0d7344a36 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1808,7 +1808,7 @@ public class ServerPlayer extends Player { @@ -1811,7 +1811,7 @@ public class ServerPlayer extends Player {
} }
} }
@ -17,7 +17,7 @@ index 0d06bb85f2c81331dcf5cccde31c650a7c46f0b9..10660cd8df20269f07726af53dc07fa7
public java.util.Locale adventure$locale = java.util.Locale.US; // Paper public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
public void updateOptions(ServerboundClientInformationPacket packet) { public void updateOptions(ServerboundClientInformationPacket packet) {
// CraftBukkit start // CraftBukkit start
@@ -1816,9 +1816,10 @@ public class ServerPlayer extends Player { @@ -1819,9 +1819,10 @@ public class ServerPlayer extends Player {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event); this.server.server.getPluginManager().callEvent(event);
} }
@ -30,10 +30,10 @@ index 0d06bb85f2c81331dcf5cccde31c650a7c46f0b9..10660cd8df20269f07726af53dc07fa7
this.locale = packet.language; this.locale = packet.language;
// Paper start // Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a80cd0e9d8c1ff3d653a21b2302d0d27dd0d95b2..ada4dfb8e520eb2e383373771719f924b2062d1b 100644 index 40e48c6ae95db4eb6241a7613a09597943fad200..cef936dea0592b08b1cca0482d1220ffe4b2c05a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2238,8 +2238,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2169,8 +2169,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public String getLocale() { public String getLocale() {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable container update tick rate
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 10660cd8df20269f07726af53dc07fa7d9880807..fef0ce65c01fd56a0ed62de27e8d8457324bb295 100644 index 8f8ff85199445fae3c42acdfdfe5a8c0d7344a36..d834b6570c9a45fb415afc19262c8735463c27d9 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -241,6 +241,7 @@ public class ServerPlayer extends Player { @@ -241,6 +241,7 @@ public class ServerPlayer extends Player {
@ -16,7 +16,7 @@ index 10660cd8df20269f07726af53dc07fa7d9880807..fef0ce65c01fd56a0ed62de27e8d8457
// CraftBukkit start // CraftBukkit start
public String displayName; public String displayName;
@@ -631,7 +632,12 @@ public class ServerPlayer extends Player { @@ -630,7 +631,12 @@ public class ServerPlayer extends Player {
--this.invulnerableTime; --this.invulnerableTime;
} }
@ -24,9 +24,9 @@ index 10660cd8df20269f07726af53dc07fa7d9880807..fef0ce65c01fd56a0ed62de27e8d8457
+ // Paper start - Configurable container update tick rate + // Paper start - Configurable container update tick rate
+ if (--containerUpdateDelay <= 0) { + if (--containerUpdateDelay <= 0) {
+ this.containerMenu.broadcastChanges(); + this.containerMenu.broadcastChanges();
+ containerUpdateDelay = level.paperConfig().tickRates.containerUpdate; + containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
+ } + }
+ // Paper end + // Paper end
if (!this.level.isClientSide && !this.containerMenu.stillValid(this)) { if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
this.closeContainer(); this.closeContainer();
this.containerMenu = this.inventoryMenu; this.containerMenu = this.inventoryMenu;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index ad42b1f9dae76a507a6eca51d096b7774905f623..8b554a7310c740f2a67476a189e8d15fb61f3fba 100644 index 9ba534fe0aa464a01fc7ed5927bd190669351100..89e065a643eb16ccc308bcf42ea9f5d02c181a1f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -701,9 +701,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -689,9 +689,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Spigot start // Spigot start
// Iterator iterator = this.blockEntityTickers.iterator(); // Iterator iterator = this.blockEntityTickers.iterator();
int tilesThisCycle = 0; int tilesThisCycle = 0;

Datei anzeigen

@ -12,10 +12,10 @@ improve setPosition to use raw
public net.minecraft.world.entity.Entity setRot(FF)V public net.minecraft.world.entity.Entity setRot(FF)V
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index d9f9aba11aa4ee40a3bfd09b4ad065b8ddd2d31e..57281d4a3c6b187d13ba5cadd46f494df411e7ba 100644 index 95ca77e276a5172b03dafddf20d3b3ff9c502cf5..233056040541993dd2c13602970c3438ee2eeba6 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -233,7 +233,7 @@ public abstract class PlayerList { @@ -240,7 +240,7 @@ public abstract class PlayerList {
// Spigot start - spawn location event // Spigot start - spawn location event
Player spawnPlayer = player.getBukkitEntity(); Player spawnPlayer = player.getBukkitEntity();
@ -24,10 +24,10 @@ index d9f9aba11aa4ee40a3bfd09b4ad065b8ddd2d31e..57281d4a3c6b187d13ba5cadd46f494d
this.cserver.getPluginManager().callEvent(ev); this.cserver.getPluginManager().callEvent(ev);
Location loc = ev.getSpawnLocation(); Location loc = ev.getSpawnLocation();
@@ -241,7 +241,10 @@ public abstract class PlayerList { @@ -248,7 +248,10 @@ public abstract class PlayerList {
player.spawnIn(worldserver1); player.spawnIn(worldserver1);
player.gameMode.setLevel((ServerLevel) player.level); player.gameMode.setLevel((ServerLevel) player.level());
- player.absMoveTo(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch()); - player.absMoveTo(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
+ // Paper start - set raw so we aren't fully joined to the world (not added to chunk or world) + // Paper start - set raw so we aren't fully joined to the world (not added to chunk or world)
+ player.setPosRaw(loc.getX(), loc.getY(), loc.getZ()); + player.setPosRaw(loc.getX(), loc.getY(), loc.getZ());

Datei anzeigen

@ -21,10 +21,10 @@ character.
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5291581c87b65be72f482b4da1fccd33fa053591..dae74cda3b9faa0c8aeecc6c7bc329950033f653 100644 index 403f7c7f31e0072b0cad0706bc981ece24733a1d..42a44820a3c13e2b0e29e02ed384c1918c9a0b17 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2042,7 +2042,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2034,7 +2034,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return true; return true;
} }
@ -33,7 +33,7 @@ index 5291581c87b65be72f482b4da1fccd33fa053591..dae74cda3b9faa0c8aeecc6c7bc32995
for (int i = 0; i < message.length(); ++i) { for (int i = 0; i < message.length(); ++i) {
if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) { if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) {
return true; return true;
@@ -2059,7 +2059,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2051,7 +2051,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
} }
OutgoingChatMessage outgoing = OutgoingChatMessage.create(original); OutgoingChatMessage outgoing = OutgoingChatMessage.create(original);
@ -42,7 +42,7 @@ index 5291581c87b65be72f482b4da1fccd33fa053591..dae74cda3b9faa0c8aeecc6c7bc32995
this.handleCommand(s); this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin // Do nothing, this is coming from a plugin
@@ -2149,7 +2149,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2141,7 +2141,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
} }
} }
@ -74,7 +74,7 @@ index 5291581c87b65be72f482b4da1fccd33fa053591..dae74cda3b9faa0c8aeecc6c7bc32995
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c454a9078e8a498095a078ec8d2acd2c32ccb991..ad6cb2a20bb494b9c0618e42d612fdd4639017cb 100644 index 1e601581d7b6bb59ccec3c0b4a87747ec6c64f84..d3254e29df8543de33923a54b78c3af027e68b71 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -875,6 +875,28 @@ public final class CraftServer implements Server { @@ -875,6 +875,28 @@ public final class CraftServer implements Server {
@ -107,10 +107,10 @@ index c454a9078e8a498095a078ec8d2acd2c32ccb991..ad6cb2a20bb494b9c0618e42d612fdd4
return true; return true;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ada4dfb8e520eb2e383373771719f924b2062d1b..ce45e409ea3413cabb2e77c7013fa9b867817ad6 100644 index cef936dea0592b08b1cca0482d1220ffe4b2c05a..b1f69f7183b2765695446fd587527def4dd8c4c9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -512,7 +512,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -437,7 +437,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void chat(String msg) { public void chat(String msg) {
if (this.getHandle().connection == null) return; if (this.getHandle().connection == null) return;
@ -145,7 +145,7 @@ index 19c44daaa407b7c1c7a7ffe56fef8c8814c6d5b2..6a073a9dc44d93eba296a0e18a9c7be8
} finally { } finally {
try { try {
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
index 05e94702e42b8f5c35d2a112c486d57948a3acba..5409f230fdd53b70fc03c58177438534731ad4e6 100644 index 78669fa035b7537ff7e533cf32aaf2995625424f..7585a30e8f063ac2656b5de519b1e9edaceffbc7 100644
--- a/src/main/java/org/spigotmc/AsyncCatcher.java --- a/src/main/java/org/spigotmc/AsyncCatcher.java
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java +++ b/src/main/java/org/spigotmc/AsyncCatcher.java
@@ -6,6 +6,7 @@ public class AsyncCatcher @@ -6,6 +6,7 @@ public class AsyncCatcher

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
index ca1d97d6eeea2b0fd2a9b90624ca083026f549de..02aca470c3b41114204da54e2365ee29adad7554 100644 index 23cb972ca3fde409be0d6517ef8f1c58dab47ff4..476a9b2db5deac803f1cb3c2cbe88b69cc3da8e5 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
@@ -318,7 +318,7 @@ public class Slime extends Mob implements Enemy { @@ -318,7 +318,7 @@ public class Slime extends Mob implements Enemy {
@ -18,10 +18,10 @@ index ca1d97d6eeea2b0fd2a9b90624ca083026f549de..02aca470c3b41114204da54e2365ee29
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) { if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
return checkMobSpawnRules(type, world, spawnReason, pos, random); return checkMobSpawnRules(type, world, spawnReason, pos, random);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 317bf725767e7dc8b916eeb8cd5bcd30ac219aaa..08bfd6d07383e2e92d1e46d95fafab76a8c1410b 100644 index bf4b2f89d3a7133155c6272379c742318b2c1514..f07a6b1d782426581c84ffa19447c1375c4cbc07 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -169,7 +169,7 @@ public class CraftChunk implements Chunk { @@ -213,7 +213,7 @@ public class CraftChunk implements Chunk {
@Override @Override
public boolean isSlimeChunk() { public boolean isSlimeChunk() {
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk // 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ad6cb2a20bb494b9c0618e42d612fdd4639017cb..bbe1147d7dc584c808c7f72747d48f5116e0e3dd 100644 index d3254e29df8543de33923a54b78c3af027e68b71..0edef3dd3dafe59f296f7a82705ec2269e68a2d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2014,6 +2014,7 @@ public final class CraftServer implements Server { @@ -2012,6 +2012,7 @@ public final class CraftServer implements Server {
return this.helpMap; return this.helpMap;
} }

Datei anzeigen

@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4
// Paper end // Paper end
buf.writeComponent(this.text); buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ce45e409ea3413cabb2e77c7013fa9b867817ad6..aea668388c2960f515def749d4a8bf5359625dbd 100644 index b1f69f7183b2765695446fd587527def4dd8c4c9..20daf74908ecb0c569bd92260c82d61bb5555cfd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -73,7 +73,7 @@ index ce45e409ea3413cabb2e77c7013fa9b867817ad6..aea668388c2960f515def749d4a8bf53
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding; import com.google.common.io.BaseEncoding;
@@ -358,6 +359,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -283,6 +284,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
} }

Datei anzeigen

@ -5,11 +5,11 @@ Subject: [PATCH] Add configurable portal search radius
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e660773a2b0da661e151559f9bf988c4cb148a77..faa958b79b3e6d767f009e7b8b4a6cf1296e39ac 100644 index 7358b918d03b0dee0541843a952d6b8bf939d877..4d12403d8ae7c620e169e87b0a0ab48e28251811 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3051,7 +3051,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -3122,7 +3122,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType()); double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType());
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0); BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
// CraftBukkit start // CraftBukkit start
- CraftPortalEvent event = this.callPortalEvent(this, destination, new PositionImpl(blockposition.getX(), blockposition.getY(), blockposition.getZ()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag2 ? 16 : 128, 16); - CraftPortalEvent event = this.callPortalEvent(this, destination, new PositionImpl(blockposition.getX(), blockposition.getY(), blockposition.getZ()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag2 ? 16 : 128, 16);
@ -24,7 +24,7 @@ index e660773a2b0da661e151559f9bf988c4cb148a77..faa958b79b3e6d767f009e7b8b4a6cf1
return null; return null;
} }
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
index ff57611088eabfb7e2db8fcf6344b1551b17b87b..d1c7eba29c64a6dbf55d3062ced9769eecb548ed 100644 index 3668f9775f377434779a8e519b10a11cf7b14dd5..389b63605d416678d35666bbd46e0fa05a02f898 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java --- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
@@ -43,7 +43,7 @@ public class PortalForcer { @@ -43,7 +43,7 @@ public class PortalForcer {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index bbe1147d7dc584c808c7f72747d48f5116e0e3dd..319caeca0737ab5b8f847a7e00784461839aad8c 100644 index 0edef3dd3dafe59f296f7a82705ec2269e68a2d6..f8bb3493faf56a2e214dab9efb1c8f05b0b53fbd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -296,6 +296,7 @@ public final class CraftServer implements Server { @@ -296,6 +296,7 @@ public final class CraftServer implements Server {
@ -17,7 +17,7 @@ index bbe1147d7dc584c808c7f72747d48f5116e0e3dd..319caeca0737ab5b8f847a7e00784461
static { static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 3a0d2613bc84659f9c618e20f3af27e75538331f..e93fef1dc636e98ca11a942d7254256401eb3486 100644 index 0a6926f9b6be67d4d710d2fbc6bd2b1fcb0677a0..c9275f73be7332f79312037954f9685f6c1f800f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -465,10 +465,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -465,10 +465,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -62,10 +62,10 @@ index 3a0d2613bc84659f9c618e20f3af27e75538331f..e93fef1dc636e98ca11a942d72542564
public double getHeight() { public double getHeight() {
return this.getHandle().getBbHeight(); return this.getHandle().getBbHeight();
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 11d7ede26b46d0bf9cced65e8c3bcc41c8b66dbf..3ad14bf0697e682a2e777baa8faeb323d127fb13 100644 index d5863b0b06384b25eaa33572fa02649795463ed8..2693cc933d746e40d8a47d96c6cb6799f0a2472f 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java --- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -80,7 +80,19 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -80,7 +80,19 @@ public class WatchdogThread extends Thread
log.log( Level.SEVERE, "During the run of the server, a physics stackoverflow was supressed" ); log.log( Level.SEVERE, "During the run of the server, a physics stackoverflow was supressed" );
log.log( Level.SEVERE, "near " + net.minecraft.world.level.Level.lastPhysicsProblem ); log.log( Level.SEVERE, "near " + net.minecraft.world.level.Level.lastPhysicsProblem );
} }
@ -85,4 +85,4 @@ index 11d7ede26b46d0bf9cced65e8c3bcc41c8b66dbf..3ad14bf0697e682a2e777baa8faeb323
+ // Paper end + // Paper end
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );

Datei anzeigen

@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds. This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index aea668388c2960f515def749d4a8bf5359625dbd..470eac3191c09c7c7fe4b36165ed1c213bac421c 100644 index 20daf74908ecb0c569bd92260c82d61bb5555cfd..2ab9fa95aecc9393a80b94a37915b4f22d83ce27 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1209,7 +1209,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1140,7 +1140,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entity.connection.teleport(to); entity.connection.teleport(to);
} else { } else {
// The respawn reason should never be used if the passed location is non null. // The respawn reason should never be used if the passed location is non null.

Datei anzeigen

@ -88,7 +88,7 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..fed09b886f4fa0006d160e5f2abb00df
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 8b554a7310c740f2a67476a189e8d15fb61f3fba..cff0be79e2dbb761ad2971bc3fcbd0d264505f1d 100644 index 89e065a643eb16ccc308bcf42ea9f5d02c181a1f..49ef7d349e0e4b1d45611ff0a225ba94c3db2600 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1,5 +1,10 @@ @@ -1,5 +1,10 @@
@ -102,7 +102,7 @@ index 8b554a7310c740f2a67476a189e8d15fb61f3fba..cff0be79e2dbb761ad2971bc3fcbd0d2
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.mojang.serialization.Codec; import com.mojang.serialization.Codec;
import java.io.IOException; import java.io.IOException;
@@ -737,6 +742,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -725,6 +730,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper start - Prevent tile entity and entity crashes // Paper start - Prevent tile entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable); MinecraftServer.LOGGER.error(msg, throwable);
@ -131,7 +131,7 @@ index f1675e35be0ab7670c875c6b0d1e982a3ae09d1e..b2bb9bbd3af414c50ec3f8e3e171a679
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java 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 8254e72595ae5c1ddf5cf969570d83758b744c7b..03f7394057c927f55fa962a65988d03553c6a642 100644 index 0ebee823180e91281fbde206a16d525277f0fb3d..7edb17360bc0611c6a1412b868ed128c9dbcfb4f 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
@ -142,7 +142,7 @@ index 8254e72595ae5c1ddf5cf969570d83758b744c7b..03f7394057c927f55fa962a65988d035
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.UnmodifiableIterator; import com.google.common.collect.UnmodifiableIterator;
import com.mojang.logging.LogUtils; import com.mojang.logging.LogUtils;
@@ -598,10 +599,16 @@ public class LevelChunk extends ChunkAccess { @@ -568,10 +569,16 @@ public class LevelChunk extends ChunkAccess {
// CraftBukkit start // CraftBukkit start
} else { } else {
@ -163,7 +163,7 @@ index 8254e72595ae5c1ddf5cf969570d83758b744c7b..03f7394057c927f55fa962a65988d035
// CraftBukkit end // CraftBukkit end
} }
} }
@@ -1194,6 +1201,7 @@ public class LevelChunk extends ChunkAccess { @@ -1060,6 +1067,7 @@ public class LevelChunk extends ChunkAccess {
// Paper start - Prevent tile entity and entity crashes // Paper start - Prevent tile entity and entity crashes
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()); final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable); net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
@ -172,10 +172,10 @@ index 8254e72595ae5c1ddf5cf969570d83758b744c7b..03f7394057c927f55fa962a65988d035
// Paper end // Paper end
// Spigot start // Spigot start
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
index e68205fe7169c7c5b7c6fdada2ee97d86107ca97..aa8972fd1a1fade05d60ab69efb8ff24f344508a 100644 index d9daf07132c46548964a75588b69d7a74680e917..67a2f3c02aa4983b3ec2df073821190ddb36543c 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
@@ -275,6 +275,7 @@ public class RegionFile implements AutoCloseable { @@ -274,6 +274,7 @@ public class RegionFile implements AutoCloseable {
return true; return true;
} }
} catch (IOException ioexception) { } catch (IOException ioexception) {
@ -183,7 +183,7 @@ index e68205fe7169c7c5b7c6fdada2ee97d86107ca97..aa8972fd1a1fade05d60ab69efb8ff24
return false; return false;
} }
} }
@@ -356,6 +357,7 @@ public class RegionFile implements AutoCloseable { @@ -355,6 +356,7 @@ public class RegionFile implements AutoCloseable {
((java.nio.Buffer) buf).position(5); // CraftBukkit - decompile error ((java.nio.Buffer) buf).position(5); // CraftBukkit - decompile error
filechannel.write(buf); filechannel.write(buf);
} catch (Throwable throwable) { } catch (Throwable throwable) {

Datei anzeigen

@ -11,26 +11,26 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true. logic which is most likely to be true.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index faa958b79b3e6d767f009e7b8b4a6cf1296e39ac..606f3038f6c4a92cb0ae7debb97795abc70a8fb8 100644 index 4d12403d8ae7c620e169e87b0a0ab48e28251811..bb8de860d826e4c92ffdbd7ef2675458d372bbdf 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2682,6 +2682,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2753,6 +2753,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@Nullable @Nullable
public Team getTeam() { public Team getTeam() {
+ if (!this.level.paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof Player)) { return null; } // Paper + if (!this.level().paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof Player)) { return null; } // Paper
return this.level.getScoreboard().getPlayersTeam(this.getScoreboardName()); return this.level().getScoreboard().getPlayersTeam(this.getScoreboardName());
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 4dcaaa2c10966b975d612de8453af7a7f1c32b16..02b3e953f48721030d8c2b4cf82d1b93a4ccf1bf 100644 index da488c4dbf8f6c36cb7cfa64be1645be8a7e4ecf..eb0280854b9c3bda9660a99ae7355f2874660d7a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -816,6 +816,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -834,6 +834,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (nbt.contains("Team", 8)) { if (nbt.contains("Team", 8)) {
String s = nbt.getString("Team"); String s = nbt.getString("Team");
PlayerTeam scoreboardteam = this.level.getScoreboard().getPlayerTeam(s); PlayerTeam scoreboardteam = this.level().getScoreboard().getPlayerTeam(s);
+ if (!level.paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof net.minecraft.world.entity.player.Player)) { scoreboardteam = null; } // Paper + if (!this.level().paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof net.minecraft.world.entity.player.Player)) { scoreboardteam = null; } // Paper
boolean flag = scoreboardteam != null && this.level.getScoreboard().addPlayerToTeam(this.getStringUUID(), scoreboardteam); boolean flag = scoreboardteam != null && this.level().getScoreboard().addPlayerToTeam(this.getStringUUID(), scoreboardteam);
if (!flag) { if (!flag) {