Archiviert
13
0

More more more patches

Dieser Commit ist enthalten in:
Nassim Jahnke 2022-06-07 22:12:48 +02:00
Ursprung 1669c6b097
Commit cac4deb882
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
37 geänderte Dateien mit 165 neuen und 162 gelöschten Zeilen

Datei anzeigen

@ -26,10 +26,10 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad
// Paper end
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
index 9c69ea97f00791b0757db93fa9a6a5eb03577864..cebdc80d286a5daf1fdc9329dcff4f888890f91b 100644
index 75bed7319bad695331f6cc633da5eec4b1d46f9f..cc4b9c69e7ccbf202c8ead328eb273e549bd21b3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -277,6 +277,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -275,6 +275,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper start

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8eb9a96e879a28841fcc338ff5c90f86908414bc..eaa968b6d91160947235fad29d3b955b3ee149f3 100644
index a375d2d0bffc3694e76bae3f9ba13f60e629d859..bd6e22b849d6328b2fcc0244cc83a79d9ffb08c8 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2162,7 +2162,7 @@ public class ServerPlayer extends Player {
@@ -2199,7 +2199,7 @@ public class ServerPlayer extends Player {
@Override
public boolean isImmobile() {
@ -19,10 +19,10 @@ index 8eb9a96e879a28841fcc338ff5c90f86908414bc..eaa968b6d91160947235fad29d3b955b
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8a0c3a8f96ed260fa205e1395b4f8e30e563bd34..e4889e2bf90e7110f8cfef3b9eeb815b05e8e450 100644
index 71b595a293e0add1ad9f7e5c3a2694a8a16771aa..955985193a1713a6a938c6b8879a85fd329a89ab 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2846,7 +2846,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -3036,7 +3036,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}
public final boolean isDisconnected() {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Firework API's
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
index c424c33fb708aa563e98c7c3dcd3f59b5a3f9607..5a062a19bb2fc427c9391bb4731f071719b72c52 100644
index 4abcdc515411372006ff5d33510bdd64092c186a..5406925cd66f46ab8744123c670d72cea7bfc3a1 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
@@ -39,6 +39,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
@ -42,10 +42,10 @@ index c424c33fb708aa563e98c7c3dcd3f59b5a3f9607..5a062a19bb2fc427c9391bb4731f0717
@Override
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
index 77249825f3d29cdde19d0562caaa95ab862fad54..1ec3fd560a2b6528040bca68be4a05c9a8435ae9 100644
index 17b797a036ac0f58b58f627dc61ac503c8f321db..d86ec8c4c1c3e7974463a545d80ed9744de0fbbb 100644
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
@@ -222,6 +222,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {
@@ -220,6 +220,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {
if (flag1) {
object = new FireworkRocketEntity(world, projectile, shooter, shooter.getX(), shooter.getEyeY() - 0.15000000596046448D, shooter.getZ(), true);
@ -54,10 +54,10 @@ index 77249825f3d29cdde19d0562caaa95ab862fad54..1ec3fd560a2b6528040bca68be4a05c9
object = CrossbowItem.getArrow(world, shooter, crossbow, projectile);
if (creative || simulated != 0.0F) {
diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
index 409b3c50b87cafba69259ab2232ef607bfce755a..10385dcb851bb435821afba322ed11f59e7ad3e6 100644
index cdf35c5873f68245891241c0efa3bcf5658c3f6d..766af1f45b14654d3655a06ae0bfb0d4cfbdff7a 100644
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
@@ -46,6 +46,7 @@ public class FireworkRocketItem extends Item {
@@ -44,6 +44,7 @@ public class FireworkRocketItem extends Item {
Vec3 vec3 = context.getClickLocation();
Direction direction = context.getClickedFace();
FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(level, context.getPlayer(), vec3.x + (double)direction.getStepX() * 0.15D, vec3.y + (double)direction.getStepY() * 0.15D, vec3.z + (double)direction.getStepZ() * 0.15D, itemStack);
@ -65,7 +65,7 @@ index 409b3c50b87cafba69259ab2232ef607bfce755a..10385dcb851bb435821afba322ed11f5
level.addFreshEntity(fireworkRocketEntity);
itemStack.shrink(1);
}
@@ -59,6 +60,7 @@ public class FireworkRocketItem extends Item {
@@ -57,6 +58,7 @@ public class FireworkRocketItem extends Item {
ItemStack itemStack = user.getItemInHand(hand);
if (!world.isClientSide) {
FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(world, itemStack, user);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent
Allows you to access the Gateway being used in a teleport event
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
index 5b6b827db29756b2db0aaa26c84ddb4bccaade19..d336cf8f845a4d35a2d0a4cbe3b1b373fb00a970 100644
index 0a792513ac71df24aa8ea4e5d47caad07c22c65e..8a65d379a67630967d07d97fdc528838453763a9 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
@@ -12,6 +12,7 @@ import net.minecraft.data.worldgen.features.EndFeatures;
@@ -11,6 +11,7 @@ import net.minecraft.data.worldgen.features.EndFeatures;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtUtils;
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;

Datei anzeigen

@ -7,23 +7,23 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 567cc347af00eed98fdf8832ef6c9468332b94e4..d22b7edc9ddea765c11e82346afd3942e37831de 100644
index b28fc4cf5deb543e78b91547c1ab7e1ab9e6f0e4..4aea5e937e2e0e272e5aeb4e6b9ed750064f3828 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -110,7 +110,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -112,7 +112,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public static final int TICKS_PER_DAY = 24000;
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
- protected final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList();
+ protected final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList(); public final int getTotalTileEntityTickers() { return this.blockEntityTickers.size(); } // Paper
protected final NeighborUpdater neighborUpdater;
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
private boolean tickingBlockEntities;
public final Thread thread;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index be8b7170f3746e53985286066138781099930934..982b6dabf2aa8ac79596a235ffff1be948492b72 100644
index cf9c2456004ce5fc0e38da33251f66df0b3fdd51..40fc1c194dbb0d9d407204acf7ca84a65f2814c0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -145,6 +145,57 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -146,6 +146,57 @@ public class CraftWorld extends CraftRegionAccessor implements World {
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers

Datei anzeigen

@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 3d3e647fbfbb8007b6e7dc87808d63ca4465fc21..c6dd833e5cc503d6b24fbbdf4a1a8be16200717b 100644
index e0b279d9437b30ca4a18a3036bf59664570a746f..5e6e4017f1ed84dbf5060f8d789f3cd766d9e0d2 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1036,11 +1036,13 @@ public abstract class PlayerList {
@@ -1040,11 +1040,13 @@ public abstract class PlayerList {
}
public void saveAll() {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 20863d4294ab29c8ad851a50d03200e498843399..74a5b29ee48964aef9587939ecb3a66f52f658b5 100644
index 1c74d8f3b432afb9bcc71d87d86cb977d30ecbb7..63a6ac09569729d8f9810f339db76d55b1440a0f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2234,6 +2234,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2282,6 +2282,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
protected boolean addPassenger(Entity entity) { // CraftBukkit

Datei anzeigen

@ -8,10 +8,10 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 5a041f178184550a5b839bfa45fa271816e52e3d..c0f712fd4dd57080044341c7c7c8faf09572c2c5 100644
index cd3b4c97374d44f5a0e710e03f4ac38938757e25..b18bb06caf5f034dffbb72120c8f21da482ae3df 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -426,7 +426,7 @@ public class ServerPlayerGameMode {
@@ -419,7 +419,7 @@ public class ServerPlayerGameMode {
// Drop event experience
if (flag && event != null) {
@ -129,10 +129,10 @@ index b3433ce9c722bdab81848a6c2d121ca510c48509..227aca795efc99c4f81dfb30c00d31d2
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index fdf44f109d548d36d84e77fce5aa7fce865448dd..27ba3a28c18b0af18eb20a7441f361a46700a4bd 100644
index 7a4996d720cc093f5c4b72356f20fc316cf9c533..8e6c9fb5eb58c20b97141551b2514c004eb4cedb 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1700,7 +1700,8 @@ public abstract class LivingEntity extends Entity {
@@ -1723,7 +1723,8 @@ public abstract class LivingEntity extends Entity {
protected void dropExperience() {
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
if (true) {
@ -143,10 +143,10 @@ index fdf44f109d548d36d84e77fce5aa7fce865448dd..27ba3a28c18b0af18eb20a7441f361a4
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
index da3a30445f8a011ca6803f8d11641a68c1f6c46c..3f57ad6cbf29ebe1ac3781368c4f57efc9640aa4 100644
index 3cdd7180a41b87caa942d2b3436ba90726686ecb..6216513805add7c8f52e1ed6c77e2d26786b3ab5 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
@@ -265,7 +265,7 @@ public abstract class Animal extends AgeableMob {
@@ -262,7 +262,7 @@ public abstract class Animal extends AgeableMob {
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
// CraftBukkit start - use event experience
if (experience > 0) {
@ -156,10 +156,10 @@ index da3a30445f8a011ca6803f8d11641a68c1f6c46c..3f57ad6cbf29ebe1ac3781368c4f57ef
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
index 483703458a374a27a1e30ea1fb1f08ec451046a7..6ffd1aec3563e92f5d5975d3fb4d3d89feec1416 100644
index 113b31a5a0247abc436d04ba2fe03cb41ca86f15..fb3b42611d8386b110ea079094d5d50fefceac1a 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -890,7 +890,7 @@ public class Fox extends Animal {
@@ -892,7 +892,7 @@ public class Fox extends Animal {
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
// CraftBukkit start - use event experience
if (experience > 0) {
@ -169,23 +169,23 @@ index 483703458a374a27a1e30ea1fb1f08ec451046a7..6ffd1aec3563e92f5d5975d3fb4d3d89
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
index 6af8773e80351f14204b969d7bbdd976b39e99d7..ea1bb6924043dfd05452b793afd7651c867de5dc 100644
index 7c90063be2a7eb66b7f0981059018f20413256c6..37125ffe47fcd5fe93ab62ad8a46e8188f362436 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
@@ -450,7 +450,7 @@ public class Turtle extends Animal {
Random random = this.animal.getRandom();
@@ -448,7 +448,7 @@ public class Turtle extends Animal {
RandomSource randomsource = this.animal.getRandom();
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
- this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), random.nextInt(7) + 1));
+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), random.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper;
- this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), randomsource.nextInt(7) + 1));
+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), randomsource.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper;
}
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 89bd094fc31969284d831eaab47a131914d4fb13..139c98ab86589027873418601dbc7f4ed6358906 100644
index 7b64b14b1d2c0e242a5d8e8602e49b185fcf8839..dc2e57bfc5e85c9ef548cb895b3fcd1c09c4dacb 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -631,7 +631,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -627,7 +627,7 @@ public class EnderDragon extends Mob implements Enemy {
if (this.level instanceof ServerLevel) {
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && flag) {
@ -194,7 +194,7 @@ index 89bd094fc31969284d831eaab47a131914d4fb13..139c98ab86589027873418601dbc7f4e
}
if (this.dragonDeathTime == 1 && !this.isSilent()) {
@@ -662,7 +662,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -658,7 +658,7 @@ public class EnderDragon extends Mob implements Enemy {
this.yBodyRot = this.getYRot();
if (this.dragonDeathTime == 200 && this.level instanceof ServerLevel) {
if (flag) {
@ -204,7 +204,7 @@ index 89bd094fc31969284d831eaab47a131914d4fb13..139c98ab86589027873418601dbc7f4e
if (this.dragonFight != null) {
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index 32a961075b41cd84b24398b9d1a4d58f88439d73..ac44ba98d0acc9aa2a75088d8a9a145fdbcbd911 100644
index 33d1a6b31afec4dbeb00dcabf50c5840852102d6..25cd8a4101cf44955d95924c9794c238ddde2901 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -624,7 +624,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@ -230,7 +230,7 @@ index b9a0fc52460ce0c50deea25112dee20c977e99c5..d7cb3d8b37f225ee4796246aa907da10
}
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 34ee9c22ed5bca2406588a4b6a045bbc51c64920..ce43f33ffd8726d3fb592348ac1b10f37645eb0e 100644
index 91fde59289100133a4f473bee176ff1b6805faae..d9256fe99309b7d085b2cc64c770cfcb61e3ef54 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -513,7 +513,7 @@ public class FishingHook extends Projectile {
@ -269,10 +269,10 @@ index dbdba510d8ff3c622ed928151cf525cfd1d1b1b5..aa0ba9c7dcb0ee81c9081031c447eeab
world.levelEvent(1042, blockposition, 0);
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index 54125cf5957f8165551e077c47d02b7daa578efb..59a8d1984f3bcc94048a4ce3e530d21cc3f39d7f 100644
index 60c5d4c97a340120f49f51b3d1dc7e6f2a19a936..0422e389e5b9577417d09490a15584ed5b885209 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -374,8 +374,13 @@ public class Block extends BlockBehaviour implements ItemLike {
@@ -376,8 +376,13 @@ public class Block extends BlockBehaviour implements ItemLike {
}
public void popExperience(ServerLevel world, BlockPos pos, int size) {
@ -288,10 +288,10 @@ index 54125cf5957f8165551e077c47d02b7daa578efb..59a8d1984f3bcc94048a4ce3e530d21c
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index b44216c8f5a938a92fda4156ac67988d1c399c99..c3c53a34f645a834256c31951e465ae33aa1a9ff 100644
index e90fa66b4716f55844818a2770d9e02d68658e46..bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -629,7 +629,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@@ -642,7 +642,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
j = event.getExpToDrop();
// CraftBukkit end
@ -301,10 +301,10 @@ index b44216c8f5a938a92fda4156ac67988d1c399c99..c3c53a34f645a834256c31951e465ae3
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 67223f63fdad5c53008c51b774917882c83ab707..8fb3e18303abbedb9c07319d11619c39743cbaf8 100644
index e1f478359d959157f60b866ab59bba3b5b16521c..c4f8d2c090e3cde562a2ab6103da53ded666599b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -884,7 +884,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
@@ -909,7 +909,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
entity = new PrimedTnt(world, x, y, z, null);
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) {

Datei anzeigen

@ -27,10 +27,10 @@ index 8451982ba4fc9522f2d77f68fc63a0e12558955f..ee8ce0e5bdb0acb7d6ef3439a388e108
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 74a5b29ee48964aef9587939ecb3a66f52f658b5..336f6209089d3f076bfdd332bfc80d69509ca209 100644
index 63a6ac09569729d8f9810f339db76d55b1440a0f..8af99a4b7a1e834782dd7dd9ca53263f9e90e6d0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -317,6 +317,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -338,6 +338,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public void inactiveTick() { }
// Spigot end
// Paper start
@ -39,10 +39,10 @@ index 74a5b29ee48964aef9587939ecb3a66f52f658b5..336f6209089d3f076bfdd332bfc80d69
private org.bukkit.util.Vector origin;
@javax.annotation.Nullable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 27ba3a28c18b0af18eb20a7441f361a46700a4bd..a7e09145160f9c26b19a8d61564bf9c04e2616b1 100644
index 8e6c9fb5eb58c20b97141551b2514c004eb4cedb..2eed84529ad9a34ae88c4f37f2b0c7943f51b0ad 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3228,8 +3228,11 @@ public abstract class LivingEntity extends Entity {
@@ -3261,8 +3261,11 @@ public abstract class LivingEntity extends Entity {
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Do not let armorstands drown
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index a82503bc791b5b01e509b333e9d5baa7abbb60b8..138422903dcb3056cd011a72e0625a1a225b4280 100644
index def35ca400cb315a9eea035026412b69ec51b1a8..ed698f3e3f9ed6003fe621c5f6f7e3a151a1a559 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -935,5 +935,12 @@ public class ArmorStand extends LivingEntity {
@@ -934,5 +934,12 @@ public class ArmorStand extends LivingEntity {
super.move(type, movement);
}
}

Datei anzeigen

@ -5,20 +5,19 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index fb8d50dc14e1d23001e184b425bc6ac2f8b0f37e..f5cf71258732aa040443eb82e09ab28f130e4c79 100644
index 8b11fbfe2805ad7e8ba84e6b7fdfafc054a248bd..943cad9a08d72b90b92f92ef90588501bbf158d5 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -226,8 +226,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -231,7 +231,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.entityMap = new Int2ObjectOpenHashMap();
this.chunkTypeCache = new Long2ByteOpenHashMap();
this.chunkSaveCooldowns = new Long2LongOpenHashMap();
- this.unloadQueue = Queues.newConcurrentLinkedQueue();
this.structureManager = structureManager;
+ this.unloadQueue = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Paper - need constant-time size()
this.structureTemplateManager = structureTemplateManager;
Path path = session.getDimensionPath(world.dimension());
this.storageName = path.getFileName().toString();
@@ -564,7 +564,6 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -581,7 +581,6 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private void processUnloads(BooleanSupplier shouldKeepTicking) {
LongIterator longiterator = this.toDrop.iterator();
@ -26,7 +25,7 @@ index fb8d50dc14e1d23001e184b425bc6ac2f8b0f37e..f5cf71258732aa040443eb82e09ab28f
for (int i = 0; longiterator.hasNext() && (shouldKeepTicking.getAsBoolean() || i < 200 || this.toDrop.size() > 2000); longiterator.remove()) {
long j = longiterator.nextLong();
ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j);
@@ -577,7 +576,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -594,7 +593,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
}

Datei anzeigen

@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 49c354fa65e0047a367f0a5410c79b8da8693df9..aa02ab4ea7890d9a477be55ce6c0be0a2a0d4b52 100644
index 9e5271d39e4a15a71c59a8560edd59c75ec6dd52..b2dfce9bb43360e1c405d32f255ef16e00d31b32 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -229,6 +229,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -220,6 +220,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final Map<ResourceKey<Level>, ServerLevel> levels;
private PlayerList playerList;
private volatile boolean running;
@ -41,7 +41,7 @@ index 49c354fa65e0047a367f0a5410c79b8da8693df9..aa02ab4ea7890d9a477be55ce6c0be0a
private boolean stopped;
private int tickCount;
protected final Proxy proxy;
@@ -924,7 +925,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -881,7 +882,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players");
this.playerList.saveAll();
@ -50,7 +50,7 @@ index 49c354fa65e0047a367f0a5410c79b8da8693df9..aa02ab4ea7890d9a477be55ce6c0be0a
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
@@ -1004,6 +1005,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -961,6 +962,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void halt(boolean flag) {
@ -64,10 +64,10 @@ index 49c354fa65e0047a367f0a5410c79b8da8693df9..aa02ab4ea7890d9a477be55ce6c0be0a
if (flag) {
try {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index c6dd833e5cc503d6b24fbbdf4a1a8be16200717b..17afebfc2091392c5ec9aa9f6734ff71d67c9dac 100644
index 5e6e4017f1ed84dbf5060f8d789f3cd766d9e0d2..b477f31ac8313e8f4c1f288fc0cf6bc2544c1f28 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1147,8 +1147,15 @@ public abstract class PlayerList {
@@ -1151,8 +1151,15 @@ public abstract class PlayerList {
}
public void removeAll() {

Datei anzeigen

@ -26,10 +26,10 @@ index ee8ce0e5bdb0acb7d6ef3439a388e108ea1807de..aa8a02c9fab8938e8064a60f1faf5421
+ }
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e4889e2bf90e7110f8cfef3b9eeb815b05e8e450..72395ede1fe2570fb5bd463ddff191fc50b98191 100644
index 955985193a1713a6a938c6b8879a85fd329a89ab..b50ca694f827b60ab6ae4b91772774b6fef55734 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2070,6 +2070,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -2258,6 +2258,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
switch (packet.getAction()) {
case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true);
@ -44,10 +44,10 @@ index e4889e2bf90e7110f8cfef3b9eeb815b05e8e450..72395ede1fe2570fb5bd463ddff191fc
case RELEASE_SHIFT_KEY:
this.player.setShiftKeyDown(false);
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 df753a2d39332464f16207615175bc95d35f61e8..fe715c81ea755f83fae0020e66f5e61304c51867 100644
index 22291d7b8d9294bed1afdaed88040e06120b22e0..d83e9df66a3ff86ea1ef78f22da9bc7dbcb5e19a 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -578,7 +578,7 @@ public abstract class Player extends LivingEntity {
@@ -589,7 +589,7 @@ public abstract class Player extends LivingEntity {
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {

Datei anzeigen

@ -20,10 +20,10 @@ index 2440e81ef23c3b8c91ca5bdf13347f13cb66f549..2a4aacd2461401a109d749eee2628133
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f3024dcf7d29359931af1a2d00aa429a75e449a1..c8d7a4d917ac9534309dfcc2c2448e720ed6a7a5 100644
index ae1cfe01f285a773ab9d4bdb9b0dd897615f0b82..2d4292fa7e474d81ce974cfeda0cf56a2b5a19f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2566,5 +2566,10 @@ public final class CraftServer implements Server {
@@ -2549,5 +2549,10 @@ public final class CraftServer implements Server {
commandMap.registerServerAliases();
return true;
}

Datei anzeigen

@ -19,7 +19,7 @@ Other changes:
configuration
diff --git a/build.gradle.kts b/build.gradle.kts
index 9af9165b900d18baffb736b7105409210717ccef..1a07dccd90d1748d766343c427484ecf23049e9c 100644
index eef372c7f0a7fc057ee6d642f220ed0ecdd81ac0..0b5628ddf2332d12fc3d44bb32323a513c7240f2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,17 @@ plugins {
@ -39,8 +39,8 @@ index 9af9165b900d18baffb736b7105409210717ccef..1a07dccd90d1748d766343c427484ecf
+ runtimeOnly("org.apache.logging.log4j:log4j-core:2.14.1")
+ // Paper end
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
implementation("org.ow2.asm:asm:9.2")
implementation("org.ow2.asm:asm-commons:9.2") // Paper - ASM event executor generation
implementation("org.ow2.asm:asm:9.3")
implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
new file mode 100644
index 0000000000000000000000000000000000000000..a4070b59e261f0f1ac4beec47b11492f4724bf27
@ -112,19 +112,23 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index aa02ab4ea7890d9a477be55ce6c0be0a2a0d4b52..22c4598e00d1a27d86584e7bfcbb73038f2f2c1a 100644
index b2dfce9bb43360e1c405d32f255ef16e00d31b32..f67392be663dd558ce6458dc210c6ac90538d9e5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -169,7 +169,7 @@ import org.slf4j.Logger;
@@ -157,8 +157,12 @@ import org.slf4j.Logger;
// CraftBukkit start
import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Lifecycle;
-import jline.console.ConsoleReader;
+<<<<<<< HEAD
import java.util.Random;
import jline.console.ConsoleReader;
+=======
+// import jline.console.ConsoleReader; // Paper
+>>>>>>> Use TerminalConsoleAppender for console improvements
import joptsimple.OptionSet;
import net.minecraft.server.bossevents.CustomBossEvents;
import net.minecraft.server.dedicated.DedicatedServer;
@@ -284,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -269,7 +273,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public OptionSet options;
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
@ -133,7 +137,7 @@ index aa02ab4ea7890d9a477be55ce6c0be0a2a0d4b52..22c4598e00d1a27d86584e7bfcbb7303
public static int currentTick = 0; // Paper - Further improve tick loop
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
@@ -367,7 +367,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -352,7 +356,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.datapackconfiguration = datapackconfiguration;
this.registryreadops = registryreadops;
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
@ -143,7 +147,7 @@ index aa02ab4ea7890d9a477be55ce6c0be0a2a0d4b52..22c4598e00d1a27d86584e7bfcbb7303
if (System.console() == null && System.getProperty("jline.terminal") == null) {
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
Main.useJline = false;
@@ -388,6 +390,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -373,6 +379,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.warn((String) null, ex);
}
}
@ -152,7 +156,7 @@ index aa02ab4ea7890d9a477be55ce6c0be0a2a0d4b52..22c4598e00d1a27d86584e7bfcbb7303
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
}
// CraftBukkit end
@@ -1181,7 +1185,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1139,7 +1147,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.doStop(); // Spigot
// CraftBukkit start - Restore terminal to original settings
try {
@ -161,20 +165,20 @@ index aa02ab4ea7890d9a477be55ce6c0be0a2a0d4b52..22c4598e00d1a27d86584e7bfcbb7303
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1595,7 +1599,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1553,7 +1561,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public void sendMessage(Component message, UUID sender) {
public void sendSystemMessage(Component message) {
- MinecraftServer.LOGGER.info(message.getString());
+ MinecraftServer.LOGGER.info(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors
}
public KeyPair getKeyPair() {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index b99c1b62ce01700d5c374a1801e8323d5906255c..39a24292f215920bc3121f4ac903040dd73a9978 100644
index 576fc01b902acaf2a217db3fb39b799f2f57ce01..7364612dfb789659f6e28d4b2e379142bd0f5ea0 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -110,6 +110,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -103,6 +103,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
if (!org.bukkit.craftbukkit.Main.useConsole) {
return;
}
@ -184,7 +188,7 @@ index b99c1b62ce01700d5c374a1801e8323d5906255c..39a24292f215920bc3121f4ac903040d
jline.console.ConsoleReader bufferedreader = reader;
// MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return
@@ -141,7 +144,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -134,7 +137,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
continue;
}
if (s.trim().length() > 0) { // Trim to filter lines which are just spaces
@ -193,7 +197,7 @@ index b99c1b62ce01700d5c374a1801e8323d5906255c..39a24292f215920bc3121f4ac903040d
}
// CraftBukkit end
}
@@ -149,6 +152,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -142,6 +145,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
}
@ -202,7 +206,7 @@ index b99c1b62ce01700d5c374a1801e8323d5906255c..39a24292f215920bc3121f4ac903040d
}
};
@@ -160,6 +165,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -153,6 +158,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler());
@ -212,7 +216,7 @@ index b99c1b62ce01700d5c374a1801e8323d5906255c..39a24292f215920bc3121f4ac903040d
final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger());
for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) {
if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) {
@@ -168,6 +176,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -161,6 +169,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start();
@ -222,10 +226,10 @@ index b99c1b62ce01700d5c374a1801e8323d5906255c..39a24292f215920bc3121f4ac903040d
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream());
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 17afebfc2091392c5ec9aa9f6734ff71d67c9dac..caf92576ed2023f721810b7dd09dd194b1cb3d8c 100644
index b477f31ac8313e8f4c1f288fc0cf6bc2544c1f28..41924db9df7d3d9df0385d3274894ef8058cf2c6 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -155,8 +155,7 @@ public abstract class PlayerList {
@@ -159,8 +159,7 @@ public abstract class PlayerList {
public PlayerList(MinecraftServer server, RegistryAccess.Frozen registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
@ -236,10 +240,10 @@ index 17afebfc2091392c5ec9aa9f6734ff71d67c9dac..caf92576ed2023f721810b7dd09dd194
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c8d7a4d917ac9534309dfcc2c2448e720ed6a7a5..933a06f998fe79eaae05bbff6af5398db0104187 100644
index 2d4292fa7e474d81ce974cfeda0cf56a2b5a19f2..565d3d16828dbd55ef3445d873398922671b16c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -45,7 +45,6 @@ import java.util.logging.Level;
@@ -44,7 +44,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import javax.imageio.ImageIO;
@ -247,7 +251,7 @@ index c8d7a4d917ac9534309dfcc2c2448e720ed6a7a5..933a06f998fe79eaae05bbff6af5398d
import net.minecraft.advancements.Advancement;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
@@ -1288,9 +1287,13 @@ public final class CraftServer implements Server {
@@ -1266,9 +1265,13 @@ public final class CraftServer implements Server {
return this.logger;
}
@ -262,7 +266,7 @@ index c8d7a4d917ac9534309dfcc2c2448e720ed6a7a5..933a06f998fe79eaae05bbff6af5398d
@Override
public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index b3d62affc6558d2c3082a75793ebd8b521eb1df6..75789a104025469fbee0d934396f65e5e47e0e41 100644
index 3f531ec9232568243a15ad1b238839b8036a2d82..95be6c63cd30ab10d5a9f2a159e9dcadff761c99 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -12,7 +12,7 @@ import java.util.logging.Level;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 3d54fa71b2d3532e93fe3636a86150e10fcba31a..09b2ac6b071fd7c55db6c940beab650ddc9d7f7e 100644
index 7827e40e824de85ae1f6ea6fc82455b2cea532cb..932f54d8a6db9455d9fd947baad0de7850ccd563 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -621,6 +621,11 @@ public abstract class Mob extends LivingEntity {
@@ -629,6 +629,11 @@ public abstract class Mob extends LivingEntity {
ItemEntity entityitem = (ItemEntity) iterator.next();
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
@ -21,7 +21,7 @@ index 3d54fa71b2d3532e93fe3636a86150e10fcba31a..09b2ac6b071fd7c55db6c940beab650d
}
}
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 4ddeed2e685c1239a4596b7996adbb8168a1537c..d0dcdb5dcce9aac8c404f94c1ec27d600b59f1b5 100644
index 5a3b0ceb77d6a4c7d8da5ab93ddb1b3b4452027f..ab34a42c33a828d610a5732381487a6a1a64f801 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -52,6 +52,7 @@ public class ItemEntity extends Entity {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index d0dcdb5dcce9aac8c404f94c1ec27d600b59f1b5..101e1b62a1aa45cbb6bfe7d4adf995f2f890ea34 100644
index ab34a42c33a828d610a5732381487a6a1a64f801..c9aa79cd6846ea8b04ad0c77fbf5aff3ce216505 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -380,6 +380,7 @@ public class ItemEntity extends Entity {
@@ -390,6 +390,7 @@ public class ItemEntity extends Entity {
// CraftBukkit start - fire PlayerPickupItemEvent
int canHold = player.getInventory().canHold(itemstack);
int remaining = i - canHold;
@ -16,7 +16,7 @@ index d0dcdb5dcce9aac8c404f94c1ec27d600b59f1b5..101e1b62a1aa45cbb6bfe7d4adf995f2
if (this.pickupDelay <= 0 && canHold > 0) {
itemstack.setCount(canHold);
@@ -387,8 +388,14 @@ public class ItemEntity extends Entity {
@@ -397,8 +398,14 @@ public class ItemEntity extends Entity {
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
this.level.getCraftServer().getPluginManager().callEvent(playerEvent);
@ -31,7 +31,7 @@ index d0dcdb5dcce9aac8c404f94c1ec27d600b59f1b5..101e1b62a1aa45cbb6bfe7d4adf995f2
return;
}
@@ -418,7 +425,11 @@ public class ItemEntity extends Entity {
@@ -428,7 +435,11 @@ public class ItemEntity extends Entity {
// CraftBukkit end
if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(player.getUUID())) && player.getInventory().add(itemstack)) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 101e1b62a1aa45cbb6bfe7d4adf995f2f890ea34..430809523d02801088c247e11bce351a99b8bc05 100644
index c9aa79cd6846ea8b04ad0c77fbf5aff3ce216505..a0b27bdeabcabd0bd07b1b495105f9b6af998092 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -36,6 +36,7 @@ import net.minecraft.util.Mth;
@ -16,7 +16,7 @@ index 101e1b62a1aa45cbb6bfe7d4adf995f2f890ea34..430809523d02801088c247e11bce351a
public class ItemEntity extends Entity {
@@ -382,6 +383,22 @@ public class ItemEntity extends Entity {
@@ -392,6 +393,22 @@ public class ItemEntity extends Entity {
int remaining = i - canHold;
boolean flyAtPlayer = false; // Paper

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add UnknownCommandEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 933a06f998fe79eaae05bbff6af5398db0104187..7fd1a8bb05e0e25711bf2986a0b8c7f82c20e072 100644
index 565d3d16828dbd55ef3445d873398922671b16c2..9c522e7aa2f374543090cff7a49d06a7c15e450d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -886,7 +886,13 @@ public final class CraftServer implements Server {
@@ -881,7 +881,13 @@ public final class CraftServer implements Server {
// Spigot start
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {

Datei anzeigen

@ -586,20 +586,20 @@ index 9f292deee1b793d52b5774304318e940128d1e26..0cf818fceddd76e7704fdc6625456787
* Calculates distance between 2 entities
* @param e1
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index b49528d8a2c577def4f74ee694ffd53b481acb32..8f5784ed4df46f3c7d4c6b4ff76ad839d436be1f 100644
index 97dc1d188a57b9f499c9cdc2ec54535af380e5cb..455a8d824540c66cf50b6440000b807bc1c71025 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -138,7 +138,7 @@ public class Main {
@@ -139,7 +139,7 @@ public class Main {
}
File file = (File) optionset.valueOf("universe"); // CraftBukkit
- YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY);
+ YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY); // Paper
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
GameProfileCache usercache = new GameProfileCache(gameprofilerepository, new File(file, MinecraftServer.USERID_CACHE_FILE.getName()));
- Services services = Services.create(new YggdrasilAuthenticationService(Proxy.NO_PROXY), file);
+ Services services = Services.create(new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY), file); // Paper
// CraftBukkit start
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index c4142568c3188c89142799cc4911dd7eae32a45f..f379e108ec3c762940bddea878a0a7112f0e9746 100644
index 6087fff889458dc09d5a3eb52e7d4b0a77bde809..ddd78b2836c1f4a6b4fcd532153f5d3e17f91ea8 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -135,6 +135,17 @@ public class GameProfileCache {
@ -621,10 +621,10 @@ index c4142568c3188c89142799cc4911dd7eae32a45f..f379e108ec3c762940bddea878a0a711
String s1 = name.toLowerCase(Locale.ROOT);
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7fd1a8bb05e0e25711bf2986a0b8c7f82c20e072..c091aa6cbb541ce5349ffb183bc7d67b0c4fafeb 100644
index 9c522e7aa2f374543090cff7a49d06a7c15e450d..fbe26f8a592ed0a3b970b6f02126b6e3e454d8af 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -244,6 +244,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@@ -239,6 +239,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
@ -634,7 +634,7 @@ index 7fd1a8bb05e0e25711bf2986a0b8c7f82c20e072..c091aa6cbb541ce5349ffb183bc7d67b
public final class CraftServer implements Server {
private final String serverName = "Paper"; // Paper
private final String serverVersion;
@@ -283,6 +286,7 @@ public final class CraftServer implements Server {
@@ -278,6 +281,7 @@ public final class CraftServer implements Server {
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
@ -642,7 +642,7 @@ index 7fd1a8bb05e0e25711bf2986a0b8c7f82c20e072..c091aa6cbb541ce5349ffb183bc7d67b
CraftItemFactory.instance();
}
@@ -2580,5 +2584,37 @@ public final class CraftServer implements Server {
@@ -2563,5 +2567,37 @@ public final class CraftServer implements Server {
public boolean suggestPlayerNamesWhenNullTabCompletions() {
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
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 fe715c81ea755f83fae0020e66f5e61304c51867..7fc4cd29bd487955886c81e6997d832a3185ec8e 100644
index d83e9df66a3ff86ea1ef78f22da9bc7dbcb5e19a..b876bbb08c868bc6984a395b84b0c0aaf1666912 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1971,20 +1971,44 @@ public abstract class Player extends LivingEntity {
@@ -2028,20 +2028,44 @@ public abstract class Player extends LivingEntity {
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Block player logins during server shutdown
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 58ef6874cd6c90e6ccc7c39881cc3bf68fba284b..03dc5ae09c46ad7be8e444211728a8418f594733 100644
index 13f8f3a2a6382ef51567cc6f46b573d971f700f6..dc932515bada7f84a386827f3b7e1e8f69bd7159 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -68,6 +68,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -79,6 +79,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
}
public void tick() {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 336f6209089d3f076bfdd332bfc80d69509ca209..5d6ff0810b3939217e8bd54a88815809e8beff76 100644
index 8af99a4b7a1e834782dd7dd9ca53263f9e90e6d0..44bcf4477ab7b6ee231a774fb2e03544af9305c3 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -318,6 +318,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -339,6 +339,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
// Spigot end
// Paper start
protected int numCollisions = 0; // Paper
@ -16,7 +16,7 @@ index 336f6209089d3f076bfdd332bfc80d69509ca209..5d6ff0810b3939217e8bd54a88815809
@javax.annotation.Nullable
private org.bukkit.util.Vector origin;
@javax.annotation.Nullable
@@ -1871,6 +1872,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1919,6 +1920,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -27,7 +27,7 @@ index 336f6209089d3f076bfdd332bfc80d69509ca209..5d6ff0810b3939217e8bd54a88815809
// Paper end
return nbt;
} catch (Throwable throwable) {
@@ -2008,6 +2013,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2056,6 +2061,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.originWorld = originWorld;
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
}
@ -37,10 +37,10 @@ index 336f6209089d3f076bfdd332bfc80d69509ca209..5d6ff0810b3939217e8bd54a88815809
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 6aab3df317a9612da9b83284aa6056f0c7cf436c..38abf49a86b0d33c6069c6a2b95edeb6c7019eb4 100644
index 5bc0071c5309548219cbcd902d7020ff4a5ca6b7..54701d5cd45c119884f8e55f074792fb846687a7 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -157,6 +157,7 @@ public abstract class BaseSpawner {
@@ -159,6 +159,7 @@ public abstract class BaseSpawner {
}
// Spigot End
}
@ -49,10 +49,10 @@ index 6aab3df317a9612da9b83284aa6056f0c7cf436c..38abf49a86b0d33c6069c6a2b95edeb6
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
Entity vehicle = entity.getVehicle();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 1e0b8314ef388763aa43055909e48778f0d421a3..5cc9370d31434f28730a44263e013e474413d534 100644
index bbd87aaedba4ff034678e17b2c377dbdbce02c57..e8922397c26617e8051ddfe6d80667b5c1041032 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1200,5 +1200,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1212,5 +1212,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
//noinspection ConstantConditions
return originVector.toLocation(world);
}

Datei anzeigen

@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
to ensure it meets latest minecraft expectations.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index f4e909ca1a8518d697acabca298c387b4bde7542..391ca897138f54cd86c16a797f17ca4324da9d50 100644
index a06f9775a43a245380edabde63e7999082e7958a..5f83838f3f40b778088187904b747abff703c3f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -380,5 +380,11 @@ public final class CraftItemFactory implements ItemFactory {
@@ -386,5 +386,11 @@ public final class CraftItemFactory implements ItemFactory {
public net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component displayName(@org.jetbrains.annotations.NotNull ItemStack itemStack) {
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
}

Datei anzeigen

@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 391ca897138f54cd86c16a797f17ca4324da9d50..0c210a527ef1b7efd1c80e2368203ab069047363 100644
index 5f83838f3f40b778088187904b747abff703c3f2..f05923a6292f02a01791627abce2770daff24b6a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -386,5 +386,18 @@ public final class CraftItemFactory implements ItemFactory {
@@ -392,5 +392,18 @@ public final class CraftItemFactory implements ItemFactory {
public ItemStack ensureServerConversions(ItemStack item) {
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
}

Datei anzeigen

@ -5,23 +5,23 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index caf92576ed2023f721810b7dd09dd194b1cb3d8c..2b7a9e6a5098aabbe62ea74c1f4eb5a9e5111e19 100644
index 41924db9df7d3d9df0385d3274894ef8058cf2c6..a9821199bd953ad5d16ed663f367556b099e999a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -615,9 +615,9 @@ public abstract class PlayerList {
@@ -619,9 +619,9 @@ public abstract class PlayerList {
// return chatmessage;
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(chatmessage)); // Paper - Adventure
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
- } else if (!this.isWhiteListed(gameprofile)) {
- chatmessage = new TranslatableComponent("multiplayer.disconnect.not_whitelisted");
- ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted");
- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure
+ } else if (!this.isWhitelisted(gameprofile, event)) { // Paper
+ //chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); // Paper
+ //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted
+ } else if (!this.isWhiteListed(gameprofile, event)) { // Paper
+ //ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper
+ //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
@@ -998,9 +998,25 @@ public abstract class PlayerList {
@@ -1002,9 +1002,25 @@ public abstract class PlayerList {
this.server.getCommands().sendCommands(player);
}
@ -29,7 +29,7 @@ index caf92576ed2023f721810b7dd09dd194b1cb3d8c..2b7a9e6a5098aabbe62ea74c1f4eb5a9
public boolean isWhiteListed(GameProfile profile) {
- return !this.doWhiteList || this.ops.contains(profile) || this.whitelist.contains(profile);
+ return isWhitelisted(profile, null);
}
+ }
+ public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
+ boolean isOp = this.ops.contains(gameprofile);
+ boolean isWhitelisted = !this.doWhiteList || isOp || this.whitelist.contains(gameprofile);
@ -43,7 +43,7 @@ index caf92576ed2023f721810b7dd09dd194b1cb3d8c..2b7a9e6a5098aabbe62ea74c1f4eb5a9
+ return false;
+ }
+ return true;
+ }
}
+ // Paper end
public boolean isOp(GameProfile profile) {

Datei anzeigen

@ -9,10 +9,10 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa
and to provide some level of hint without being disruptive.
diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java
index 9f23951f6b4c17c2a968fdcb3e8f9f65c296f34a..248b7ca7dbd75d4eab52fb937cace2b2d9ee3467 100644
index e359919de57f97d18667df1b2f1bf54a19a49c2f..813bf8974d0c565f8f4ba255902276156288c0f1 100644
--- a/src/main/java/net/minecraft/server/Bootstrap.java
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
@@ -47,7 +47,7 @@ public class Bootstrap {
@@ -46,7 +46,7 @@ public class Bootstrap {
public static void bootStrap() {
if (!Bootstrap.isBootstrapped) {
// CraftBukkit start
@ -21,7 +21,7 @@ index 9f23951f6b4c17c2a968fdcb3e8f9f65c296f34a..248b7ca7dbd75d4eab52fb937cace2b2
switch (name) {
case "DispenserRegistry":
break;
@@ -61,7 +61,7 @@ public class Bootstrap {
@@ -60,7 +60,7 @@ public class Bootstrap {
System.err.println("*** WARNING: This server jar is unsupported, use at your own risk. ***");
System.err.println("**********************************************************************");
break;
@ -31,12 +31,12 @@ index 9f23951f6b4c17c2a968fdcb3e8f9f65c296f34a..248b7ca7dbd75d4eab52fb937cace2b2
Bootstrap.isBootstrapped = true;
if (Registry.REGISTRY.keySet().isEmpty()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 75789a104025469fbee0d934396f65e5e47e0e41..ee9f7f42a0eeb3c6f9930e227eeda26ba362e7f4 100644
index 95be6c63cd30ab10d5a9f2a159e9dcadff761c99..96c18080e663c055508e0798edb545dcecebc804 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -234,10 +234,12 @@ public class Main {
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -21);
deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) {
- System.err.println("*** Error, this build is outdated ***");
+ // Paper start - This is some stupid bullshit

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
index e77ca38bc6accf5c7a569a7144d02cadbb02d78a..fc2c18a3bfd395882a5f4a08c23b382845d9ccd2 100644
index 4b9e3729279f3bfabab4227c511c4bf89488ff8c..6a459435493295ee5bb44fe2ba79cba6acea2e35 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Reset spawner timer when spawner event is cancelled
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 38abf49a86b0d33c6069c6a2b95edeb6c7019eb4..5bf68b03ddfc7c9554c467e2c0588084a796f6fa 100644
index 54701d5cd45c119884f8e55f074792fb846687a7..c104ea31c63fab8f23b4db71ba6e664f710e0bee 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -158,6 +158,7 @@ public abstract class BaseSpawner {
@@ -160,6 +160,7 @@ public abstract class BaseSpawner {
// Spigot End
}
entity.spawnedViaMobSpawner = true; // Paper
@ -16,7 +16,7 @@ index 38abf49a86b0d33c6069c6a2b95edeb6c7019eb4..5bf68b03ddfc7c9554c467e2c0588084
// Spigot Start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
Entity vehicle = entity.getVehicle();
@@ -181,7 +182,7 @@ public abstract class BaseSpawner {
@@ -184,7 +185,7 @@ public abstract class BaseSpawner {
((Mob) entity).spawnAnim();
}

Datei anzeigen

@ -27,17 +27,17 @@ index 2a4aacd2461401a109d749eee262813367fe4a70..a8de81b1a153525b2d0d6b01802b7733
+ }
}
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 03dc5ae09c46ad7be8e444211728a8418f594733..6834c67b38f0679497bef4b2174817d9688cbbd8 100644
index dc932515bada7f84a386827f3b7e1e8f69bd7159..6d015b226ea32f9d658ca9674b9500494c837949 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -304,6 +304,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -358,6 +358,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
ServerLoginPacketListenerImpl.this.gameProfile = ServerLoginPacketListenerImpl.this.createFakeProfile(gameprofile);
ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
} else {
+ // Paper start
+ if (com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage != null) {
+ ServerLoginPacketListenerImpl.this.disconnect(new TextComponent(com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage));
+ } else // Paper end
ServerLoginPacketListenerImpl.this.disconnect(new TranslatableComponent("multiplayer.disconnect.authservers_down"));
+ // Paper start
+ if (com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage != null) {
+ ServerLoginPacketListenerImpl.this.disconnect(Component.literal(com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage));
+ } else // Paper end
ServerLoginPacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.authservers_down"));
ServerLoginPacketListenerImpl.LOGGER.error("Couldn't verify username because servers are unavailable");
}

Datei anzeigen

@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
the plugin logger.
diff --git a/build.gradle.kts b/build.gradle.kts
index 1a07dccd90d1748d766343c427484ecf23049e9c..244529d90f0d98cff31743e8934ba63c41ffd1a2 100644
index 0b5628ddf2332d12fc3d44bb32323a513c7240f2..e1cc5d05d9826ce897e5c2f71ddfe4811c010c38 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -17,7 +17,7 @@ dependencies {
@ -26,7 +26,7 @@ index 1a07dccd90d1748d766343c427484ecf23049e9c..244529d90f0d98cff31743e8934ba63c
+ implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
// Paper end
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
implementation("org.ow2.asm:asm:9.2")
implementation("org.ow2.asm:asm:9.3")
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 9d3d65de7cb0be25aa7fc40353390280943b55f4..cd5add5a38919dfcf7510758b2d3e2f7c40c18fd 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java