geforkt von Mirrors/Paper
almost halfway done with server patches
Dieser Commit ist enthalten in:
Ursprung
24fd5aea0c
Commit
a62835bbb1
@ -5,10 +5,10 @@ Subject: [PATCH] Update itemstack legacy name and lore
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 0caf3eeb7984e842f7a0bdfed3021d0b231a0dd0..ee274fb9c8292a807e438902cc5d7f49c30d6627 100644
|
||||
index 77db59d433d4189f96b9da006898bded5edbb0ba..8aaaa67549a75b7404d2865a09474dc2b6cf18fe 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -171,6 +171,44 @@ public final class ItemStack {
|
||||
@@ -172,6 +172,44 @@ public final class ItemStack {
|
||||
list.sort((java.util.Comparator<? super net.minecraft.nbt.Tag>) enchantSorter); // Paper
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
@ -53,7 +53,7 @@ index 0caf3eeb7984e842f7a0bdfed3021d0b231a0dd0..ee274fb9c8292a807e438902cc5d7f49
|
||||
// Paper end
|
||||
|
||||
public ItemStack(ItemLike item) {
|
||||
@@ -222,6 +260,7 @@ public final class ItemStack {
|
||||
@@ -223,6 +261,7 @@ public final class ItemStack {
|
||||
this.tag = nbttagcompound.getCompound("tag").copy();
|
||||
// CraftBukkit end
|
||||
this.processEnchantOrder(this.tag); // Paper
|
@ -5,10 +5,10 @@ Subject: [PATCH] Spawn player in correct world on login
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index a8dcd1a07b835f665c74a8a531fef84435716b13..abfd8510c726e17d7a0c99d13cfe065615583fcd 100644
|
||||
index 2de6d47c2289faac019e4f68dcc7df910a03e206..55154eba25bc4724bc9523864b8308af4bfc5e87 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -212,7 +212,18 @@ public abstract class PlayerList {
|
||||
@@ -204,7 +204,18 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -56,7 +56,7 @@ index 4087e381b2250be387b608d8742f6a6009a52879..ff770b9ce68a62418de0c7ed38965062
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
||||
index edc8da447a531cec3a0590ee39811f0949ca7dda..c4766df6d64b484375e5e3474e97dee196c0fef4 100644
|
||||
index 5c209a3d81db5326f63c506077fa0bfd241b4b12..757ee83a0ec5d381eb328f31f3bef636a9b72d57 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
||||
@@ -248,7 +248,8 @@ public class LoomMenu extends AbstractContainerMenu {
|
||||
@ -70,10 +70,10 @@ index edc8da447a531cec3a0590ee39811f0949ca7dda..c4766df6d64b484375e5e3474e97dee1
|
||||
this.resultSlot.set(ItemStack.EMPTY);
|
||||
this.selectablePatterns = List.of();
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java
|
||||
index c63250e04cf7ea5ec2067438735b53e83d851a31..947f7f7e87534872660442947bb24ef5a806a972 100644
|
||||
index f7be3a69909ca0f0aa60619f70e87b5778cf3633..9db5275c43f25ea8ab595017a1b1a8d9db08cb4c 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java
|
||||
@@ -114,6 +114,7 @@ public class SmithingMenu extends ItemCombinerMenu {
|
||||
@@ -115,6 +115,7 @@ public class SmithingMenu extends ItemCombinerMenu {
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,10 +82,10 @@ index c63250e04cf7ea5ec2067438735b53e83d851a31..947f7f7e87534872660442947bb24ef5
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||
index 8734a129244271b370f965fcbf488a14ce04684a..00f01ab2eff69c18b50ec07b7623af66c66a28b6 100644
|
||||
index 9c2fe69ced7a46bbd8b0fbe10fa67d0a39b0f375..70ecc3f673ebd56b65ad901e10f40c28368cbfac 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||
@@ -180,6 +180,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
||||
@@ -181,6 +181,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
||||
this.setupRecipeList(inventory, itemstack);
|
||||
}
|
||||
|
||||
@ -94,10 +94,10 @@ index 8734a129244271b370f965fcbf488a14ce04684a..00f01ab2eff69c18b50ec07b7623af66
|
||||
|
||||
private void setupRecipeList(Container input, ItemStack stack) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 10eb0eed4bf0cc93e4e32c282735c2863f10837c..7dc806760dbb26befde605d991d57660862484a1 100644
|
||||
index 7aba049b426a25981376205410acf41327993d30..6018dc7aa4eaac45c1eee121925f4a22625b0e55 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1667,26 +1667,53 @@ public class CraftEventFactory {
|
||||
@@ -1669,26 +1669,53 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 3ec6243f831330a8096e209a00e0164dea2ef9d0..7b0e6f975ee00be6fc36c22ef586d4f0d4ce06ee 100644
|
||||
index a8f51cb5be994783eca8ff13eb172fd651deb05e..4d9149d3a1d5711b88ce86fb34dbdc926cbe8c31 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3477,7 +3477,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3511,7 +3511,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
Entity entity = this.getVehicle();
|
||||
|
||||
super.stopRiding(suppressCancellation); // Paper - suppress
|
@ -9,7 +9,7 @@ instead of getting stuck in a never despawn state (bubble columns,
|
||||
etc).
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
index 86a82ecdcffc27b523fddc2709bbd92f315e8590..a0d688128a1268fa1acf7c339cde15df5dce1c82 100644
|
||||
index c5512adfb2d38616bb741d03038158c379020ecf..f70f0764d9743dbfa2ead4c90d0df3dbc107672d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -200,6 +200,7 @@ public abstract class AbstractArrow extends Projectile {
|
@ -26,7 +26,7 @@ index 20a7cdf87f307878d66922aaac0c60cff218e46c..39844531b03eb8a6c70700b4ecbf0ff1
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
index 66bd75ee66840f17cc7d00ff89adcb88d83e4dc9..308b3a36f063c401a447f9b7f0364700eee5a54c 100644
|
||||
index e6bf044a0de278c568835e6150ce07ed0e39a44e..7dfd18cfda943ea4486249e20d9763b8465c9601 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -64,7 +64,7 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
@ -38,7 +38,7 @@ index 66bd75ee66840f17cc7d00ff89adcb88d83e4dc9..308b3a36f063c401a447f9b7f0364700
|
||||
public boolean bypassSelectorPermissions = false; // Paper
|
||||
|
||||
public CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity) {
|
||||
@@ -203,9 +203,11 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
@@ -199,9 +199,11 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
@Override
|
||||
public boolean hasPermission(int level) {
|
||||
// CraftBukkit start
|
@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is
|
||||
still at a respawn anchor.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index abfd8510c726e17d7a0c99d13cfe065615583fcd..31e6da864b0ddf2f65ecc43ce8ef74d6c4e9d0aa 100644
|
||||
index 55154eba25bc4724bc9523864b8308af4bfc5e87..426594705780125607b9cd88f30f59bec949f882 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -794,6 +794,7 @@ public abstract class PlayerList {
|
||||
@@ -789,6 +789,7 @@ public abstract class PlayerList {
|
||||
// Paper start
|
||||
boolean isBedSpawn = false;
|
||||
boolean isRespawn = false;
|
||||
@ -21,7 +21,7 @@ index abfd8510c726e17d7a0c99d13cfe065615583fcd..31e6da864b0ddf2f65ecc43ce8ef74d6
|
||||
// Paper end
|
||||
|
||||
// CraftBukkit start - fire PlayerRespawnEvent
|
||||
@@ -804,7 +805,7 @@ public abstract class PlayerList {
|
||||
@@ -799,7 +800,7 @@ public abstract class PlayerList {
|
||||
Optional optional;
|
||||
|
||||
if (blockposition != null) {
|
||||
@ -30,7 +30,7 @@ index abfd8510c726e17d7a0c99d13cfe065615583fcd..31e6da864b0ddf2f65ecc43ce8ef74d6
|
||||
} else {
|
||||
optional = Optional.empty();
|
||||
}
|
||||
@@ -848,7 +849,12 @@ public abstract class PlayerList {
|
||||
@@ -843,7 +844,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
@ -44,7 +44,7 @@ index abfd8510c726e17d7a0c99d13cfe065615583fcd..31e6da864b0ddf2f65ecc43ce8ef74d6
|
||||
if (!flag) entityplayer.reset(); // SPIGOT-4785
|
||||
isRespawn = true; // Paper
|
||||
} else {
|
||||
@@ -888,8 +894,14 @@ public abstract class PlayerList {
|
||||
@@ -882,8 +888,14 @@ public abstract class PlayerList {
|
||||
}
|
||||
// entityplayer1.initInventoryMenu();
|
||||
entityplayer1.setHealth(entityplayer1.getHealth());
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SPIGOT-5824 Bukkit world-container is not used
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 839055c2cb941c36c3d7e3eaf61a277b25d16acb..f1f38d96206e7e10615eac0c53bbbc7426b7e615 100644
|
||||
index 6c3e0540dce5f810a7822cefe59228ef77528132..ef73e0a9b916ade0be91c837a82123c9fc4b5018 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -180,8 +180,17 @@ public class Main {
|
||||
@@ -177,8 +177,17 @@ public class Main {
|
||||
return;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SPIGOT-5885 Unable to disable advancements
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index f1f38d96206e7e10615eac0c53bbbc7426b7e615..27eb466c3f5f4342f892d1c55c15108ae6861912 100644
|
||||
index ef73e0a9b916ade0be91c837a82123c9fc4b5018..6e89b87dec5f9cb5e5657be0a6d23ae5edf7d2bd 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -180,6 +180,7 @@ public class Main {
|
||||
@@ -177,6 +177,7 @@ public class Main {
|
||||
return;
|
||||
}
|
||||
|
@ -9,17 +9,15 @@ itself, so the criterion object stores no references - and thus
|
||||
needs no cleanup.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java b/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
|
||||
index 70d4467e8e4dd9be38a7bfe8494efb6e67e18b9a..4b0e967fac5adb54b2d26ee8f7a1ced259ad11db 100644
|
||||
index 8ae5d6bc6aa3b0bd51a88bf1ce27a01aad881b43..f0367a9cce13ef576fbb7023c0aba6eb48963606 100644
|
||||
--- a/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
|
||||
+++ b/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
|
||||
@@ -14,22 +14,24 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
@@ -16,22 +16,22 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
|
||||
public abstract class SimpleCriterionTrigger<T extends AbstractCriterionTriggerInstance> implements CriterionTrigger<T> {
|
||||
public abstract class SimpleCriterionTrigger<T extends SimpleCriterionTrigger.SimpleInstance> implements CriterionTrigger<T> {
|
||||
- private final Map<PlayerAdvancements, Set<CriterionTrigger.Listener<T>>> players = Maps.newIdentityHashMap();
|
||||
+ //private final Map<PlayerAdvancements, Set<CriterionTrigger.Listener<T>>> players = Maps.newIdentityHashMap(); // Paper - moved into AdvancementDataPlayer to fix memory leak
|
||||
+
|
||||
+ public SimpleCriterionTrigger() {}
|
||||
+ // private final Map<PlayerAdvancements, Set<CriterionTrigger.Listener<T>>> players = Maps.newIdentityHashMap(); // Paper - moved into AdvancementDataPlayer to fix memory leak
|
||||
|
||||
@Override
|
||||
public final void addPlayerListener(PlayerAdvancements manager, CriterionTrigger.Listener<T> conditions) {
|
||||
@ -41,7 +39,7 @@ index 70d4467e8e4dd9be38a7bfe8494efb6e67e18b9a..4b0e967fac5adb54b2d26ee8f7a1ced2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +39,7 @@ public abstract class SimpleCriterionTrigger<T extends AbstractCriterionTriggerI
|
||||
@@ -39,7 +39,7 @@ public abstract class SimpleCriterionTrigger<T extends SimpleCriterionTrigger.Si
|
||||
|
||||
@Override
|
||||
public final void removePlayerListeners(PlayerAdvancements tracker) {
|
||||
@ -49,8 +47,8 @@ index 70d4467e8e4dd9be38a7bfe8494efb6e67e18b9a..4b0e967fac5adb54b2d26ee8f7a1ced2
|
||||
+ tracker.criterionData.remove(this); // Paper - fix AdvancementDataPlayer leak
|
||||
}
|
||||
|
||||
protected abstract T createInstance(JsonObject obj, ContextAwarePredicate playerPredicate, DeserializationContext predicateDeserializer);
|
||||
@@ -50,7 +52,7 @@ public abstract class SimpleCriterionTrigger<T extends AbstractCriterionTriggerI
|
||||
protected abstract T createInstance(JsonObject obj, Optional<ContextAwarePredicate> predicate, DeserializationContext predicateDeserializer);
|
||||
@@ -52,7 +52,7 @@ public abstract class SimpleCriterionTrigger<T extends SimpleCriterionTrigger.Si
|
||||
|
||||
protected void trigger(ServerPlayer player, Predicate<T> predicate) {
|
||||
PlayerAdvancements playerAdvancements = player.getAdvancements();
|
||||
@ -60,14 +58,14 @@ index 70d4467e8e4dd9be38a7bfe8494efb6e67e18b9a..4b0e967fac5adb54b2d26ee8f7a1ced2
|
||||
LootContext lootContext = EntityPredicate.createContext(player, player);
|
||||
List<CriterionTrigger.Listener<T>> list = null;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
index 100781852965e09c92aca34785673c5de51c7107..9034faaf7b169788abad01d3da9c65ad5ddc4b8b 100644
|
||||
index 6487bf016e646ca772b667a2a81c85e82c027c05..d03db10517b2df98b40ab48e450333960508aabf 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
@@ -62,6 +62,7 @@ public class PlayerAdvancements {
|
||||
@Nullable
|
||||
private Advancement lastSelectedTab;
|
||||
@@ -64,6 +64,7 @@ public class PlayerAdvancements {
|
||||
private AdvancementHolder lastSelectedTab;
|
||||
private boolean isFirstPacket = true;
|
||||
+ public final Map<net.minecraft.advancements.critereon.SimpleCriterionTrigger, Set<CriterionTrigger.Listener>> criterionData = new java.util.IdentityHashMap<>(); // Paper - fix advancement data player leakage
|
||||
private final Codec<PlayerAdvancements.Data> codec;
|
||||
+ public final Map<net.minecraft.advancements.critereon.SimpleCriterionTrigger<?>, Set<CriterionTrigger.Listener<?>>> criterionData = new java.util.IdentityHashMap<>(); // Paper - fix advancement data player leakage
|
||||
|
||||
public PlayerAdvancements(DataFixer dataFixer, PlayerList playerManager, ServerAdvancementManager advancementLoader, Path filePath, ServerPlayer owner) {
|
||||
this.dataFixer = dataFixer;
|
||||
this.playerList = playerManager;
|
67
patches/server/0440-Brand-support.patch
Normale Datei
67
patches/server/0440-Brand-support.patch
Normale Datei
@ -0,0 +1,67 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalRegent <misterwener@gmail.com>
|
||||
Date: Sat, 11 Apr 2020 13:10:58 +0200
|
||||
Subject: [PATCH] Brand support
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index d1808bf9dc19fad84da5eb3b4c3d549bc624b00a..cce6febce229abdad859f183716cdefbec4a8f2e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -54,6 +54,8 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
private int latency;
|
||||
private volatile boolean suspendFlushingOnServerThread = false;
|
||||
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
||||
+ private @Nullable String clientBrandName = null; // Paper - Brand name
|
||||
+ protected static final ResourceLocation MINECRAFT_BRAND = new ResourceLocation("brand"); // Paper - Brand support
|
||||
|
||||
public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit
|
||||
this.server = minecraftserver;
|
||||
@@ -140,6 +142,15 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
try {
|
||||
byte[] data = new byte[payload.readableBytes()];
|
||||
payload.readBytes(data);
|
||||
+ // Paper start - Brand support
|
||||
+ if (identifier.equals(MINECRAFT_BRAND)) {
|
||||
+ try {
|
||||
+ this.clientBrandName = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.copiedBuffer(data)).readUtf(256);
|
||||
+ } catch (StringIndexOutOfBoundsException ex) {
|
||||
+ this.clientBrandName = "illegal";
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), identifier.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
@@ -149,6 +160,13 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
|
||||
}
|
||||
|
||||
+ // Paper start - brand support
|
||||
+ @Nullable
|
||||
+ public String getClientBrandName() {
|
||||
+ return this.clientBrandName;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public final boolean isDisconnected() {
|
||||
return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index e28872e0f86a0106e4ea4e06d1ea8e41128de5c7..a32084082239b71222e72e8d7a1e1b84333d775e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2965,6 +2965,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Paper end
|
||||
};
|
||||
|
||||
+ // Paper start - brand support
|
||||
+ @Override
|
||||
+ public String getClientBrandName() {
|
||||
+ return getHandle().connection != null ? getHandle().connection.getClientBrandName() : null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public Player.Spigot spigot()
|
||||
{
|
||||
return this.spigot;
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 5e874253a150bda008d8da29691ddeaad0fee1de..4bb7c18bcf5c551fa5121745938a9fa76d2a7173 100644
|
||||
index 02b7780a05f0119c2d1e9d379321105822629793..a0da8d022b9ab9c7b6ac6a32022739e863c2c9a0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -920,5 +920,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't require FACING data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java
|
||||
index da6a145b06e217ff82b0a1b04410238dc50d4869..1e6ba6d9cceda1d4867b183c3dbc03d317ed287f 100644
|
||||
index b6c5976278f08c454492e0fabe6fac6c1a881d00..379890ae05b2fb4bd81b2fa907413d3736ba1169 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java
|
||||
@@ -14,6 +14,7 @@ import org.bukkit.event.block.BlockDispenseEvent;
|
||||
@ -20,17 +20,17 @@ index da6a145b06e217ff82b0a1b04410238dc50d4869..1e6ba6d9cceda1d4867b183c3dbc03d3
|
||||
|
||||
@Override
|
||||
public final ItemStack dispense(BlockSource pointer, ItemStack stack) {
|
||||
+ enumdirection = pointer.getBlockState().getValue(DispenserBlock.FACING); // Paper - cache facing direction
|
||||
+ enumdirection = pointer.state().getValue(DispenserBlock.FACING); // Paper - cache facing direction
|
||||
ItemStack itemstack1 = this.execute(pointer, stack);
|
||||
|
||||
this.playSound(pointer);
|
||||
- this.playAnimation(pointer, (Direction) pointer.getBlockState().getValue(DispenserBlock.FACING));
|
||||
- this.playAnimation(pointer, (Direction) pointer.state().getValue(DispenserBlock.FACING));
|
||||
+ this.playAnimation(pointer, enumdirection); // Paper - cache facing direction
|
||||
return itemstack1;
|
||||
}
|
||||
|
||||
protected ItemStack execute(BlockSource pointer, ItemStack stack) {
|
||||
- Direction enumdirection = (Direction) pointer.getBlockState().getValue(DispenserBlock.FACING);
|
||||
- Direction enumdirection = (Direction) pointer.state().getValue(DispenserBlock.FACING);
|
||||
+ // Paper - cached enum direction
|
||||
Position iposition = DispenserBlock.getDispensePosition(pointer);
|
||||
ItemStack itemstack1 = stack.split(1);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 02ba7e25c649832aba2e742cb76be9d2b6b6f954..babc90ed1a85756545ac2b7631853d09f37125f2 100644
|
||||
index b84a5fcda10711c896c9a670343d961b9536f888..15a0bbc4e3bafb754b3de03f63b19ab848fe6635 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2003,9 +2003,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1762,9 +1762,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public void setDefaultSpawnPos(BlockPos pos, float angle) {
|
||||
// Paper - configurable spawn radius
|
||||
BlockPos prevSpawn = this.getSharedSpawnPos();
|
||||
@ -21,7 +21,7 @@ index 02ba7e25c649832aba2e742cb76be9d2b6b6f954..babc90ed1a85756545ac2b7631853d09
|
||||
// if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add
|
||||
this.removeTicketsForSpawn(this.paperConfig().spawn.keepSpawnLoadedRange * 16, prevSpawn);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 328bc95dd9298c1f666c35836ea157367f7ef1cd..e754bb3ce28c3bd253698e2065121aafdfe94230 100644
|
||||
index 6137e49ba4f7dd121bbb7b13add3d63285df52d5..b9a5d94c31b20a87ed96d8e85a28e63400353353 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -259,12 +259,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent headless pistons from being created
|
||||
Prevent headless pistons from being created by explosions or tree/mushroom growth.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index d646660f988994d4fdb05901349c5946a2f6c48c..316df76570a7a6843b5a8ed2c44467a0cdf2a6cd 100644
|
||||
index 93529defa5d36bb9b4c69eedda9b7ac3d0a189ce..e6e7ac7c5c31b6ff16a7bae6cc0706d31ea16c07 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -183,6 +183,15 @@ public class Explosion {
|
||||
@@ -184,6 +184,15 @@ public class Explosion {
|
||||
|
||||
if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockposition, iblockdata, f)) {
|
||||
set.add(blockposition);
|
@ -7,10 +7,10 @@ Add a new event, BellRingEvent, to trigger whenever a player rings a
|
||||
village bell. Passes along the bell block and the player who rang it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 7dc806760dbb26befde605d991d57660862484a1..ab6f24426031d47d25fcf94421569a3276cdca9a 100644
|
||||
index 6018dc7aa4eaac45c1eee121925f4a22625b0e55..9bdfb16720c9e5ca3254f8ea8463ca10077992ea 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -365,10 +365,11 @@ public class CraftEventFactory {
|
||||
@@ -367,10 +367,11 @@ public class CraftEventFactory {
|
||||
return tradeSelectEvent;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add zombie targets turtle egg config
|
||||
|
||||
|
||||
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 fae2c89900db222f7319b5675ef4b470beca251b..3ca308bb6668392a4f7ce1296e1ef6094060491f 100644
|
||||
index 55e4416a7988690ecfc8da6e83b43cbf9adda33b..6b8315ab1bdd963c04e56f214f6bdfd6b5eb8f48 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -108,7 +108,7 @@ public class Zombie extends Monster {
|
||||
@@ -109,7 +109,7 @@ public class Zombie extends Monster {
|
||||
|
||||
@Override
|
||||
protected void registerGoals() {
|
@ -8,12 +8,12 @@ the world per tick, this attempts to reduce the impact that join floods
|
||||
has on the server
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index dc3dea801a673462e767ad37268ec77ac95d214c..959d39e81cdde6fda90fcc95f842146448b4c6e4 100644
|
||||
index 81e49a770fd8a10e987f3e67a5ab99fc39d5e47f..a147c5e1929e8034b28af56f561f86478684fd08 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -449,14 +449,29 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -403,14 +403,29 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
|
||||
+ private static final int MAX_PER_TICK = io.papermc.paper.configuration.GlobalConfiguration.get().misc.maxJoinsPerTick; // Paper
|
||||
+ private static int joinAttemptsThisTick; // Paper
|
@ -986,7 +986,7 @@ index 0000000000000000000000000000000000000000..22a2547810d0c029f29685faddf7ac21
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
index e7489dbdb0379f9bf3312e5253cd7ff9d8b3a185..1926daed1749e3481861f85f57612fe74450191b 100644
|
||||
index 8a18aab3115d2ee1e888769518704f2a5aa1d4cc..a0ae3635ae8c3fd3ac17dd9fa614ec84c7b1b0ca 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
@@ -252,6 +252,116 @@ public class RedStoneWireBlock extends Block {
|
@ -5,30 +5,30 @@ Subject: [PATCH] Fix hex colors not working in some kick messages
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
index 94b062874ef9d4935a7ad2c7b45b2e6b786eaa81..4fb1fde4983d81cc35e2c8717984d929460959b8 100644
|
||||
index 1cdcb62ead4b9f2e88f1e282813d990ddf2297a5..ec11db0cfdc5977bff6198efd10f716393931335 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
@@ -77,12 +77,12 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (packet.getProtocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
|
||||
if (packet.protocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
|
||||
- MutableComponent ichatmutablecomponent;
|
||||
+ Component ichatmutablecomponent; // Paper - Fix hex colors not working in some kick messages
|
||||
|
||||
if (packet.getProtocolVersion() < 754) {
|
||||
if (packet.protocolVersion() < 754) {
|
||||
- ichatmutablecomponent = Component.literal( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) ); // Spigot
|
||||
+ ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) , true )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
||||
+ ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
||||
} else {
|
||||
- ichatmutablecomponent = Component.literal( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) ); // Spigot
|
||||
+ ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) , true )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
||||
+ ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
||||
}
|
||||
|
||||
this.connection.send(new ClientboundLoginDisconnectPacket(ichatmutablecomponent));
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 9858f907e58fa606510f87efbdf8793c35ec711c..c9f8f61c43428c519c0dac1b7416bad775e3429f 100644
|
||||
index f870c20ecce27ebd893107a35e1b8f15e462ff85..25afcd025d32c76232910bcc7d6607eef3c4167d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -102,7 +102,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -97,7 +97,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
// CraftBukkit start
|
||||
@Deprecated
|
||||
public void disconnect(String s) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] PortalCreateEvent needs to know its entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index ee274fb9c8292a807e438902cc5d7f49c30d6627..34e54233d54f21cf4304c39e53aa6a7fb06a67cf 100644
|
||||
index 8aaaa67549a75b7404d2865a09474dc2b6cf18fe..58eb562aea9d3d19da0958ce9dcf0474f975e259 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -452,7 +452,7 @@ public final class ItemStack {
|
||||
@@ -457,7 +457,7 @@ public final class ItemStack {
|
||||
net.minecraft.world.level.block.state.BlockState block = world.getBlockState(newblockposition);
|
||||
|
||||
if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically
|
||||
@ -79,7 +79,7 @@ index 8c6edd032c927f7d1e04e944b4ce5598d71cdd81..7f88b910dfd0303f69b4fd1c7918a401
|
||||
|
||||
private static int getFireTickDelay(RandomSource random) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 74f84bfcb1da6186c7a6783512c2fc7ba995215f..a9e8d9c65a809562d4768df348dcd79bec4d0e3c 100644
|
||||
index a5942b6683d38f067f8ca1dfbe467b72df242632..96bdf69c8788aa0b1dff64789e6f13c856ee99ff 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -40,6 +40,7 @@ import net.minecraft.world.item.DyeColor;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d62c09f7328af63112d9e6f1a06844047dbf6570..a8fea134ddd8bf19abea977871c77cd317090145 100644
|
||||
index e82e5df0abf64b27733beedb4a545a0a1a2119f3..c24e6d743da7f5e1dcd0be05a04bf3dd336ca7f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2048,6 +2048,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2054,6 +2054,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
@ -9,10 +9,10 @@ as this is how Vanilla teleports entities.
|
||||
Cancel any pending motion when teleported.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 37e5b479a093184e7d8d05c13e69b2682b5dac92..6cdf9921c9936ef7508605ee6b4c73157ca2fd4b 100644
|
||||
index c6b5bc584fc117240c4290ba48dd71e5d70c2abb..c0c37203eb6ed180160bd0dc7f2a92887738e347 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -762,7 +762,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -657,7 +657,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
return;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ index 37e5b479a093184e7d8d05c13e69b2682b5dac92..6cdf9921c9936ef7508605ee6b4c7315
|
||||
this.lastGoodX = this.awaitingPositionFromClient.x;
|
||||
this.lastGoodY = this.awaitingPositionFromClient.y;
|
||||
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
||||
@@ -1661,7 +1661,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1549,7 +1549,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// CraftBukkit end
|
||||
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
@ -31,10 +31,10 @@ index 37e5b479a093184e7d8d05c13e69b2682b5dac92..6cdf9921c9936ef7508605ee6b4c7315
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index ffd7e11b16604050e87a6b8aac08948fd3311bd1..fca862584439c87b049af4cdd9f79fe4ee30ea40 100644
|
||||
index 7b182384ca7f2b36513856e247072c3c5c05b5e7..fcd8a25967f0eccb0da3e81d79baca9403b0d34f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -159,6 +159,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -158,6 +158,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@ -42,7 +42,7 @@ index ffd7e11b16604050e87a6b8aac08948fd3311bd1..fca862584439c87b049af4cdd9f79fe4
|
||||
static boolean isLevelAtLeast(CompoundTag tag, int level) {
|
||||
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
}
|
||||
@@ -1856,6 +1857,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1779,6 +1780,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void moveTo(double x, double y, double z, float yaw, float pitch) {
|
||||
@ -69,7 +69,7 @@ index 369298dfd437c1c83801f3d4ba63484ee1b969fe..ae2b95f53e875716489821dc9b0a3a35
|
||||
if (entity instanceof Mob) {
|
||||
Mob entityinsentient = (Mob) entity;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 5052432652c2e7f09a233e267bece5fb1e3e3bf1..efa3402b776551cddbfcab834740cdd75f65178d 100644
|
||||
index 91d199250d856baa869258282bb04ed5897b14e9..889b24adb50825a3c4bd83f10c3d253e5cf80a1a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -580,7 +580,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add additional open container api to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 63208cf28a7ea005f9f328281676ed113ae23a00..f4cda5fbf12c59dc1ecec4aac6719837444382e2 100644
|
||||
index 80694a1d660a10909408c9b3169dda7847bf295e..05d9a9968588381aaa3aeb06ef4d18fed4085229 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -461,6 +461,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index babc90ed1a85756545ac2b7631853d09f37125f2..838907e8ae95d72797d01188836a05bff01d8a14 100644
|
||||
index 15a0bbc4e3bafb754b3de03f63b19ab848fe6635..720568b34c903c80d916a5915c9733c4ed565dcf 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1507,6 +1507,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1275,6 +1275,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
||||
@ -23,10 +23,10 @@ index babc90ed1a85756545ac2b7631853d09f37125f2..838907e8ae95d72797d01188836a05bf
|
||||
if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index cf47536a2e37d53406fc9cb3f09095e034af8e15..c256423e9dc9d1837b847da44fb2920c58842c8b 100644
|
||||
index 3622708c453feb6da3d5be192291d63abbe83068..89f0c3d6e4dc9701f02fa7ed5331c3969de81ffc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -436,10 +436,12 @@ public class ServerPlayerGameMode {
|
||||
@@ -434,10 +434,12 @@ public class ServerPlayerGameMode {
|
||||
// return true; // CraftBukkit
|
||||
}
|
||||
// CraftBukkit start
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index fca862584439c87b049af4cdd9f79fe4ee30ea40..71d2557e6e244384042ce3b13cc6e3008227399d 100644
|
||||
index fcd8a25967f0eccb0da3e81d79baca9403b0d34f..74c9e96f196d293c7ef68a00829ab24822e16e76 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4433,4 +4433,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4364,4 +4364,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
void accept(Entity entity, double x, double y, double z);
|
||||
}
|
||||
@ -21,10 +21,10 @@ index fca862584439c87b049af4cdd9f79fe4ee30ea40..71d2557e6e244384042ce3b13cc6e300
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 173d17adb76f5f08828048236f544d25f53152ea..6c6587c775162655581bd09e5eb7cc2d7fb8f782 100644
|
||||
index 3544ffd3af1e71cfd6fb198b4fa45da3167cd62d..336717e397d6d6572fd72da16f8585b349a80209 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -512,6 +512,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -513,6 +513,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
|
||||
return compound;
|
||||
}
|
@ -39,7 +39,7 @@ index 3f09420ba9268ac1dc5440c0739744370c0de319..052389310826ee6b97cf27dfd952e010
|
||||
return new CraftObjective(this, objective);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
||||
index 282cb5e41fed48df890eaa30e42563289e065caa..afc43b52698db4bf7d89a576c2cbca0ddc9e04e2 100644
|
||||
index d5c15dd1287e0d5348dc9f7c622850705fcd4ac9..8f20fa2bfbe037fbaa9f4c4c3341a3d9b9a711b5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
|
||||
@@ -30,6 +30,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 71d2557e6e244384042ce3b13cc6e3008227399d..73a2ddf2806ea1e1826d553b7d13cf4d58be43fc 100644
|
||||
index 74c9e96f196d293c7ef68a00829ab24822e16e76..a1f704600b8b4a43e05584cefdbeedacde6f2ed2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4438,5 +4438,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4369,5 +4369,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public static int nextEntityId() {
|
||||
return ENTITY_COUNTER.incrementAndGet();
|
||||
}
|
||||
@ -19,7 +19,7 @@ index 71d2557e6e244384042ce3b13cc6e3008227399d..73a2ddf2806ea1e1826d553b7d13cf4d
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index efa3402b776551cddbfcab834740cdd75f65178d..2a0299d5dcafb9659ffd66fe2cc12843208a7408 100644
|
||||
index 889b24adb50825a3c4bd83f10c3d253e5cf80a1a..3f2a8efc6ad9e6e2043bf96894c47e578c68e263 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1347,5 +1347,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a8fea134ddd8bf19abea977871c77cd317090145..8c9ebc501282e929503c39607048e032f05fbb9c 100644
|
||||
index c24e6d743da7f5e1dcd0be05a04bf3dd336ca7f4..22b1efc8927d6f168694b2bde957d960661bb1c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2131,13 +2131,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2137,13 +2137,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.isEnforceWhitelist()) {
|
||||
PlayerList playerlist = source.getServer().getPlayerList();
|
||||
UserWhiteList whitelist = playerlist.getWhiteList();
|
@ -11,10 +11,10 @@ This ensures the crystals/pillars are in expected state when the dragon spawns.
|
||||
See #3522
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 43a82ed953dd5d19f1c1c55b011b0cedef5ad7a2..3c24c2c7dda04ba05f10c64c785f503dac9585f5 100644
|
||||
index e70273664b4a38ef4ba803c60409a24a07d5bed7..7be3405a93fbb9f43075983825d1ac9299cbe7b9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -467,6 +467,7 @@ public class EndDragonFight {
|
||||
@@ -472,6 +472,7 @@ public class EndDragonFight {
|
||||
entityenderdragon.moveTo((double) this.origin.getX(), (double) (128 + this.origin.getY()), (double) this.origin.getZ(), this.level.random.nextFloat() * 360.0F, 0.0F);
|
||||
this.level.addFreshEntity(entityenderdragon);
|
||||
this.dragonUUID = entityenderdragon.getUUID();
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix for large move vectors crashing server
|
||||
Check movement distance also based on current position.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6cdf9921c9936ef7508605ee6b4c73157ca2fd4b..06ccc5d528fe5411de306d787b705f7863777dc6 100644
|
||||
index c0c37203eb6ed180160bd0dc7f2a92887738e347..a4345db5d89b1a2384f4cab421946f05bf846687 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -569,9 +569,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -464,9 +464,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) {
|
||||
ServerLevel worldserver = this.player.serverLevel();
|
||||
@ -22,7 +22,7 @@ index 6cdf9921c9936ef7508605ee6b4c73157ca2fd4b..06ccc5d528fe5411de306d787b705f78
|
||||
double d3 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX()); final double toX = d3; // Paper - OBFHELPER
|
||||
double d4 = ServerGamePacketListenerImpl.clampVertical(packet.getY()); final double toY = d4; // Paper - OBFHELPER
|
||||
double d5 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ()); final double toZ = d5; // Paper - OBFHELPER
|
||||
@@ -581,8 +581,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -476,8 +476,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
double d7 = d4 - this.vehicleFirstGoodY;
|
||||
double d8 = d5 - this.vehicleFirstGoodZ;
|
||||
double d9 = entity.getDeltaMovement().lengthSqr();
|
||||
@ -44,7 +44,7 @@ index 6cdf9921c9936ef7508605ee6b4c73157ca2fd4b..06ccc5d528fe5411de306d787b705f78
|
||||
|
||||
// CraftBukkit start - handle custom speeds and skipped ticks
|
||||
this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick;
|
||||
@@ -628,9 +639,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -523,9 +534,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D));
|
||||
|
||||
@ -57,7 +57,7 @@ index 6cdf9921c9936ef7508605ee6b4c73157ca2fd4b..06ccc5d528fe5411de306d787b705f78
|
||||
boolean flag1 = entity.verticalCollisionBelow;
|
||||
|
||||
if (entity instanceof LivingEntity) {
|
||||
@@ -1353,7 +1364,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1241,7 +1252,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
double d7 = d1 - this.firstGoodY;
|
||||
double d8 = d2 - this.firstGoodZ;
|
||||
double d9 = this.player.getDeltaMovement().lengthSqr();
|
||||
@ -77,7 +77,7 @@ index 6cdf9921c9936ef7508605ee6b4c73157ca2fd4b..06ccc5d528fe5411de306d787b705f78
|
||||
|
||||
if (this.player.isSleeping()) {
|
||||
if (d10 > 1.0D) {
|
||||
@@ -1405,9 +1427,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1293,9 +1315,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
AABB axisalignedbb = this.player.getBoundingBox();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Villager#resetOffers
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
index 78f7f1602b34e9d2162446810b0ee1357fd4922c..0a62cf36a95d7bf1287acdd17464fc677c7a4b7d 100644
|
||||
index 8f2d68890297521274a5c23daa272f0341427eec..629b79c6e59944994295768904c449733764cf99 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
@@ -115,6 +115,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -114,6 +114,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
return this.tradingPlayer != null;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ In general, look at making this logic more robust (i.e properly handling
|
||||
cases where a captured entry is overriden) - but for now this will do.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 221a1e66814dda35feff9fa9ca0fe54feec335f9..1577b7317b85708d39d4171321df785a8107bdb2 100644
|
||||
index ea11bea03a15bfd79b82da60c48bfb23a44acda4..8236bfd8d0bdd322d1aeee7d4b1e32ae5dc1ae1f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -157,7 +157,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix item locations dropped from campfires
|
||||
Fixes #4259 by not flooring the blockposition among other weirdness
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||
index ba4ce804d1d239ca842b06b3599605847effc35b..ca995270c9b8d7024504a9ba885b1c0214b33a8b 100644
|
||||
index c4cf6abf0a962794ddbb4d7a691406054062ffee..24e2063db933bfbc8fc1f34edb8106ae4d7c633c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||
@@ -81,7 +81,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -82,7 +82,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
result = blockCookEvent.getResult();
|
||||
itemstack1 = CraftItemStack.asNMSCopy(result);
|
||||
// CraftBukkit end
|
@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index c96efc055e44dcc7880abb3a6e7b4c441aa9a112..63160efd1f5b555d024264edec479aa99e2b519b 100644
|
||||
index a32084082239b71222e72e8d7a1e1b84333d775e..f842cbe25832b17d7225132eea0bd7704c8c6f08 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -624,6 +624,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -584,6 +584,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
throw new RuntimeException("Unknown settings type");
|
||||
}
|
@ -8,7 +8,7 @@ This can realistically only happen if there's custom loot active on fishing
|
||||
which can return 0 items. This would disconnect the player who's fishing.
|
||||
|
||||
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 dbff697927e6a6c745377aafd3b476b58f005882..b8c238287e0639b578170c6fec0d4db5a1a59fe7 100644
|
||||
index 5c77992e0c49eb217dd66657b35164225b400518..a9eaa079a43bc8a5e81deaf6df5ce2f9c53cb319 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -503,9 +503,15 @@ public class FishingHook extends Projectile {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0e552fdcc48b0f3f68cbf65113b94782863cb092..f7acc0c4e385c48ca651166baf33caa247e582f6 100644
|
||||
index 970a604108c0b7e410af356e3d12559af0b0b78b..d09fb11e67364a2c54bf6412b1a8a48797ece3be 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1811,6 +1811,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1814,6 +1814,28 @@ public final class CraftServer implements Server {
|
||||
return result;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add ignore discounts API
|
||||
|
||||
|
||||
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 1e775178f346ef3d2f121e539ba81a75c8a37c36..24434b66d158b10d21579b2db6efb0bdcc788a5c 100644
|
||||
index cc829161404c0f98a403c5219d5c535de1d5c5ba..f58be4e2529759cc64df2c70a69ef56eabbb762d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -507,6 +507,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -508,6 +508,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
MerchantOffer merchantrecipe = (MerchantOffer) iterator.next();
|
||||
@ -16,7 +16,7 @@ index 1e775178f346ef3d2f121e539ba81a75c8a37c36..24434b66d158b10d21579b2db6efb0bd
|
||||
|
||||
merchantrecipe.addToSpecialPriceDiff(-Mth.floor((float) i * merchantrecipe.getPriceMultiplier()));
|
||||
}
|
||||
@@ -519,6 +520,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -520,6 +521,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
MerchantOffer merchantrecipe1 = (MerchantOffer) iterator1.next();
|
||||
@ -25,7 +25,7 @@ index 1e775178f346ef3d2f121e539ba81a75c8a37c36..24434b66d158b10d21579b2db6efb0bd
|
||||
int k = (int) Math.floor(d0 * (double) merchantrecipe1.getBaseCostA().getCount());
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
index dc5908374565dd3080679779cbfe7620a4810015..28bdcb14cb5b458d3c990fcf343ef97f08e4f3c6 100644
|
||||
index 1d755d04515f20dbd69931084b4cc894e52d35c9..4f7457578ab3118d10e0d5dfc23d79c9b20c2f44 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
@@ -19,6 +19,7 @@ public class MerchantOffer {
|
||||
@ -82,7 +82,7 @@ index dc5908374565dd3080679779cbfe7620a4810015..28bdcb14cb5b458d3c990fcf343ef97f
|
||||
this.rewardExp = true;
|
||||
this.xp = 1;
|
||||
this.baseCostA = firstBuyItem;
|
||||
@@ -195,6 +214,7 @@ public class MerchantOffer {
|
||||
@@ -210,6 +229,7 @@ public class MerchantOffer {
|
||||
nbttagcompound.putFloat("priceMultiplier", this.priceMultiplier);
|
||||
nbttagcompound.putInt("specialPrice", this.specialPriceDiff);
|
||||
nbttagcompound.putInt("demand", this.demand);
|
@ -5,7 +5,7 @@ Subject: [PATCH] Toggle for removing existing dragon
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 3c24c2c7dda04ba05f10c64c785f503dac9585f5..774f408b1520646dd32eb7d66e33946a7e1e72df 100644
|
||||
index 7be3405a93fbb9f43075983825d1ac9299cbe7b9..7741b27816636aaa48277b2fe14fd7b88cd3d78a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -209,7 +209,7 @@ public class EndDragonFight {
|
@ -15,10 +15,10 @@ manually reload the advancement data for all players, which
|
||||
normally takes place as a part of the datapack reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 6c6587c775162655581bd09e5eb7cc2d7fb8f782..c168dbfa5bc4aa49a1d743fe4b53d8169f01e1a0 100644
|
||||
index 336717e397d6d6572fd72da16f8585b349a80209..0fb0c8238be1e199220ef62576547ea6c9484a9c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -345,7 +345,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -346,7 +346,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ This lets us get faster foreach iteration, as well as avoids map lookups on
|
||||
the values when needed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
index 300c812d513e0b948a7e79c0ed241f514c7a09fc..d23481453717f715124156b5d83f6448f720d049 100644
|
||||
index 8519383a9abd45434c1e9888e77548941a80c79c..d23481453717f715124156b5d83f6448f720d049 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java
|
||||
@@ -38,9 +38,12 @@ public class PathFinder {
|
||||
@ -102,7 +102,7 @@ index 300c812d513e0b948a7e79c0ed241f514c7a09fc..d23481453717f715124156b5d83f6448
|
||||
- return this.reconstructPath(target.getBestNode(), positions.get(target), false);
|
||||
- }).min(Comparator.comparingDouble(Path::getDistToTarget).thenComparingInt(Path::getNodeCount));
|
||||
- profiler.pop();
|
||||
- return !optional.isPresent() ? null : optional.get();
|
||||
- return optional.isEmpty() ? null : optional.get();
|
||||
+ // Paper start - remove streams - and optimize collection
|
||||
+ Path best = null;
|
||||
+ boolean entryListIsEmpty = entryList.isEmpty();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Beacon API - custom effect ranges
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
index 154e4652a93b50e9b26c93531a4e854601ed75e1..f3fb7e07ca65cb1c948b110b7f7edc8b0bd83b21 100644
|
||||
index cd28ee0cbc69713a641a21c9a626c694a4bcbfc9..3a50fe20294048a1c818ae717a918bb1aed74dea 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
@@ -78,6 +78,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
@@ -82,6 +82,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
return (BeaconBlockEntity.hasSecondaryEffect(this.levels, this.primaryPower, this.secondaryPower)) ? CraftPotionUtil.toBukkit(new MobEffectInstance(this.secondaryPower, BeaconBlockEntity.getLevel(this.levels), BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower), true, true)) : null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -33,9 +33,9 @@ index 154e4652a93b50e9b26c93531a4e854601ed75e1..f3fb7e07ca65cb1c948b110b7f7edc8b
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
public BeaconBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(BlockEntityType.BEACON, pos, state);
|
||||
@@ -188,7 +208,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
@Nullable
|
||||
static MobEffect filterEffect(@Nullable MobEffect effect) {
|
||||
@@ -197,7 +217,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
}
|
||||
|
||||
if (blockEntity.levels > 0 && !blockEntity.beamSections.isEmpty()) {
|
||||
@ -44,7 +44,7 @@ index 154e4652a93b50e9b26c93531a4e854601ed75e1..f3fb7e07ca65cb1c948b110b7f7edc8b
|
||||
BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT);
|
||||
}
|
||||
}
|
||||
@@ -274,8 +294,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
@@ -283,8 +303,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
}
|
||||
|
||||
public static List getHumansInRange(Level world, BlockPos blockposition, int i) {
|
||||
@ -59,7 +59,7 @@ index 154e4652a93b50e9b26c93531a4e854601ed75e1..f3fb7e07ca65cb1c948b110b7f7edc8b
|
||||
|
||||
AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D);
|
||||
List<Player> list = world.getEntitiesOfClass(Player.class, axisalignedbb);
|
||||
@@ -316,12 +341,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
@@ -325,12 +350,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
}
|
||||
|
||||
private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable MobEffect primaryEffect, @Nullable MobEffect secondaryEffect) {
|
||||
@ -78,7 +78,7 @@ index 154e4652a93b50e9b26c93531a4e854601ed75e1..f3fb7e07ca65cb1c948b110b7f7edc8b
|
||||
|
||||
BeaconBlockEntity.applyEffect(list, primaryEffect, j, b0, true, pos); // Paper - BeaconEffectEvent
|
||||
|
||||
@@ -371,6 +401,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
@@ -393,6 +423,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
}
|
||||
|
||||
this.lockKey = LockCode.fromTag(nbt);
|
||||
@ -86,7 +86,7 @@ index 154e4652a93b50e9b26c93531a4e854601ed75e1..f3fb7e07ca65cb1c948b110b7f7edc8b
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -384,6 +415,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
@@ -406,6 +437,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
}
|
||||
|
||||
this.lockKey.addToTag(nbt);
|
||||
@ -95,10 +95,10 @@ index 154e4652a93b50e9b26c93531a4e854601ed75e1..f3fb7e07ca65cb1c948b110b7f7edc8b
|
||||
|
||||
public void setCustomName(@Nullable Component customName) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
||||
index c186a44b927188ed222f8b2f8f76aaef35d9c654..c47e613cae3d9252a8364ccc4d717e410bb0fc0c 100644
|
||||
index da3437eb0ce3374a44a09c55834f341e1a55c162..453fd72f6bab51acd4af25173f95873cf71cc318 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
||||
@@ -29,7 +29,7 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
|
||||
@@ -28,7 +28,7 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
|
||||
if (tileEntity instanceof BeaconBlockEntity) {
|
||||
BeaconBlockEntity beacon = (BeaconBlockEntity) tileEntity;
|
||||
|
||||
@ -107,7 +107,7 @@ index c186a44b927188ed222f8b2f8f76aaef35d9c654..c47e613cae3d9252a8364ccc4d717e41
|
||||
Collection<LivingEntity> bukkit = new ArrayList<LivingEntity>(nms.size());
|
||||
|
||||
for (Player human : nms) {
|
||||
@@ -106,4 +106,21 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
|
||||
@@ -105,4 +105,21 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
|
||||
public void setLock(String key) {
|
||||
this.getSnapshot().lockKey = (key == null) ? LockCode.NO_LOCK : new LockCode(key);
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add API for quit reason
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 959d39e81cdde6fda90fcc95f842146448b4c6e4..a1467e8edd3ca66c306d01e0688a9fece69652f3 100644
|
||||
index a147c5e1929e8034b28af56f561f86478684fd08..7a98ea71fead97d3e18fa9774eb970359c18d931 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -182,12 +182,15 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -167,12 +167,15 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
|
||||
this.handlingFault = true;
|
||||
if (this.channel.isOpen()) {
|
||||
@ -23,25 +23,25 @@ index 959d39e81cdde6fda90fcc95f842146448b4c6e4..a1467e8edd3ca66c306d01e0688a9fec
|
||||
+ if (player != null) player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.ERRONEOUS_STATE; // Paper
|
||||
if (flag) {
|
||||
Connection.LOGGER.debug("Failed to sent packet", throwable);
|
||||
ConnectionProtocol enumprotocol = this.getCurrentProtocol();
|
||||
if (this.getSending() == PacketFlow.CLIENTBOUND) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index e087b62f88157d57eb037feb0d39c076b286f755..0b81878a951643af1ce785b3adcca9b3eec7f1c3 100644
|
||||
index 0661ed6cac8da2a1cc94abe7e1017fcd04a9e9c2..33f04964a2a56d36853d5ef53b79535bc56e7290 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -275,6 +275,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -272,6 +272,7 @@ public class ServerPlayer extends Player {
|
||||
public boolean isRealPlayer; // Paper
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
||||
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||
+ public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event
|
||||
|
||||
private final java.util.concurrent.atomic.AtomicReference<io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances> viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1));
|
||||
public io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 06ccc5d528fe5411de306d787b705f7863777dc6..c115d103cbc28a511aedcdcd40ce6a50a777b102 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -509,6 +509,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
|
||||
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
|
||||
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index cce6febce229abdad859f183716cdefbec4a8f2e..a38ad79aaf4ef5a928370152bdc5c0cc4c59d93e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -305,6 +305,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
final Component ichatbasecomponent = io.papermc.paper.adventure.PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
|
||||
// CraftBukkit end
|
||||
|
||||
+ this.player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.KICKED; // Paper
|
||||
@ -49,15 +49,15 @@ index 06ccc5d528fe5411de306d787b705f7863777dc6..c115d103cbc28a511aedcdcd40ce6a50
|
||||
this.connection.disconnect(ichatbasecomponent);
|
||||
}));
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 31e6da864b0ddf2f65ecc43ce8ef74d6c4e9d0aa..4d04cb528044d1e09687b80f9c6c7280bd2624ae 100644
|
||||
index 426594705780125607b9cd88f30f59bec949f882..75cf90dc8d061578b960b5f6f918b69d14e488ac 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -573,7 +573,7 @@ public abstract class PlayerList {
|
||||
@@ -560,7 +560,7 @@ public abstract class PlayerList {
|
||||
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
||||
}
|
||||
|
||||
- PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : PaperAdventure.asAdventure(entityplayer.getDisplayName()))); // Paper - Adventure
|
||||
+ PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : PaperAdventure.asAdventure(entityplayer.getDisplayName())), entityplayer.quitReason); // Paper - Adventure & quit reason
|
||||
- PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(entityplayer.getDisplayName()))); // Paper - Adventure
|
||||
+ PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(entityplayer.getDisplayName())), entityplayer.quitReason); // Paper - Adventure & quit reason
|
||||
this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 4d04cb528044d1e09687b80f9c6c7280bd2624ae..a474db28f74b698621342510d01bf38775794a8e 100644
|
||||
index 75cf90dc8d061578b960b5f6f918b69d14e488ac..ceb8e91ba1f14a6d6ab516753f87bbd5b681a18a 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -837,7 +837,7 @@ public abstract class PlayerList {
|
||||
@@ -832,7 +832,7 @@ public abstract class PlayerList {
|
||||
if (location == null) {
|
||||
worldserver1 = this.server.getLevel(Level.OVERWORLD);
|
||||
blockposition = entityplayer1.getSpawnPoint(worldserver1);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 63160efd1f5b555d024264edec479aa99e2b519b..309b489c11387a0a3555813a848b7be978ba2529 100644
|
||||
index f842cbe25832b17d7225132eea0bd7704c8c6f08..f4572fdcb6cfbfed75436cdd3a9a829b7f47fe3f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2520,7 +2520,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2494,7 +2494,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (data != null) {
|
||||
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 4bb7c18bcf5c551fa5121745938a9fa76d2a7173..fa6b00e3055224a53eb6ec93431d70df27b6c6d1 100644
|
||||
index a0da8d022b9ab9c7b6ac6a32022739e863c2c9a0..833c1d37fde5e726933da6ac0076c6ea072389ca 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -887,6 +887,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 73a2ddf2806ea1e1826d553b7d13cf4d58be43fc..01c5a986d7d5c87cb7bf574a2f59e57dd5b347e2 100644
|
||||
index a1f704600b8b4a43e05584cefdbeedacde6f2ed2..b8c41d759858fcb7b5db48351f352deac7796634 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2049,6 +2049,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1972,6 +1972,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public boolean isPushable() {
|
||||
@ -45,10 +45,10 @@ index d15e62da0307728a7c2be191a27f87da1bb29f49..de06ae3e8757c923a6f3f475a34885d2
|
||||
} else if (entity.level().isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 7b0e6f975ee00be6fc36c22ef586d4f0d4ce06ee..e4fd0bc35064e7962c7e43f9d0ee502463a6085f 100644
|
||||
index 4d9149d3a1d5711b88ce86fb34dbdc926cbe8c31..6b877e084caf931f8f0908c657ed0c8b6124a165 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3398,7 +3398,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3427,7 +3427,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return;
|
||||
}
|
||||
// Paper end - don't run getEntities if we're not going to use its result
|
||||
@ -57,7 +57,7 @@ index 7b0e6f975ee00be6fc36c22ef586d4f0d4ce06ee..e4fd0bc35064e7962c7e43f9d0ee5024
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
// Paper - moved up
|
||||
@@ -3558,9 +3558,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3617,9 +3617,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return !this.isRemoved() && this.collides; // CraftBukkit
|
||||
}
|
||||
|
||||
@ -89,10 +89,10 @@ index 867717f130b6fcd48f39d40b10b3f514dbb8798c..5beaa849a250ea005733250ad3edfa83
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
|
||||
index 2f5056b00e4475906ffb1f1938cacb191169809d..e1874aaa0065a6e8e6ae043713c22f08b58b5e21 100644
|
||||
index e110931ee13ac3e64e455eaa7a30b96d9464df58..397264d31992fd43bd57736c25693ae001330b6d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
|
||||
@@ -381,8 +381,8 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder<Parrot
|
||||
@@ -382,8 +382,8 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder<Parrot
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -104,10 +104,10 @@ index 2f5056b00e4475906ffb1f1938cacb191169809d..e1874aaa0065a6e8e6ae043713c22f08
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
index 9c58a60adad7e72ca6bbc5093836d7ebc584add4..07116849e39ef891182fe603d34d7fd8aee6c046 100644
|
||||
index e7a8120a7d8bc9d668050c7f8fe94df90133b36c..9f46eb8417ad19e6f1bbf369f4c6b94fdb915f5b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
@@ -284,7 +284,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
@@ -286,7 +286,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -117,7 +117,7 @@ index 9c58a60adad7e72ca6bbc5093836d7ebc584add4..07116849e39ef891182fe603d34d7fd8
|
||||
}
|
||||
|
||||
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 498c6664fcfb028111031691348bfa2eb21d605b..5c6e060a54ffb13c37ff5711992e964bdd59643d 100644
|
||||
index 3d2d638da2d4b9c00f98477320b3300f36cff119..0b678cb034b2625d322758cc4486d534ab39e48f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -343,7 +343,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@ -130,10 +130,10 @@ index 498c6664fcfb028111031691348bfa2eb21d605b..5c6e060a54ffb13c37ff5711992e964b
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
index c2a18a8e52f897bc96227854646e53e4dc189362..1f909082eb123bfe37e1078962ee7d71c78a8194 100644
|
||||
index 8bea12248bf3ae95c629578386292732d0b74630..a719ea3cd6714686ead9c1817e9592733a980444 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -148,7 +148,7 @@ public abstract class AbstractMinecart extends Entity {
|
||||
@@ -153,7 +153,7 @@ public abstract class AbstractMinecart extends Entity {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -143,10 +143,10 @@ index c2a18a8e52f897bc96227854646e53e4dc189362..1f909082eb123bfe37e1078962ee7d71
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||
index a42f47ba5fd6c075d915c6d9d076aa4d154aeac6..415c6fd01dd871729c054f916702f9f3062c346c 100644
|
||||
index 9f7336a4db680c7f9b8e5486f6b12d2c08b7fefe..7c233b03bac04520f0be9148fcd12282680bd39d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||
@@ -160,7 +160,7 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
|
||||
@@ -163,7 +163,7 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
|
||||
}
|
||||
|
||||
@Override
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerShearBlockEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
index 97ae550e388a8fa139fa36b830351f233db5da86..26f928ad94aed7f1078a31d8a0af2dc377a48d0f 100644
|
||||
index 9d61c9ada132af89292a5da7d3cce7777a961c13..61539bd963acf46f5f05865b235f9dbc05c771c3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
@@ -113,7 +113,7 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
@@ -120,7 +120,7 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
}
|
||||
|
||||
public static void dropHoneycomb(Level world, BlockPos pos) {
|
||||
@ -17,7 +17,7 @@ index 97ae550e388a8fa139fa36b830351f233db5da86..26f928ad94aed7f1078a31d8a0af2dc3
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -126,8 +126,19 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
@@ -133,8 +133,19 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
Item item = itemstack.getItem();
|
||||
|
||||
if (itemstack.is(Items.SHEARS)) {
|
@ -8,10 +8,10 @@ and curing a villager on repeat by simply resetting the relevant part of
|
||||
the reputation when it is cured.
|
||||
|
||||
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 24434b66d158b10d21579b2db6efb0bdcc788a5c..4bef7abbed6b64c2f126c81af5484eff200e620f 100644
|
||||
index f58be4e2529759cc64df2c70a69ef56eabbb762d..84cee8fb09f90424438de336f60d9388da1b39de 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -1000,6 +1000,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -1009,6 +1009,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@Override
|
||||
public void onReputationEventFrom(ReputationEventType interaction, Entity entity) {
|
||||
if (interaction == ReputationEventType.ZOMBIE_VILLAGER_CURED) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Limit recipe packets
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c115d103cbc28a511aedcdcd40ce6a50a777b102..cb0cfd2d6b5e45771c99bd0b8dd5debd29064c7b 100644
|
||||
index a4345db5d89b1a2384f4cab421946f05bf846687..38310db2a998dbac413eb73f128a9a945bcff100 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -268,6 +268,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -254,6 +254,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// CraftBukkit start - multithreaded fields
|
||||
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
|
||||
private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits
|
||||
@ -16,7 +16,7 @@ index c115d103cbc28a511aedcdcd40ce6a50a777b102..cb0cfd2d6b5e45771c99bd0b8dd5debd
|
||||
// CraftBukkit end
|
||||
private int dropSpamTickCount;
|
||||
private double firstGoodX;
|
||||
@@ -420,6 +421,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -375,6 +376,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// CraftBukkit start
|
||||
for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ;
|
||||
if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable
|
||||
@ -24,7 +24,7 @@ index c115d103cbc28a511aedcdcd40ce6a50a777b102..cb0cfd2d6b5e45771c99bd0b8dd5debd
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -3115,6 +3117,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2967,6 +2969,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
|
34
patches/server/0497-Player-Chunk-Load-Unload-Events.patch
Normale Datei
34
patches/server/0497-Player-Chunk-Load-Unload-Events.patch
Normale Datei
@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: ysl3000 <yannicklamprecht@live.de>
|
||||
Date: Mon, 5 Oct 2020 21:25:16 +0200
|
||||
Subject: [PATCH] Player Chunk Load/Unload Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/PlayerChunkSender.java b/src/main/java/net/minecraft/server/network/PlayerChunkSender.java
|
||||
index c509a1318bcef38fd4927e38b6ee9846853e2d15..c442be2119fcf5b4540b0b873519c64a1367c1f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerChunkSender.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerChunkSender.java
|
||||
@@ -45,6 +45,11 @@ public class PlayerChunkSender {
|
||||
public void dropChunk(ServerPlayer player, ChunkPos pos) {
|
||||
if (!this.pendingChunks.remove(pos.toLong()) && player.isAlive()) {
|
||||
player.connection.send(new ClientboundForgetLevelChunkPacket(pos));
|
||||
+ // Paper start
|
||||
+ if(io.papermc.paper.event.packet.PlayerChunkUnloadEvent.getHandlerList().getRegisteredListeners().length > 0){
|
||||
+ new io.papermc.paper.event.packet.PlayerChunkUnloadEvent(player.getBukkitEntity().getWorld().getChunkAt(pos.longKey), player.getBukkitEntity()).callEvent();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
}
|
||||
@@ -77,6 +82,11 @@ public class PlayerChunkSender {
|
||||
|
||||
private static void sendChunk(ServerGamePacketListenerImpl handler, ServerLevel world, LevelChunk chunk) {
|
||||
handler.send(new ClientboundLevelChunkWithLightPacket(chunk, world.getLightEngine(), (BitSet)null, (BitSet)null));
|
||||
+ // Paper start
|
||||
+ if(io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0){
|
||||
+ new io.papermc.paper.event.packet.PlayerChunkLoadEvent(new org.bukkit.craftbukkit.CraftChunk(chunk), handler.getPlayer().getBukkitEntity()).callEvent();
|
||||
+ }
|
||||
+ // Paper end
|
||||
ChunkPos chunkPos = chunk.getPos();
|
||||
DebugPackets.sendPoiPacketsForChunk(world, chunkPos);
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose LivingEntity hurt direction
|
||||
|
||||
|
||||
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 a8731cf957da9aad7ed6f5d372500bc34afd32ca..b36492efc3d6338e0099988c1ff31e7211b7d010 100644
|
||||
index 00d9dd5affd62ceb35bb783d6bcc9e1e600c0fb4..c44f8ed810b0c9a510d7e1c07987323a8a620ca4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -182,7 +182,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -183,7 +183,7 @@ public abstract class Player extends LivingEntity {
|
||||
private Optional<GlobalPos> lastDeathLocation;
|
||||
@Nullable
|
||||
public FishingHook fishing;
|
||||
@ -18,7 +18,7 @@ index a8731cf957da9aad7ed6f5d372500bc34afd32ca..b36492efc3d6338e0099988c1ff31e72
|
||||
public boolean affectsSpawning = true;
|
||||
// Paper end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index f4cda5fbf12c59dc1ecec4aac6719837444382e2..8d1bbc1ac3dbc10e940a0715ebfa1d5a2674b303 100644
|
||||
index 05d9a9968588381aaa3aeb06ef4d18fed4085229..c9f4f496a92ff8465a21f22f326dc025aa8bd169 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -126,6 +126,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@ -36,7 +36,7 @@ index f4cda5fbf12c59dc1ecec4aac6719837444382e2..8d1bbc1ac3dbc10e940a0715ebfa1d5a
|
||||
public int getSleepTicks() {
|
||||
return this.getHandle().sleepCounter;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index fa6b00e3055224a53eb6ec93431d70df27b6c6d1..eae5d75cd93416235690196cf2c88e7a17e1b97a 100644
|
||||
index 833c1d37fde5e726933da6ac0076c6ea072389ca..4d41a73281c851c1ff9506074f7590c06105efbb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -932,5 +932,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index ab6f24426031d47d25fcf94421569a3276cdca9a..a82a5fd54a962fdcf86f2bc139085ed526cade5e 100644
|
||||
index 9bdfb16720c9e5ca3254f8ea8463ca10077992ea..84941643036e4dc1cf135a24360e6a1c011969d5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -300,6 +300,10 @@ public class CraftEventFactory {
|
||||
@@ -302,6 +302,10 @@ public class CraftEventFactory {
|
||||
return BedEnterResult.TOO_FAR_AWAY;
|
||||
case NOT_SAFE:
|
||||
return BedEnterResult.NOT_SAFE;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Do not crash from invalid ingredient lists in
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
index 0a62cf36a95d7bf1287acdd17464fc677c7a4b7d..fe003c42f002e229111c46a79ac6a961c60db912 100644
|
||||
index 629b79c6e59944994295768904c449733764cf99..3dfe2c483f76d0ba11674b3c4e05e33daebeedb5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
@@ -275,7 +275,11 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -261,7 +261,11 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
}
|
||||
if (!event.isCancelled()) {
|
||||
@ -21,4 +21,4 @@ index 0a62cf36a95d7bf1287acdd17464fc677c7a4b7d..fe003c42f002e229111c46a79ac6a961
|
||||
+ // Paper end
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
++j;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerTradeEvent and PlayerPurchaseEvent
|
||||
Co-authored-by: Alexander <protonull@protonmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
index fe003c42f002e229111c46a79ac6a961c60db912..564908ce0a560c2190fb624e77d227d3b7031024 100644
|
||||
index 3dfe2c483f76d0ba11674b3c4e05e33daebeedb5..5119d070dbb04f5a4f9c2def526e33e15ca8573f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
@@ -138,11 +138,24 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -137,11 +137,24 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@Override
|
||||
public void overrideXp(int experience) {}
|
||||
|
||||
@ -37,7 +37,7 @@ index fe003c42f002e229111c46a79ac6a961c60db912..564908ce0a560c2190fb624e77d227d3
|
||||
CriteriaTriggers.TRADE.trigger((ServerPlayer) this.tradingPlayer, this, offer.getResult());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index 85a6bc46817c7272855a7f3aa8c206d7b3f8512e..4ac91ba7dc754b120189fd32d24076d51b17d7c6 100644
|
||||
index 35b2e4853c2791a39ebfd75c4c0208c998a43160..877b80ef3028acd9a783adf933286be0a86227bf 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -756,6 +756,14 @@ public abstract class AbstractContainerMenu {
|
||||
@ -207,7 +207,7 @@ index e49bbb803399ef696665c5844a18b55a551654f6..1f2b9a9a3fa167e2ba021c823dd142b0
|
||||
this.slots.setItem(0, itemStack);
|
||||
this.slots.setItem(1, itemStack2);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/trading/Merchant.java b/src/main/java/net/minecraft/world/item/trading/Merchant.java
|
||||
index d41f44ed2e497ba3373d170c08488b49e88334c4..d3a99ba6f3085ad12b67ddc94cc4ab393ec7ecbe 100644
|
||||
index 5a350948a4735902f5c612592bc9d100445a0c8a..716b30dcd7e63c66736c448dd136c9f74dc7fe43 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/trading/Merchant.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/trading/Merchant.java
|
||||
@@ -20,6 +20,7 @@ public interface Merchant {
|
@ -9,7 +9,7 @@ loss, which forces the server to lose the same precision as the client
|
||||
keeping them in sync.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java
|
||||
index 5ca3ad7b3d7606accd0a58b3c708fadb349608f7..4b6e0fe2fabcc55007fd8979e81f66df9c0278b7 100644
|
||||
index 05ac41e136da43284fb24a6b698ebd36318278fb..33d9131e9c75ef23cd637f5d6c39a2704a0c92a5 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java
|
||||
@@ -9,12 +9,12 @@ public class VecDeltaCodec {
|
||||
@ -28,13 +28,13 @@ index 5ca3ad7b3d7606accd0a58b3c708fadb349608f7..4b6e0fe2fabcc55007fd8979e81f66df
|
||||
|
||||
public Vec3 decode(long x, long y, long z) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 01c5a986d7d5c87cb7bf574a2f59e57dd5b347e2..1bca9f5d58c5adfff3610ab1e7296de3647adaec 100644
|
||||
index b8c41d759858fcb7b5db48351f352deac7796634..37906167da097b6a6308e8c358d6a344c605d550 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4221,6 +4221,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return;
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@@ -4147,6 +4147,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
public final void setPosRaw(double x, double y, double z, boolean forceBoundingBoxUpdate) {
|
||||
// Paper end
|
||||
+ // Paper start - fix MC-4
|
||||
+ if (this instanceof ItemEntity) {
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.fixEntityPositionDesync) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Cache burn durations
|
||||
|
||||
|
||||
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 40dc29288a13ae9c1f8b0434922fdb5c7d02daa9..5ea9a6e9fa197fd00952c5ade426d7de50497a5e 100644
|
||||
index d7a89c2b70de20f632ee210780ede0bc36369710..b6e31bede16f7dbc9abb6609f1c39b82883512b2 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
|
||||
@@ -133,7 +133,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
@ -12,7 +12,7 @@ requesting the world.
|
||||
Track spigot issue to see when fixed: https://hub.spigotmc.org/jira/browse/SPIGOT-6181
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index d6ed799716f13cb3f72e66f9d57c6ec90c1eb272..7a6fbd4be33e93c7f09b1ed146ae25fe6c6b503c 100644
|
||||
index e1623ade449fe56ec51955ee9594a93f85660c51..5992f450f01349ce49286c34b8af56737de01a45 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -15,6 +15,8 @@ import net.minecraft.core.BlockPos;
|
||||
@ -24,7 +24,7 @@ index d6ed799716f13cb3f72e66f9d57c6ec90c1eb272..7a6fbd4be33e93c7f09b1ed146ae25fe
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
@@ -103,7 +105,26 @@ public class MapItemSavedData extends SavedData {
|
||||
@@ -110,7 +112,26 @@ public class MapItemSavedData extends SavedData {
|
||||
}
|
||||
|
||||
public static MapItemSavedData load(CompoundTag nbt) {
|
@ -11,10 +11,10 @@ Subject: [PATCH] Fix interact event not being called sometimes
|
||||
Co-authored-by: Moulberry <james.jenour@protonmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index cb0cfd2d6b5e45771c99bd0b8dd5debd29064c7b..240b1f8efa672fb6d1967ef2b895c6710596e2cd 100644
|
||||
index 38310db2a998dbac413eb73f128a9a945bcff100..2921754736ce51b76337e1ef9d052e680af01db5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1839,7 +1839,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1726,7 +1726,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED);
|
||||
|
||||
this.player.sendSystemMessage(ichatmutablecomponent, true);
|
||||
@ -23,7 +23,7 @@ index cb0cfd2d6b5e45771c99bd0b8dd5debd29064c7b..240b1f8efa672fb6d1967ef2b895c671
|
||||
this.player.swing(enumhand, true);
|
||||
}
|
||||
}
|
||||
@@ -2447,13 +2447,20 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2288,13 +2288,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
double d3 = player.gameMode.getGameModeForPlayer() == GameType.CREATIVE ? 5.0D : 4.5D;
|
||||
// SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time
|
||||
// SPIGOT-7429: Make sure to call PlayerInteractEvent for spectators and non-pickable entities
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix nerfed slime when splitting
|
||||
|
||||
|
||||
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 30779b817db6f8e392036b4ec66e1c5cf50cd0f5..b0c5324dadc0a66786ec5edb7b4796ceeaa8e0d2 100644
|
||||
index 4677e47e4a84d09025cfb9327c1ed3bead1a3feb..21311d67565443b4ef59f8676f616237d28a8084 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
@@ -241,6 +241,7 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -243,6 +243,7 @@ public class Slime extends Mob implements Enemy {
|
||||
entityslime.setPersistenceRequired();
|
||||
}
|
||||
|
@ -18,10 +18,10 @@ index c8c358531dbc167e249bac2af246c5e34fbdd4df..307854468ac985560b4c63b6e9897c44
|
||||
return Component.translatable("commands.gamerule.set", key.getId(), t0.toString());
|
||||
}, true);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
index 4a0321f56ef80aa4991e61f586ddd3f6b45e499b..de713f1ca1d61a6b1fca2b66de9162556d102449 100644
|
||||
index 6a1001cb708a7f779a801428d2b00fbcde888bc1..2e240ad721928a9a68370114ba61c21884ef1472 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
@@ -271,10 +271,10 @@ public class GameRules {
|
||||
@@ -281,10 +281,10 @@ public class GameRules {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ index 4a0321f56ef80aa4991e61f586ddd3f6b45e499b..de713f1ca1d61a6b1fca2b66de916255
|
||||
this.onChanged(((CommandSourceStack) context.getSource()).getServer());
|
||||
}
|
||||
|
||||
@@ -332,8 +332,11 @@ public class GameRules {
|
||||
@@ -342,8 +342,11 @@ public class GameRules {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -49,7 +49,7 @@ index 4a0321f56ef80aa4991e61f586ddd3f6b45e499b..de713f1ca1d61a6b1fca2b66de916255
|
||||
}
|
||||
|
||||
public boolean get() {
|
||||
@@ -397,8 +400,11 @@ public class GameRules {
|
||||
@@ -407,8 +410,11 @@ public class GameRules {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -64,10 +64,10 @@ index 4a0321f56ef80aa4991e61f586ddd3f6b45e499b..de713f1ca1d61a6b1fca2b66de916255
|
||||
|
||||
public int get() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index e754bb3ce28c3bd253698e2065121aafdfe94230..3e5ba6392c25e2bf9503a5429e96ffb04147ac99 100644
|
||||
index b9a5d94c31b20a87ed96d8e85a28e63400353353..c4df1d66ecdecef0aa03d4995d9e951421dae6dd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1845,8 +1845,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1850,8 +1850,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
if (!this.isGameRule(rule)) return false;
|
||||
|
||||
@ -82,7 +82,7 @@ index e754bb3ce28c3bd253698e2065121aafdfe94230..3e5ba6392c25e2bf9503a5429e96ffb0
|
||||
handle.onChanged(this.getHandle().getServer());
|
||||
return true;
|
||||
}
|
||||
@@ -1882,8 +1887,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1887,8 +1892,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
if (!this.isGameRule(rule.getName())) return false;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8c9ebc501282e929503c39607048e032f05fbb9c..892830b2d9a15a832040fbeac5fca3d011082c27 100644
|
||||
index 22b1efc8927d6f168694b2bde957d960661bb1c4..2d2e7fe673962cdf21a7623b51e2731132cd3c01 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2008,7 +2008,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2014,7 +2014,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.functionManager;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ index 8c9ebc501282e929503c39607048e032f05fbb9c..892830b2d9a15a832040fbeac5fca3d0
|
||||
RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE);
|
||||
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
||||
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
|
||||
@@ -2049,6 +2055,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2055,6 +2061,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings, they can be defined by datapacks so refresh it here
|
@ -1,75 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: DigitalRegent <misterwener@gmail.com>
|
||||
Date: Sat, 11 Apr 2020 13:10:58 +0200
|
||||
Subject: [PATCH] Brand support
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3ddf29100807d5882e20395466d420fb169c2f87..37e5b479a093184e7d8d05c13e69b2682b5dac92 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -304,6 +304,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
||||
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper
|
||||
|
||||
+ private String clientBrandName = null; // Paper - Brand name
|
||||
+
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
this.lastSeenMessages = new LastSeenMessagesValidator(20);
|
||||
@@ -3316,6 +3318,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register");
|
||||
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
|
||||
|
||||
+ private static final ResourceLocation MINECRAFT_BRAND = new ResourceLocation("brand"); // Paper - Brand support
|
||||
+
|
||||
@Override
|
||||
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
@@ -3343,6 +3347,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
try {
|
||||
byte[] data = new byte[packet.data.readableBytes()];
|
||||
packet.data.readBytes(data);
|
||||
+ // Paper start - Brand support
|
||||
+ if (packet.identifier.equals(MINECRAFT_BRAND)) {
|
||||
+ try {
|
||||
+ this.clientBrandName = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.copiedBuffer(data)).readUtf(256);
|
||||
+ } catch (StringIndexOutOfBoundsException ex) {
|
||||
+ this.clientBrandName = "illegal";
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
@@ -3352,6 +3365,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
}
|
||||
|
||||
+ // Paper start - brand support
|
||||
+ public String getClientBrandName() {
|
||||
+ return clientBrandName;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public final boolean isDisconnected() {
|
||||
return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index cb9482240de0d5d56be4ec591b4fbb23006767c1..c96efc055e44dcc7880abb3a6e7b4c441aa9a112 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2991,6 +2991,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Paper end
|
||||
};
|
||||
|
||||
+ // Paper start - brand support
|
||||
+ @Override
|
||||
+ public String getClientBrandName() {
|
||||
+ return getHandle().connection != null ? getHandle().connection.getClientBrandName() : null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public Player.Spigot spigot()
|
||||
{
|
||||
return this.spigot;
|
@ -1,32 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: ysl3000 <yannicklamprecht@live.de>
|
||||
Date: Mon, 5 Oct 2020 21:25:16 +0200
|
||||
Subject: [PATCH] Player Chunk Load/Unload Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 0b81878a951643af1ce785b3adcca9b3eec7f1c3..4581bdf4525c05df235e47ab772fbf5c5f2d6b50 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2232,11 +2232,21 @@ public class ServerPlayer extends Player {
|
||||
|
||||
public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) {
|
||||
this.connection.send(chunkDataPacket);
|
||||
+ // Paper start
|
||||
+ if(io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0){
|
||||
+ new io.papermc.paper.event.packet.PlayerChunkLoadEvent(this.getBukkitEntity().getWorld().getChunkAt(chunkPos.longKey), this.getBukkitEntity()).callEvent();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public void untrackChunk(ChunkPos chunkPos) {
|
||||
if (this.isAlive()) {
|
||||
this.connection.send(new ClientboundForgetLevelChunkPacket(chunkPos.x, chunkPos.z));
|
||||
+ // Paper start
|
||||
+ if(io.papermc.paper.event.packet.PlayerChunkUnloadEvent.getHandlerList().getRegisteredListeners().length > 0){
|
||||
+ new io.papermc.paper.event.packet.PlayerChunkUnloadEvent(this.getBukkitEntity().getWorld().getChunkAt(chunkPos.longKey), this.getBukkitEntity()).callEvent();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren