13
0
geforkt von Mirrors/Paper
Dieser Commit ist enthalten in:
Jason Penilla 2023-12-05 20:00:14 -07:00
Ursprung bdbdca8a56
Commit 5513f8a795
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0E75A301420E48F8
148 geänderte Dateien mit 361 neuen und 355 gelöschten Zeilen

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk and player saving
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 219e191ff4d590aee9b7a704ba6fe84c3c12f43a..a5353af5ff47b5be7dac9a4e55989ad9490cf30f 100644
index 87e0cc467a2139e763130a375387b6df46336992..a82f7dd2cbc2f6311b810f117f0970a47db85818 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -855,7 +855,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -901,7 +901,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try {
this.isSaving = true;
@ -17,11 +17,14 @@ index 219e191ff4d590aee9b7a704ba6fe84c3c12f43a..a5353af5ff47b5be7dac9a4e55989ad9
flag3 = this.saveAllChunks(suppressLogs, flush, force);
} finally {
this.isSaving = false;
@@ -1363,13 +1363,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.status = this.buildServerStatus();
@@ -1433,16 +1433,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
- if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
--this.ticksUntilAutosave;
- // CraftBukkit start
- if (this.autosavePeriod > 0 && this.ticksUntilAutosave <= 0) {
- this.ticksUntilAutosave = this.autosavePeriod;
- // CraftBukkit end
- MinecraftServer.LOGGER.debug("Autosave started");
- this.profiler.push("save");
- this.saveEverything(true, false, false);
@ -53,10 +56,10 @@ index 219e191ff4d590aee9b7a704ba6fe84c3c12f43a..a5353af5ff47b5be7dac9a4e55989ad9
// Paper start - move executeAll() into full server tick timing
try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index e27067e72a49e127aa4abb17f5ed1df09f943f3c..4e58f31e4852a0811f85596653f6db630a75b069 100644
index 3a8a4757b9b39b48cbedd65620a114130ae6ab1c..e725dd92ae15f62b078bda3572d0663468f37939 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -452,6 +452,15 @@ public class ServerChunkCache extends ChunkSource {
@@ -450,6 +450,15 @@ public class ServerChunkCache extends ChunkSource {
} // Paper - Timings
}
@ -73,10 +76,10 @@ index e27067e72a49e127aa4abb17f5ed1df09f943f3c..4e58f31e4852a0811f85596653f6db63
public void close() throws IOException {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 58a44898144af605e6e7d9253d99149ddc12bcbd..c1214a8f53428c19ca1fc72942f5040066f45b12 100644
index 8dc958dca402346d94d84c3d5c073cf00c438cee..d9fafffc52b5db0b55022c02b9321d47a2b49827 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1283,6 +1283,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1302,6 +1302,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
return !this.server.isUnderSpawnProtection(this, pos, player) && this.getWorldBorder().isWithinBounds(pos);
}
@ -115,22 +118,22 @@ index 58a44898144af605e6e7d9253d99149ddc12bcbd..c1214a8f53428c19ca1fc72942f50400
// Paper start - rewrite chunk system - add close param
this.save(progressListener, flush, savingDisabled, false);
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index a3c1797549e3b149f425f857bbf8564c5ef1e30e..2c2b1aef3f510edb9bb124581739f06692ab5673 100644
index 898403dad5e9bac4b565e1c75871245fe5cd7908..25c5f23b859961c792b2ec08404171eea1aedba7 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -184,6 +184,7 @@ import org.bukkit.inventory.MainHand;
@@ -190,6 +190,7 @@ import org.bukkit.inventory.MainHand;
public class ServerPlayer extends Player {
private static final Logger LOGGER = LogUtils.getLogger();
+ public long lastSave = MinecraftServer.currentTick; // Paper
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ = 32;
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
public ServerGamePacketListenerImpl connection;
private static final int FLY_STAT_RECORDING_SPEED = 25;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index ac6c1c1cf0d736c31a4e3666cb9e10ba8bc1c7c5..3c7257d745406b4675155d7990a6661db7391d6b 100644
index ac5e83589b812290032773755f51c89107ccb5a4..ccf715d1ddb029ebadbab88be8ef1e914b5220be 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -554,6 +554,7 @@ public abstract class PlayerList {
@@ -552,6 +552,7 @@ public abstract class PlayerList {
protected void save(ServerPlayer player) {
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
@ -138,7 +141,7 @@ index ac6c1c1cf0d736c31a4e3666cb9e10ba8bc1c7c5..3c7257d745406b4675155d7990a6661d
this.playerIo.save(player);
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
@@ -1151,10 +1152,22 @@ public abstract class PlayerList {
@@ -1149,10 +1150,22 @@ public abstract class PlayerList {
}
public void saveAll() {

Datei anzeigen

@ -8,10 +8,10 @@ We have stored UUID in plenty of places that did not get DFU'd
So just look for old format and load it if it exists.
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
index ad0251b73d21b36bf19e9aa649817b4da2d0a6b4..84fc2adf591f02a14862f7c1cd645c2efde55c3d 100644
index 135530bc9d7ecd0348ace6474f4ca6d2e1bad283..e464ada187fd1f15efef29a0e5033aeb0c688059 100644
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
@@ -233,6 +233,12 @@ public class CompoundTag implements Tag {
@@ -237,6 +237,12 @@ public class CompoundTag implements Tag {
}
public void putUUID(String key, UUID value) {
@ -24,7 +24,7 @@ index ad0251b73d21b36bf19e9aa649817b4da2d0a6b4..84fc2adf591f02a14862f7c1cd645c2e
this.tags.put(key, NbtUtils.createUUID(value));
}
@@ -241,10 +247,20 @@ public class CompoundTag implements Tag {
@@ -245,10 +251,20 @@ public class CompoundTag implements Tag {
* You must use {@link #hasUUID(String)} before or else it <b>will</b> throw an NPE.
*/
public UUID getUUID(String key) {

Datei anzeigen

@ -30,10 +30,10 @@ index d4dba8c733c7560e5108b8d239b52e593f8debec..ea48f1119a940056c37d1d203437bfbf
public CraftAttributeMap(AttributeMap handle) {
this.handle = handle;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index e29134181d5b032311fe163b48fbe53f1298c6fd..33772b435557caed9e024547f101fc0b16668b8f 100644
index 4e1f436cbe47ba08c731be781fb372b20c497de6..f66104abef112ed1056f6f70b38c1d7865431a6c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -484,7 +484,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -485,7 +485,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 33772b435557caed9e024547f101fc0b16668b8f..0766b991079bfda1558cc17b75ff3dd06c1ad725 100644
index f66104abef112ed1056f6f70b38c1d7865431a6c..9c20c225ba46f2126a43e2f879f4849081cae90a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -878,11 +878,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -879,11 +879,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return CraftChatMessage.fromJSONComponent(this.displayName);
}
@ -32,7 +32,7 @@ index 33772b435557caed9e024547f101fc0b16668b8f..0766b991079bfda1558cc17b75ff3dd0
@Override
public boolean hasDisplayName() {
return this.displayName != null;
@@ -1025,6 +1037,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1026,6 +1038,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromJSONComponent));
}
@ -47,7 +47,7 @@ index 33772b435557caed9e024547f101fc0b16668b8f..0766b991079bfda1558cc17b75ff3dd0
@Override
public void setLore(List<String> lore) {
if (lore == null || lore.isEmpty()) {
@@ -1039,6 +1059,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1040,6 +1060,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@ -69,7 +69,7 @@ index 33772b435557caed9e024547f101fc0b16668b8f..0766b991079bfda1558cc17b75ff3dd0
@Override
public boolean hasCustomModelData() {
return this.customModelData != null;
@@ -1507,6 +1542,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1508,6 +1543,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
for (Object object : addFrom) {

Datei anzeigen

@ -8,10 +8,10 @@ public net.minecraft.world.entity.Entity isInRain()Z
public net.minecraft.world.entity.Entity isInBubbleColumn()Z
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index e1f75dfcb22918d953d35d345280c61301688ac7..0498a83ceb4c009b76086dc44f80395efaab797e 100644
index b06c338ee9205d1f4d562571aba83c83f9abd20b..ded0332f5be000e31962e34033e69d17eed51280 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1328,5 +1328,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1372,5 +1372,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason() {
return getHandle().spawnReason;
}

Datei anzeigen

@ -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 877951fd07dece86fa59aee6f38a787722756688..abaafcff3f7a5e710319c93313a4ecf9874b7ef8 100644
index 19e8d10727fc4838cd8261dfec92f3828ea5b09f..b5080861a4aa34a95618bcee7723bd3ec34b09c4 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -172,6 +172,44 @@ public final class ItemStack {
@@ -195,6 +195,44 @@ public final class ItemStack {
list.sort((java.util.Comparator<? super net.minecraft.nbt.Tag>) enchantSorter); // Paper
} catch (Exception ignored) {}
}
@ -53,9 +53,9 @@ index 877951fd07dece86fa59aee6f38a787722756688..abaafcff3f7a5e710319c93313a4ecf9
// Paper end
public ItemStack(ItemLike item) {
@@ -223,6 +261,7 @@ public final class ItemStack {
@@ -244,6 +282,7 @@ public final class ItemStack {
if (nbttagcompound.contains("tag", 10)) {
this.tag = nbttagcompound.getCompound("tag").copy();
// CraftBukkit end
this.processEnchantOrder(this.tag); // Paper
+ this.processText(); // Paper
this.getItem().verifyTagAfterLoad(this.tag);

Datei anzeigen

@ -94,10 +94,10 @@ index 9c2fe69ced7a46bbd8b0fbe10fa67d0a39b0f375..70ecc3f673ebd56b65ad901e10f40c28
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 c634a4b0d835df3ad6129ca03e11668f715ab8d2..265a30230c0dde7bb48f5ed0e6ebb91556d5b51f 100644
index 839deebc72a575eea5db4decd82c8c8b1884e621..ce0d05009a9b88607a143ad40421d70148491817 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1718,26 +1718,53 @@ public class CraftEventFactory {
@@ -1717,26 +1717,53 @@ public class CraftEventFactory {
return event;
}

Datei anzeigen

@ -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 109c381adefd61c69768ce1572873b2e629aff0e..2b0178507a39c95fff94bea382bacebb8c40f1b7 100644
index 4b1366a456e7132d438fc99bd62e1dd77e35b35f..90c66f87e721ef34bf3f47b601456fece3064225 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3508,7 +3508,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3510,7 +3510,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Entity entity = this.getVehicle();
super.stopRiding(suppressCancellation); // Paper - suppress

Datei anzeigen

@ -9,10 +9,10 @@ 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 a8caa11bd0ef045b29cc3cb452dec9fd41948045..53de7f516aee20cb7b5db0648dea1c38d74e5d96 100644
index 385cbee1d30735152cccb0d85a77a12fabfd9427..004c130fc03dc01ef75fabdb4ef1ef711e33cb95 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 {
@@ -207,6 +207,7 @@ public abstract class AbstractArrow extends Projectile {
++this.inGroundTime;
} else {

Datei anzeigen

@ -26,19 +26,19 @@ 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 e6bf044a0de278c568835e6150ce07ed0e39a44e..7dfd18cfda943ea4486249e20d9763b8465c9601 100644
index 75b7b3cf90d1d67203ae19dc3302f06a57470f92..e58c2844356c71973d81b460a21aab795b506d77 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
@@ -64,7 +64,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
private final Vec2 rotation;
private final CommandSigningContext signingContext;
private final TaskChainer chatMessageChainer;
private final IntConsumer returnValueConsumer;
- public volatile CommandNode currentCommand; // CraftBukkit
+ public java.util.Map<Thread, CommandNode> currentCommand = new java.util.concurrent.ConcurrentHashMap<>(); // CraftBukkit // Paper
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) {
@@ -199,9 +199,11 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
@@ -193,9 +193,11 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
@Override
public boolean hasPermission(int level) {
// CraftBukkit start

Datei anzeigen

@ -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 3c7257d745406b4675155d7990a6661db7391d6b..e9b5d987c1891ba269ba6beec57c1e0fb65dbb4d 100644
index ccf715d1ddb029ebadbab88be8ef1e914b5220be..7f05a1c3847c36699d3c9acbb1d7cd05363c94c5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -810,6 +810,7 @@ public abstract class PlayerList {
@@ -808,6 +808,7 @@ public abstract class PlayerList {
// Paper start
boolean isBedSpawn = false;
boolean isRespawn = false;
@ -21,7 +21,7 @@ index 3c7257d745406b4675155d7990a6661db7391d6b..e9b5d987c1891ba269ba6beec57c1e0f
// Paper end
// CraftBukkit start - fire PlayerRespawnEvent
@@ -820,7 +821,7 @@ public abstract class PlayerList {
@@ -818,7 +819,7 @@ public abstract class PlayerList {
Optional optional;
if (blockposition != null) {
@ -30,7 +30,7 @@ index 3c7257d745406b4675155d7990a6661db7391d6b..e9b5d987c1891ba269ba6beec57c1e0f
} else {
optional = Optional.empty();
}
@@ -864,7 +865,12 @@ public abstract class PlayerList {
@@ -862,7 +863,12 @@ public abstract class PlayerList {
}
// Spigot End
@ -44,7 +44,7 @@ index 3c7257d745406b4675155d7990a6661db7391d6b..e9b5d987c1891ba269ba6beec57c1e0f
if (!flag) entityplayer.reset(); // SPIGOT-4785
isRespawn = true; // Paper
} else {
@@ -903,8 +909,14 @@ public abstract class PlayerList {
@@ -901,8 +907,14 @@ public abstract class PlayerList {
}
// entityplayer1.initInventoryMenu();
entityplayer1.setHealth(entityplayer1.getHealth());

Datei anzeigen

@ -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 1b97195394161e067312b71c81ddd448b92c5e44..91b6aeae1e573dfbc8ec54f5ce279a5b43b055c7 100644
index 22f53d722f8e567554d2f7ed6c683e76cd74a1ef..49553615418bcbb6f3e4be6f38a9ecd0a650502b 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -177,8 +177,17 @@ public class Main {
@@ -175,8 +175,17 @@ public class Main {
return;
}
@ -29,7 +29,7 @@ index 1b97195394161e067312b71c81ddd448b92c5e44..91b6aeae1e573dfbc8ec54f5ce279a5b
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
diff --git a/src/main/java/net/minecraft/server/Services.java b/src/main/java/net/minecraft/server/Services.java
index f1cc27809c1e8612f7c4fa912f5e39c07b09d808..a9b2c8cd4dcd3f884e4306bebee9334d3848fce5 100644
index 92d1ad919c1b3e27af9cc74ada19f1e9c4f3471f..a5450eeeab5a6b0ab273810063806d11107d6b26 100644
--- a/src/main/java/net/minecraft/server/Services.java
+++ b/src/main/java/net/minecraft/server/Services.java
@@ -22,12 +22,12 @@ public record Services(MinecraftSessionService sessionService, ServicesKeySet se

Datei anzeigen

@ -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 91b6aeae1e573dfbc8ec54f5ce279a5b43b055c7..0368c64403eacf98b85ab15ed71312d932cb59c9 100644
index 49553615418bcbb6f3e4be6f38a9ecd0a650502b..0cb453b03977e90addc26f71d0518f134af3c36a 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -177,6 +177,7 @@ public class Main {
@@ -175,6 +175,7 @@ public class Main {
return;
}

Datei anzeigen

@ -9,10 +9,10 @@ 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 8ae5d6bc6aa3b0bd51a88bf1ce27a01aad881b43..f0367a9cce13ef576fbb7023c0aba6eb48963606 100644
index 5450734060428426981e2c1f1025b1aa5aa4d271..0a22ed467d04c6421f4f8ef227a665ae135a5b0b 100644
--- a/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
+++ b/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
@@ -16,22 +16,22 @@ import net.minecraft.server.level.ServerPlayer;
@@ -15,22 +15,22 @@ import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.level.storage.loot.LootContext;
public abstract class SimpleCriterionTrigger<T extends SimpleCriterionTrigger.SimpleInstance> implements CriterionTrigger<T> {
@ -39,7 +39,7 @@ index 8ae5d6bc6aa3b0bd51a88bf1ce27a01aad881b43..f0367a9cce13ef576fbb7023c0aba6eb
}
}
@@ -39,7 +39,7 @@ public abstract class SimpleCriterionTrigger<T extends SimpleCriterionTrigger.Si
@@ -38,12 +38,12 @@ public abstract class SimpleCriterionTrigger<T extends SimpleCriterionTrigger.Si
@Override
public final void removePlayerListeners(PlayerAdvancements tracker) {
@ -47,9 +47,6 @@ index 8ae5d6bc6aa3b0bd51a88bf1ce27a01aad881b43..f0367a9cce13ef576fbb7023c0aba6eb
+ tracker.criterionData.remove(this); // Paper - fix AdvancementDataPlayer leak
}
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();
- Set<CriterionTrigger.Listener<T>> set = this.players.get(playerAdvancements);
@ -58,10 +55,10 @@ index 8ae5d6bc6aa3b0bd51a88bf1ce27a01aad881b43..f0367a9cce13ef576fbb7023c0aba6eb
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 6487bf016e646ca772b667a2a81c85e82c027c05..d03db10517b2df98b40ab48e450333960508aabf 100644
index f6daa77856f5d57b1a3b38e709bff47214372973..f29ddc244cfa5eba9b2903d40d8509731fc18287 100644
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
@@ -64,6 +64,7 @@ public class PlayerAdvancements {
@@ -63,6 +63,7 @@ public class PlayerAdvancements {
private AdvancementHolder lastSelectedTab;
private boolean isFirstPacket = true;
private final Codec<PlayerAdvancements.Data> codec;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Optimize NetworkManager Exception Handling
diff --git a/src/main/java/net/minecraft/network/ConnectionProtocol.java b/src/main/java/net/minecraft/network/ConnectionProtocol.java
index 749d2a94d07727feb6e09e8461fc457b48c5b5f7..c9a6b5be8f0e382c373bd4ecbff1269d5cf6c850 100644
index ac1aa37329bd4d411964ea34ea8147f6db945b9a..41899d6c141895fc6c2c5da763bbe36864d557f7 100644
--- a/src/main/java/net/minecraft/network/ConnectionProtocol.java
+++ b/src/main/java/net/minecraft/network/ConnectionProtocol.java
@@ -336,6 +336,7 @@ public enum ConnectionProtocol {
@@ -341,6 +341,7 @@ public enum ConnectionProtocol {
@Nullable
public Packet<?> createPacket(int id, FriendlyByteBuf buf) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix some rails connecting improperly
diff --git a/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java b/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java
index 682e1cd0f4307bcc716ab82e375bd04cde095aa0..547d09c3a1cd0c5401aacb78886896365ba192e7 100644
index d8dd9f26fe4344541d0544e35bbc66c5d567a80b..dcf49e21208c78b471e6c38cdb0746a0c88fe5a7 100644
--- a/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java
@@ -64,6 +64,7 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl
@@ -68,6 +68,7 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl
state = this.updateDir(world, pos, state, true);
if (this.isStraight) {
world.neighborChanged(state, pos, this, pos, notify);
@ -17,10 +17,10 @@ index 682e1cd0f4307bcc716ab82e375bd04cde095aa0..547d09c3a1cd0c5401aacb7888689636
return state;
diff --git a/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java b/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java
index fe9b6c89a1f0c98a9c73a409f2aca6a4a1c0f9e7..932a2c279f46c951182d2604b525b473b6945895 100644
index 41452abc7b761858ff2f3ff6a833b09c16fded4f..8eff69cb70ba094f9dcc0849f0436d4a3498fceb 100644
--- a/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java
@@ -70,6 +70,7 @@ public class DetectorRailBlock extends BaseRailBlock {
@@ -77,6 +77,7 @@ public class DetectorRailBlock extends BaseRailBlock {
private void checkPressed(Level world, BlockPos pos, BlockState state) {
if (this.canSurvive(state, world, pos)) {

Datei anzeigen

@ -5,19 +5,19 @@ Subject: [PATCH] Brand support
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 2c2b1aef3f510edb9bb124581739f06692ab5673..567bfcdf5c946d09bb8188435ee13930082dccf5 100644
index 25c5f23b859961c792b2ec08404171eea1aedba7..478abaffd1a80949b96f1c1774c98134be92e5ac 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -271,6 +271,7 @@ public class ServerPlayer extends Player {
@@ -278,6 +278,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 com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
+ public @Nullable String clientBrandName = null; // Paper - Brand name
// Paper start - replace player chunk loader
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));
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index d25b6431ce617d90fd1d6489a308d6630b92c175..96ee68e6656a59d959ad7a7e78f5a3752d6e3dbb 100644
index 6b53e65308fb4118ef2d78ec9d171722ba2301f5..2d0ce31011ce1dbbf3c86f09bbf9a41a6e4a158f 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -54,6 +54,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@ -57,10 +57,10 @@ index d25b6431ce617d90fd1d6489a308d6630b92c175..96ee68e6656a59d959ad7a7e78f5a375
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7c40718a53d2ef480441fd053de7c45971efe416..5e0fc3fd8e55b3dd238b38105fc6da75bfb709fc 100644
index e00e595677ce0b4e9e1e12883b06f99f55af7d31..16476b8d20619d8526658db24ed3de60a151ffcf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3011,6 +3011,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3026,6 +3026,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

Datei anzeigen

@ -5,10 +5,10 @@ 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 38cad5b0d7e6018adda56b3292280738c46622e9..c8e729e949e7a8301f17768d6ae3f3ce940bb73a 100644
index f5b9d1fe0d672e11b6295aefc9e182606dbebf88..95406737a6c72fd118a0022e07cdf15936e3911a 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 {
@@ -925,5 +925,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
((Mob) getHandle()).getJumpControl().jump();
}
}

Datei anzeigen

@ -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 c1214a8f53428c19ca1fc72942f5040066f45b12..d3f0cb141ce0942e55e395bfd2e7c3e2c2e48952 100644
index d9fafffc52b5db0b55022c02b9321d47a2b49827..a9a724f1e586c7e04e88bc1ff8dff442d83aaf16 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1996,9 +1996,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2020,9 +2020,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void setDefaultSpawnPos(BlockPos pos, float angle) {
// Paper - configurable spawn radius
BlockPos prevSpawn = this.getSharedSpawnPos();
@ -21,10 +21,10 @@ index c1214a8f53428c19ca1fc72942f5040066f45b12..d3f0cb141ce0942e55e395bfd2e7c3e2
// 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 8306f8cce689260111fbf88b31515440a44d3a8c..787f78e663017eae375d7eaee9d1508913598829 100644
index 2d90be2537faf281adc50f856daf3b4e8b842568..16df867ff996d33dc08831200d172633c9d68612 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -262,12 +262,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -263,12 +263,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean setSpawnLocation(int x, int y, int z, float angle) {
try {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add moon phase API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index f92f726d2ab63694bad0d6eb0ee718ae6194144f..f0360d00918d115008775c41fb586d553c1e2b41 100644
index 53385eb0fb6c79052f508f8feeff7cbd8559c19f..6433ac4053e7c39aa4ec73db4159422e501c9d21 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -981,4 +981,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
@@ -1015,4 +1015,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
throw new IllegalArgumentException("Cannot spawn an entity for " + clazz.getName());
}

Datei anzeigen

@ -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 93529defa5d36bb9b4c69eedda9b7ac3d0a189ce..e6e7ac7c5c31b6ff16a7bae6cc0706d31ea16c07 100644
index b7cf13fe4a0af243c0e76d75439b28d5018dadb9..4f3b04e62de66c4b18e5e9a988dea7c3e7b85aa1 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -184,6 +184,15 @@ public class Explosion {
@@ -206,6 +206,15 @@ public class Explosion {
if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockposition, iblockdata, f)) {
set.add(blockposition);

Datei anzeigen

@ -7,7 +7,7 @@ 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 265a30230c0dde7bb48f5ed0e6ebb91556d5b51f..e2b09b575416a47277c53c6d49572d0845cb8a72 100644
index ce0d05009a9b88607a143ad40421d70148491817..bb7ec8b5a76155ec5a6bfa29eda4e395cf3f23d2 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -369,10 +369,11 @@ public class CraftEventFactory {

Datei anzeigen

@ -986,10 +986,10 @@ 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 8a18aab3115d2ee1e888769518704f2a5aa1d4cc..a0ae3635ae8c3fd3ac17dd9fa614ec84c7b1b0ca 100644
index 7cc1410803c0054566ce2849e0b04b14e5b0ab92..5ffb1453bf332e8035abacc97ab36d78e1248484 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 {
@@ -259,6 +259,116 @@ public class RedStoneWireBlock extends Block {
return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER);
}
@ -1106,7 +1106,7 @@ index 8a18aab3115d2ee1e888769518704f2a5aa1d4cc..a0ae3635ae8c3fd3ac17dd9fa614ec84
private void updatePowerStrength(Level world, BlockPos pos, BlockState state) {
int i = this.calculateTargetStrength(world, pos);
@@ -321,6 +431,7 @@ public class RedStoneWireBlock extends Block {
@@ -328,6 +438,7 @@ public class RedStoneWireBlock extends Block {
return Math.max(i, j - 1);
}
@ -1114,7 +1114,7 @@ index 8a18aab3115d2ee1e888769518704f2a5aa1d4cc..a0ae3635ae8c3fd3ac17dd9fa614ec84
private int getWireSignal(BlockState state) {
return state.is((Block) this) ? (Integer) state.getValue(RedStoneWireBlock.POWER) : 0;
}
@@ -343,7 +454,7 @@ public class RedStoneWireBlock extends Block {
@@ -350,7 +461,7 @@ public class RedStoneWireBlock extends Block {
@Override
public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
if (!oldState.is(state.getBlock()) && !world.isClientSide) {
@ -1123,7 +1123,7 @@ index 8a18aab3115d2ee1e888769518704f2a5aa1d4cc..a0ae3635ae8c3fd3ac17dd9fa614ec84
Iterator iterator = Direction.Plane.VERTICAL.iterator();
while (iterator.hasNext()) {
@@ -370,7 +481,7 @@ public class RedStoneWireBlock extends Block {
@@ -377,7 +488,7 @@ public class RedStoneWireBlock extends Block {
world.updateNeighborsAt(pos.relative(enumdirection), this);
}
@ -1132,7 +1132,7 @@ index 8a18aab3115d2ee1e888769518704f2a5aa1d4cc..a0ae3635ae8c3fd3ac17dd9fa614ec84
this.updateNeighborsOfNeighboringWires(world, pos);
}
}
@@ -405,7 +516,7 @@ public class RedStoneWireBlock extends Block {
@@ -412,7 +523,7 @@ public class RedStoneWireBlock extends Block {
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
if (!world.isClientSide) {
if (state.canSurvive(world, pos)) {

Datei anzeigen

@ -25,10 +25,10 @@ index e8cf9eafe0908bc9b716d9b6ead97828a43413ec..2ee5c884571228a353120f658f1a2d39
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 673652231a65e9441ee882c86656b86a86547488..97e91910c2c30b4f838e78794c9107bdfe8d7668 100644
index 615fb00e50f3c434809f8e1b201d457b9beae8fd..c58fc7d950ea2aa136c3922fb14e4f183f45f2d3 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -97,7 +97,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@@ -99,7 +99,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
// CraftBukkit start
@Deprecated
public void disconnect(String s) {

Datei anzeigen

@ -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 abaafcff3f7a5e710319c93313a4ecf9874b7ef8..a9707ecebb175663acb0f7285c759d938c5dae8b 100644
index b5080861a4aa34a95618bcee7723bd3ec34b09c4..385b7e907c535a153d86fbec11eb3070edf66dd4 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -457,7 +457,7 @@ public final class ItemStack {
@@ -478,7 +478,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
@ -18,10 +18,10 @@ index abaafcff3f7a5e710319c93313a4ecf9874b7ef8..a9707ecebb175663acb0f7285c759d93
world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point
diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
index 2bc31c28d0d5469476699b69efa6e07325f2a852..4066dd6a638cf2186c628905915f635326442b3e 100644
index e707553bbddf84bc48ec7186da00c3eb0632946d..0e56fbe8836020a0e36c0b6df01ae82d0aa8cf38 100644
--- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
@@ -138,20 +138,23 @@ public abstract class BaseFireBlock extends Block {
@@ -142,20 +142,23 @@ public abstract class BaseFireBlock extends Block {
super.entityInside(state, world, pos, entity);
}
@ -52,10 +52,10 @@ index 2bc31c28d0d5469476699b69efa6e07325f2a852..4066dd6a638cf2186c628905915f6353
}
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
index 893ff998afaa47500a03ae55ce45e9862ab1cc18..a3021fbc570ae47eb6b0d4a89388c8ed893aced7 100644
index 8fce3ad36a6ee8166f4abd9e0e369b641d487af9..3fb197ee3bfd3f36881b7d67f7a37f035bb27daf 100644
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
@@ -13,6 +13,7 @@ import net.minecraft.server.level.ServerLevel;
@@ -14,6 +14,7 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.BiomeTags;
import net.minecraft.util.RandomSource;
import net.minecraft.world.item.context.BlockPlaceContext;
@ -63,7 +63,7 @@ index 893ff998afaa47500a03ae55ce45e9862ab1cc18..a3021fbc570ae47eb6b0d4a89388c8ed
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.GameRules;
import net.minecraft.world.level.Level;
@@ -361,9 +362,11 @@ public class FireBlock extends BaseFireBlock {
@@ -368,9 +369,11 @@ public class FireBlock extends BaseFireBlock {
}
@Override
@ -79,18 +79,18 @@ index 893ff998afaa47500a03ae55ce45e9862ab1cc18..a3021fbc570ae47eb6b0d4a89388c8ed
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 a5942b6683d38f067f8ca1dfbe467b72df242632..96bdf69c8788aa0b1dff64789e6f13c856ee99ff 100644
index c64213fe3ec0bd34cd1b31ae18eff1fecbcf63d6..31dc96c371953eb7ca3d3b444b123ade1f24c909 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;
@@ -43,6 +43,7 @@ import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.context.BlockPlaceContext;
+import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.EmptyBlockGetter;
import net.minecraft.world.level.Level;
@@ -143,6 +144,12 @@ public abstract class BlockBehaviour implements FeatureElement {
import net.minecraft.world.level.Explosion;
@@ -163,6 +164,12 @@ public abstract class BlockBehaviour implements FeatureElement {
DebugPackets.sendNeighborsUpdatePacket(world, pos);
}
@ -104,7 +104,7 @@ index a5942b6683d38f067f8ca1dfbe467b72df242632..96bdf69c8788aa0b1dff64789e6f13c8
@Deprecated
public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
index bc0dfa8efe0b2a891c000e750f436db632607ada..c461e0d04047db9c0c5ecc04063cebd38bf96ec2 100644
index 9fc4997277dd199cf6cffccceb3a9735398c5356..590cd053a1b1c2a489772a2879998725fe0d783c 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
@@ -11,6 +11,7 @@ import net.minecraft.tags.BlockTags;

Datei anzeigen

@ -10,10 +10,10 @@ public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/Fir
Co-authored-by: MeFisto94 <MeFisto94@users.noreply.github.com>
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 35e264172688be6cf6e82d948f591893d97a43aa..8313d6de11427a4340ac9fc4f3a04070a5c80cd8 100644
index d0b1a419c9bc73066d79459dc3e5998160f8038b..a7783474afef0a2bab7e99e475c6d130bb88b01c 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -668,5 +668,10 @@ public class CraftBlock implements Block {
@@ -669,5 +669,10 @@ public class CraftBlock implements Block {
public org.bukkit.SoundGroup getBlockSoundGroup() {
return org.bukkit.craftbukkit.CraftSoundGroup.getSoundGroup(this.getNMS().getSoundType());
}
@ -25,10 +25,10 @@ index 35e264172688be6cf6e82d948f591893d97a43aa..8313d6de11427a4340ac9fc4f3a04070
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
index 9ae78a0fe829c7487a945a801dbbca2375da1cbb..5b09e7e08c61b10044ac5f481bf10bb79feda8a3 100644
index b54bd4e85042955448a2e76b379d370eefdff383..e8f03a40db4505c1e7f2aeb8946c207833acd416 100644
--- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
+++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
@@ -194,6 +194,11 @@ public class CraftEnchantment extends Enchantment {
@@ -161,6 +161,11 @@ public class CraftEnchantment extends Enchantment {
public net.kyori.adventure.text.Component displayName(int level) {
return io.papermc.paper.adventure.PaperAdventure.asAdventure(getHandle().getFullname(level));
}
@ -39,7 +39,7 @@ index 9ae78a0fe829c7487a945a801dbbca2375da1cbb..5b09e7e08c61b10044ac5f481bf10bb7
+ }
// Paper end
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
@Override
diff --git a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java b/src/test/java/io/papermc/paper/world/TranslationKeyTest.java
index 7f8b6462d2a1bbd39a870d2543bebc135f7eb45b..dbd1dc4453bd26fb6116b62f6ccbf69e92e09fc4 100644
--- a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 8a89fd0f771e0df439dc9070df7dfa6f2cbd5de2..2251c06ae08a846129b1cef4842c112708a6ecf4 100644
index b6f5e63c7e7e45dd3eb15bad5c6bee9d5417311e..866106d0d773e407a0cdd8614818cba4ab910040 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -530,4 +530,41 @@ public final class CraftItemFactory implements ItemFactory {
@@ -533,4 +533,41 @@ public final class CraftItemFactory implements ItemFactory {
return nms != null ? net.minecraft.locale.Language.getInstance().getOrDefault(nms.getItem().getDescriptionId(nms)) : null;
}
// Paper end - add getI18NDisplayName

Datei anzeigen

@ -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 a5353af5ff47b5be7dac9a4e55989ad9490cf30f..3ce983b0e93c1f70acaa22c800273fe625b20454 100644
index a82f7dd2cbc2f6311b810f117f0970a47db85818..2616d771a8a95dac4440b74933c8aa7b83a9bbd1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2049,6 +2049,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2148,6 +2148,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().reloadResources();
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
@ -17,10 +17,10 @@ index a5353af5ff47b5be7dac9a4e55989ad9490cf30f..3ce983b0e93c1f70acaa22c800273fe6
if (this.isSameThread()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index 777539309639569d9057e4de86c3957a7a72a47f..448f90b7e15bca1fd0bcc70164e2ee9cb95f7c4e 100644
index ebe02507a394563ba51a207db8b24760467d936e..c673e311a5508c7264a8765c266892f9d346d39a 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -528,9 +528,39 @@ public class CraftBlockData implements BlockData {
@@ -535,9 +535,39 @@ public class CraftBlockData implements BlockData {
Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit);
}

Datei anzeigen

@ -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 0080136d9aaead083fd1d94d2f7a0df250e3d9d8..7854073fccf6c3c2eff1acf0e4e6eac0dfcb9919 100644
index 110456e28adeeef790940b9281801d9926244b37..2663d2e433946c2c9a36d223cb7e704272716a80 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -657,7 +657,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -660,7 +660,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return;
}
@ -21,7 +21,7 @@ index 0080136d9aaead083fd1d94d2f7a0df250e3d9d8..7854073fccf6c3c2eff1acf0e4e6eac0
this.lastGoodX = this.awaitingPositionFromClient.x;
this.lastGoodY = this.awaitingPositionFromClient.y;
this.lastGoodZ = this.awaitingPositionFromClient.z;
@@ -1557,7 +1557,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1584,7 +1584,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// CraftBukkit end
this.awaitingTeleportTime = this.tickCount;
@ -31,10 +31,10 @@ index 0080136d9aaead083fd1d94d2f7a0df250e3d9d8..7854073fccf6c3c2eff1acf0e4e6eac0
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 78af47c54f8dd3b1b4f81b740bcd438132c27947..d751bae633161abf9aa63197239e519c00676edf 100644
index 76a1803f806d3bf1a54dae15d8155d6a0920cf07..2693057247bc2640c043db1baf50c579d4058a68 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 {
@@ -160,6 +160,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit start
private static final int CURRENT_LEVEL = 2;
@ -42,7 +42,7 @@ index 78af47c54f8dd3b1b4f81b740bcd438132c27947..d751bae633161abf9aa63197239e519c
static boolean isLevelAtLeast(CompoundTag tag, int level) {
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
}
@@ -1864,6 +1865,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1869,6 +1870,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void moveTo(double x, double y, double z, float yaw, float pitch) {
@ -57,10 +57,10 @@ index 78af47c54f8dd3b1b4f81b740bcd438132c27947..d751bae633161abf9aa63197239e519c
this.setYRot(yaw);
this.setXRot(pitch);
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 369298dfd437c1c83801f3d4ba63484ee1b969fe..ae2b95f53e875716489821dc9b0a3a35039bfcc9 100644
index 41f549f16f69f9bc50a004096e6c3c0f6e4d4eaf..9ec83d6eeff22c2ce25374a83f581a675d4fd067 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -167,6 +167,7 @@ public abstract class BaseSpawner {
@@ -169,6 +169,7 @@ public abstract class BaseSpawner {
return;
}
@ -69,10 +69,10 @@ 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 0498a83ceb4c009b76086dc44f80395efaab797e..747445306a19db2b89fa7cdfc5dcd7f361a69f54 100644
index ded0332f5be000e31962e34033e69d17eed51280..370011b7de936a427f211edf306a5b6f3b8ea1a0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -579,7 +579,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -586,7 +586,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
}
// entity.setLocation() throws no event, and so cannot be cancelled

Datei anzeigen

@ -5,10 +5,10 @@ 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 4ac714e39804fc8d269a717e8abf98f5814319e8..d41e37afeab1e8bb098c6ed012b10b113c4a4715 100644
index 9541ebf81c3c2c282c6d04f5e51b309e69d0802e..2609da834c014e82d0038de580d50163dd0c5687 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 {
@@ -462,6 +462,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
return this.getHandle().containerMenu.getBukkitView();
}

Datei anzeigen

@ -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 d3f0cb141ce0942e55e395bfd2e7c3e2c2e48952..dd5ac4b4c30afab7b376947548722050fb3af106 100644
index a9a724f1e586c7e04e88bc1ff8dff442d83aaf16..2ce0a851bc0989bb0fe294b92a9aa428c38ba266 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1509,6 +1509,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1528,6 +1528,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,7 +23,7 @@ index d3f0cb141ce0942e55e395bfd2e7c3e2c2e48952..dd5ac4b4c30afab7b376947548722050
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 1685dd08ef6331e133d752cd9ce3874c9eda5a05..49828aa38e06d7a2f0c7c5b7c4be374996ef4524 100644
index a9ede0d719e866655ab48fb5d0263c7d1bdcff60..c61754976fab6654f55b1403d769eb1721871dca 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -431,10 +431,12 @@ public class ServerPlayerGameMode {

Datei anzeigen

@ -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 d751bae633161abf9aa63197239e519c00676edf..14a3163e0e82eed9bf91b5c703774547f125c3c5 100644
index 2693057247bc2640c043db1baf50c579d4058a68..fa48ed90623106065f4b84f2ffbf889ae70842eb 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4451,4 +4451,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4493,4 +4493,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
void accept(Entity entity, double x, double y, double z);
}
@ -21,10 +21,10 @@ index d751bae633161abf9aa63197239e519c00676edf..14a3163e0e82eed9bf91b5c703774547
+ // 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 a78c6610be6e89dd89881867b8b91ed9cece7562..d40ea1a394c483abe18915446d61b3f1f496af53 100644
index a394298df60ddd0aa709f9e250520da9db8c9589..5d1df87177b3d6a5f4c4b1f12bbbba7b597f2911 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -507,6 +507,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -504,6 +504,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
return compound;
}

Datei anzeigen

@ -14,10 +14,10 @@ this breaks your workflow you can always force all scoreboards to be tracked wit
settings.track-plugin-scoreboards in paper.yml.
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
index 3f09420ba9268ac1dc5440c0739744370c0de319..052389310826ee6b97cf27dfd952e0101fb2d097 100644
index 7791fb5b39702798fc0006fcff9c6041980eb191..885addfdbae3730626b4f6b9781945496783c389 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
@@ -18,6 +18,7 @@ import org.bukkit.scoreboard.Team;
@@ -20,6 +20,7 @@ import org.bukkit.scoreboard.Team;
public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
final Scoreboard board;
@ -25,7 +25,7 @@ index 3f09420ba9268ac1dc5440c0739744370c0de319..052389310826ee6b97cf27dfd952e010
CraftScoreboard(Scoreboard board) {
this.board = board;
@@ -50,6 +51,12 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
@@ -52,6 +53,12 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
Preconditions.checkArgument(renderType != null, "RenderType cannot be null");
Preconditions.checkArgument(name.length() <= Short.MAX_VALUE, "The name '%s' is longer than the limit of 32767 characters (%s)", name, name.length());
Preconditions.checkArgument(this.board.getObjective(name) == null, "An objective of name '%s' already exists", name);
@ -35,11 +35,11 @@ index 3f09420ba9268ac1dc5440c0739744370c0de319..052389310826ee6b97cf27dfd952e010
+ this.registeredGlobally = true;
+ }
+ // Paper end
net.minecraft.world.scores.Objective objective = this.board.addObjective(name, ((CraftCriteria) criteria).criteria, io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType));
net.minecraft.world.scores.Objective objective = this.board.addObjective(name, ((CraftCriteria) criteria).criteria, io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType), true, null);
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 ea838766d1a7620c3722876bfb819b731db11638..f06f011375b9be307a858ccb6579f74942b1d325 100644
index 40e348cae063bc1a814f8fcc3a2688c135f23bb5..c7ca6210d6ae37fe95068c9baa5fb654f95307e0 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 {

Datei anzeigen

@ -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 14a3163e0e82eed9bf91b5c703774547f125c3c5..79ce14647009a667ee64dc5ed8a9c1c8dabe2a6d 100644
index fa48ed90623106065f4b84f2ffbf889ae70842eb..f0158217eceeaf73555a741957324ce0258fa6b2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4456,5 +4456,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4498,5 +4498,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public static int nextEntityId() {
return ENTITY_COUNTER.incrementAndGet();
}
@ -19,10 +19,10 @@ index 14a3163e0e82eed9bf91b5c703774547f125c3c5..79ce14647009a667ee64dc5ed8a9c1c8
// 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 747445306a19db2b89fa7cdfc5dcd7f361a69f54..fb0cde02f2fc143d69f926131b2fb3dc69bfdea3 100644
index 370011b7de936a427f211edf306a5b6f3b8ea1a0..2979678d8640324f5c28e4051bbb3b61b81a1e71 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1363,5 +1363,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1407,5 +1407,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isInLava() {
return getHandle().isInLava();
}

Datei anzeigen

@ -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 3ce983b0e93c1f70acaa22c800273fe625b20454..331cc75f4802b7c6a2903d506e58d887ba15921d 100644
index 2616d771a8a95dac4440b74933c8aa7b83a9bbd1..f73ad3b85ed46913c10891edd3a52b9ad694e5e2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2132,13 +2132,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2231,13 +2231,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.isEnforceWhitelist()) {
PlayerList playerlist = source.getServer().getPlayerList();
UserWhiteList whitelist = playerlist.getWhiteList();

Datei anzeigen

@ -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 7854073fccf6c3c2eff1acf0e4e6eac0dfcb9919..12f88573544269bc7276ca51d7f31be98bd60654 100644
index 2663d2e433946c2c9a36d223cb7e704272716a80..bace3a1d8e2e4b2b36f1b4cb80bb5c3bb473ad47 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -464,9 +464,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -467,9 +467,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 7854073fccf6c3c2eff1acf0e4e6eac0dfcb9919..12f88573544269bc7276ca51d7f31be9
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
@@ -476,8 +476,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -479,8 +479,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 7854073fccf6c3c2eff1acf0e4e6eac0dfcb9919..12f88573544269bc7276ca51d7f31be9
// CraftBukkit start - handle custom speeds and skipped ticks
this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick;
@@ -523,9 +534,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -526,9 +537,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D));
@ -57,7 +57,7 @@ index 7854073fccf6c3c2eff1acf0e4e6eac0dfcb9919..12f88573544269bc7276ca51d7f31be9
boolean flag1 = entity.verticalCollisionBelow;
if (entity instanceof LivingEntity) {
@@ -1249,7 +1260,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1274,7 +1285,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 7854073fccf6c3c2eff1acf0e4e6eac0dfcb9919..12f88573544269bc7276ca51d7f31be9
if (this.player.isSleeping()) {
if (d10 > 1.0D) {
@@ -1301,9 +1323,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1328,9 +1350,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
AABB axisalignedbb = this.player.getBoundingBox();

Datei anzeigen

@ -41,10 +41,10 @@ index 089f2a4780a0e3515c032d08a1bb2ea375ebdce1..30f6d74e867869b0070de83fe988672a
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 8313d6de11427a4340ac9fc4f3a04070a5c80cd8..848f089e559e4feb67dea9148291f70460da9e9d 100644
index a7783474afef0a2bab7e99e475c6d130bb88b01c..aa644231425b9622437538b5c092d4064a40cced 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -219,7 +219,7 @@ public class CraftBlock implements Block {
@@ -220,7 +220,7 @@ public class CraftBlock implements Block {
@Override
public Material getType() {
@ -67,7 +67,7 @@ index a193583f596c0a587cd0c2d6eac994226ee4fde0..aca63719790429d3d7c7c59a1931a982
public void setFlag(int flag) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index 448f90b7e15bca1fd0bcc70164e2ee9cb95f7c4e..3aa4a2ac3b81abc1446b7f7dae7f636438341790 100644
index c673e311a5508c7264a8765c266892f9d346d39a..d6ba9030b0736afda9f7d2effa95d6d63e983b34 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -59,7 +59,7 @@ public class CraftBlockData implements BlockData {

Datei anzeigen

@ -10,10 +10,10 @@ 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 7825f6185a9a73dd395cdb6d86947d33d8512200..e22214b99472b23ffc95c011b19bdb59e2d9bb40 100644
index 121f82c3e27d0c1e935871ab0e7c994393e73398..bdf11c543fe8904585eda72dc92206ac22daff58 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 {
@@ -160,7 +160,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false;
public Map<BlockPos, org.bukkit.craftbukkit.block.CraftBlockState> capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Reduce blockpos allocation from pathfinding
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
index 10503d6d8b6daf645cf4360ee289d5e25144c976..3583fcf5284bc5883308876dbd9886664b391e28 100644
index 8e90b284fb576738b834626bb52c9962ccbc5ad2..2aca9b193db5dadc4fb90b8d7548277b698924aa 100644
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
@@ -473,7 +473,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
@@ -479,7 +479,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
return BlockPathTypes.DANGER_FIRE;
}
@ -17,7 +17,7 @@ index 10503d6d8b6daf645cf4360ee289d5e25144c976..3583fcf5284bc5883308876dbd988666
return BlockPathTypes.WATER_BORDER;
}
@@ -504,7 +504,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
@@ -510,7 +510,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
} else if (blockState.is(Blocks.COCOA)) {
return BlockPathTypes.COCOA;
} else if (!blockState.is(Blocks.WITHER_ROSE) && !blockState.is(Blocks.POINTED_DRIPSTONE)) {

Datei anzeigen

@ -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 c71a409a457deea6817b863ddbb8bcbf64206544..475e623d2d42f372b12cf50c2b26b4d2dc203072 100644
index d355b46f23201163b70995a883994fcea1ac1689..561436bdff6b1a46b37cad519885c952da7e5b5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1877,6 +1877,28 @@ public final class CraftServer implements Server {
@@ -1909,6 +1909,28 @@ public final class CraftServer implements Server {
return result;
}

Datei anzeigen

@ -5,7 +5,7 @@ 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 cc829161404c0f98a403c5219d5c535de1d5c5ba..f58be4e2529759cc64df2c70a69ef56eabbb762d 100644
index c0aa370367856a159412dd141f683b7d51e11c8b..363d1f469862c2e980624ff69f74be015c19412d 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -508,6 +508,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler

Datei anzeigen

@ -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 d40ea1a394c483abe18915446d61b3f1f496af53..fc8c1e46a2cfb4fc3095d249ba249d6eb4bbb1b2 100644
index 5d1df87177b3d6a5f4c4b1f12bbbba7b597f2911..5930cc6af2d73e6301b0ebe59ea53e0a7ea2098a 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -332,7 +332,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -329,7 +329,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex);
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Item no age & no player pickup
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
index 7b11db70668951e5331b6d6b99f616e163d7d7d6..953d3762292a4c15b063f9e237edf2f5c5362cb7 100644
index 4456b7c438cadb4bfabad030b6871b3a8a7fd439..cbdac5a439795d429a1364a7eafc4783cff51d54 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
@@ -9,6 +9,11 @@ import org.bukkit.inventory.ItemStack;

Datei anzeigen

@ -25,19 +25,19 @@ index f9d7fec242a059a3b056c569ffaf214a361716d6..33a3c657bd390b9e8bc23af93c1107f5
Connection.LOGGER.debug("Failed to sent packet", throwable);
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 567bfcdf5c946d09bb8188435ee13930082dccf5..bf637aae0dcd701dd31568b3c84851349c4c5a0a 100644
index 478abaffd1a80949b96f1c1774c98134be92e5ac..063742400f3065ace62b64b42d952517ae00ea1f 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -272,6 +272,7 @@ public class ServerPlayer extends Player {
@@ -279,6 +279,7 @@ public class ServerPlayer extends Player {
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
public @Nullable String clientBrandName = null; // Paper - Brand name
+ 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
// Paper start - replace player chunk loader
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));
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 96ee68e6656a59d959ad7a7e78f5a3752d6e3dbb..d660041805bcd1bb97cf347d8b1cfe5c65469f56 100644
index 2d0ce31011ce1dbbf3c86f09bbf9a41a6e4a158f..156e49d682be26f0962cae960acaef613bd6ebba 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -302,6 +302,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@ -49,10 +49,10 @@ index 96ee68e6656a59d959ad7a7e78f5a3752d6e3dbb..d660041805bcd1bb97cf347d8b1cfe5c
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 e9b5d987c1891ba269ba6beec57c1e0fb65dbb4d..9174b356fcd0a4ae33e4b9e0cb085bbdba31a20d 100644
index 7f05a1c3847c36699d3c9acbb1d7cd05363c94c5..f57be0d9111582b279f5ee6988f56068b9b63968 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -581,7 +581,7 @@ public abstract class PlayerList {
@@ -579,7 +579,7 @@ public abstract class PlayerList {
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
}

Datei anzeigen

@ -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 9174b356fcd0a4ae33e4b9e0cb085bbdba31a20d..9cb8d94e81fd9ce5e3d09a6bae4fb8beaae09454 100644
index f57be0d9111582b279f5ee6988f56068b9b63968..5d1af62e7d06f1fbcfe1eec0293ca3065a88454f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -853,7 +853,7 @@ public abstract class PlayerList {
@@ -851,7 +851,7 @@ public abstract class PlayerList {
if (location == null) {
worldserver1 = this.server.getLevel(Level.OVERWORLD);
blockposition = entityplayer1.getSpawnPoint(worldserver1);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add Destroy Speed API
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index 3aa4a2ac3b81abc1446b7f7dae7f636438341790..5b67d4dd280688093d7e36e59e5b2ec6ebdc796c 100644
index d6ba9030b0736afda9f7d2effa95d6d63e983b34..79c469d461ce9df0994214ebc8b157a095a4c848 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -689,4 +689,19 @@ public class CraftBlockData implements BlockData {
@@ -696,4 +696,19 @@ public class CraftBlockData implements BlockData {
public BlockState createBlockState() {
return CraftBlockStates.getBlockState(this.state, null);
}

Datei anzeigen

@ -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 5e0fc3fd8e55b3dd238b38105fc6da75bfb709fc..9ba0165896e819ebb4482cc34113b72ecb466c43 100644
index 16476b8d20619d8526658db24ed3de60a151ffcf..3c0295db596da4fd743730fc5a74f1b4c5b60a98 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2526,7 +2526,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2541,7 +2541,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());
}

Datei anzeigen

@ -5,10 +5,10 @@ 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 c8e729e949e7a8301f17768d6ae3f3ce940bb73a..a654f22a6c331cd69290b99e6c73f3ed611c58a5 100644
index 95406737a6c72fd118a0022e07cdf15936e3911a..66c762c13a70f917e06795dcee85cae66cd316d4 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 {
@@ -892,6 +892,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return getHandle().getUseItem().asBukkitMirror();
}

Datei anzeigen

@ -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 79ce14647009a667ee64dc5ed8a9c1c8dabe2a6d..4841e57256092b5c8b71fa1dc56b61f790837cdd 100644
index f0158217eceeaf73555a741957324ce0258fa6b2..90621d3dfe8660f9b389ed292a3582a5dbb726bd 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2057,6 +2057,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2062,6 +2062,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public boolean isPushable() {
@ -22,21 +22,20 @@ index 79ce14647009a667ee64dc5ed8a9c1c8dabe2a6d..4841e57256092b5c8b71fa1dc56b61f7
}
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
index d15e62da0307728a7c2be191a27f87da1bb29f49..de06ae3e8757c923a6f3f475a34885d2f15af46e 100644
index 68e4440765636295a74ea942862d772d47282ad6..93a41156a01a1638f3ef469b1518a07e7961f378 100644
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
@@ -45,11 +45,17 @@ public final class EntitySelector {
@@ -46,11 +46,16 @@ public final class EntitySelector {
}
public static Predicate<Entity> pushableBy(Entity entity) {
+ // Paper start - ignoreClimbing param
+ return pushable(entity, false);
+ }
+
+ public static Predicate<Entity> pushable(Entity entity, boolean ignoreClimbing) {
+ // Paper end
Team scoreboardteambase = entity.getTeam();
Team.CollisionRule scoreboardteambase_enumteampush = scoreboardteambase == null ? Team.CollisionRule.ALWAYS : scoreboardteambase.getCollisionRule();
PlayerTeam scoreboardteam = entity.getTeam();
Team.CollisionRule scoreboardteambase_enumteampush = scoreboardteam == null ? Team.CollisionRule.ALWAYS : scoreboardteam.getCollisionRule();
return (Predicate) (scoreboardteambase_enumteampush == Team.CollisionRule.NEVER ? Predicates.alwaysFalse() : EntitySelector.NO_SPECTATORS.and((entity1) -> {
- if (!entity1.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(entity1)) { // CraftBukkit - collidable API
@ -45,10 +44,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 2b0178507a39c95fff94bea382bacebb8c40f1b7..7b68fd746338fadba2b3e9aee4df5fb965299f1a 100644
index 90c66f87e721ef34bf3f47b601456fece3064225..bf617621c88c68198709d1ed238622c3fcec89bd 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3424,7 +3424,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3426,7 +3426,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 +56,7 @@ index 2b0178507a39c95fff94bea382bacebb8c40f1b7..7b68fd746338fadba2b3e9aee4df5fb9
if (!list.isEmpty()) {
// Paper - moved up
@@ -3614,9 +3614,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3616,9 +3616,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
return !this.isRemoved() && this.collides; // CraftBukkit
}
@ -76,10 +75,10 @@ index 2b0178507a39c95fff94bea382bacebb8c40f1b7..7b68fd746338fadba2b3e9aee4df5fb9
// CraftBukkit start - collidable API
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
index 867717f130b6fcd48f39d40b10b3f514dbb8798c..5beaa849a250ea005733250ad3edfa8382224667 100644
index bc9a710a92662b1f69b0f5b289780fe0a0d5ed32..6b614818b14ecfc8fc82b523eeb7e21fdf9bf1ba 100644
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
@@ -87,7 +87,7 @@ public class Bat extends AmbientCreature {
@@ -90,7 +90,7 @@ public class Bat extends AmbientCreature {
}
@Override
@ -89,10 +88,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 e110931ee13ac3e64e455eaa7a30b96d9464df58..397264d31992fd43bd57736c25693ae001330b6d 100644
index fbad0e512b990c3d6885ecf92766ba6fd851cc20..4c34edc55fa0e136ccf49a3aef001f413274dfac 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
@@ -382,8 +382,8 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder<Parrot
@@ -383,8 +383,8 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder<Parrot
}
@Override
@ -104,7 +103,7 @@ index e110931ee13ac3e64e455eaa7a30b96d9464df58..397264d31992fd43bd57736c25693ae0
@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 e7a8120a7d8bc9d668050c7f8fe94df90133b36c..9f46eb8417ad19e6f1bbf369f4c6b94fdb915f5b 100644
index 6b7453281e32aae20778f26b4098df418401c45b..a13a1725356ca4430f1f0a6d121fc08679de62db 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
@@ -286,7 +286,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
@ -117,7 +116,7 @@ index e7a8120a7d8bc9d668050c7f8fe94df90133b36c..9f46eb8417ad19e6f1bbf369f4c6b94f
}
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 e4e734e0f4c43c1687c8e3a8bbe15441e0bd8e76..d972c59ec98e73d7ccd774e0f06c686251ffe4cf 100644
index 17b6649a7e36fc9322f857e83551d8a99f4f288d..483d8c627a60e04f66f0135a8d64e6d5366e0997 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 +129,10 @@ index e4e734e0f4c43c1687c8e3a8bbe15441e0bd8e76..d972c59ec98e73d7ccd774e0f06c6862
}
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 8bea12248bf3ae95c629578386292732d0b74630..a719ea3cd6714686ead9c1817e9592733a980444 100644
index b09c4e2a36f653ff6aa0e2c0bc927a8fd7e41ae0..bf9963eb59269223a9e322773f3543640645ae9f 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -153,7 +153,7 @@ public abstract class AbstractMinecart extends Entity {
@@ -172,7 +172,7 @@ public abstract class AbstractMinecart extends VehicleEntity {
}
@Override
@ -143,10 +142,10 @@ index 8bea12248bf3ae95c629578386292732d0b74630..a719ea3cd6714686ead9c1817e959273
}
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 9f7336a4db680c7f9b8e5486f6b12d2c08b7fefe..7c233b03bac04520f0be9148fcd12282680bd39d 100644
index e6a7bf9a27fb66d8c2210678dbe8afa8bbf5e7c8..6b0ec9da5a368775924f5b97c74acc5bfd609fa1 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
@@ -163,7 +163,7 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
@@ -157,7 +157,7 @@ public class Boat extends VehicleEntity implements VariantHolder<Boat.Type> {
}
@Override

Datei anzeigen

@ -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 9d61c9ada132af89292a5da7d3cce7777a961c13..61539bd963acf46f5f05865b235f9dbc05c771c3 100644
index 44e72176a0da08a77fa192ee31c0fcd53f0dc22d..f82cd3677da96d3cf051c983d08a8ff302400b18 100644
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
@@ -120,7 +120,7 @@ public class BeehiveBlock extends BaseEntityBlock {
@@ -127,7 +127,7 @@ public class BeehiveBlock extends BaseEntityBlock {
}
public static void dropHoneycomb(Level world, BlockPos pos) {
@ -17,7 +17,7 @@ index 9d61c9ada132af89292a5da7d3cce7777a961c13..61539bd963acf46f5f05865b235f9dbc
}
@Override
@@ -133,8 +133,19 @@ public class BeehiveBlock extends BaseEntityBlock {
@@ -140,8 +140,19 @@ public class BeehiveBlock extends BaseEntityBlock {
Item item = itemstack.getItem();
if (itemstack.is(Items.SHEARS)) {
@ -39,10 +39,10 @@ index 9d61c9ada132af89292a5da7d3cce7777a961c13..61539bd963acf46f5f05865b235f9dbc
entityhuman1.broadcastBreakEvent(hand);
});
diff --git a/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java b/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java
index 0e8cbe7a465edc31b78b7e47a928435f9c2b6bd9..4568d1659dda897de5f6c2059629a4718d401e63 100644
index df11efd22682c2ed799dabf15d2cfa5973e8dca9..58bc92f70892a1ff1af3bd2c1b6d8eb57e92aced 100644
--- a/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PumpkinBlock.java
@@ -27,13 +27,24 @@ public class PumpkinBlock extends StemGrownBlock {
@@ -35,13 +35,24 @@ public class PumpkinBlock extends Block {
ItemStack itemStack = player.getItemInHand(hand);
if (itemStack.is(Items.SHEARS)) {
if (!world.isClientSide) {

Datei anzeigen

@ -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 12f88573544269bc7276ca51d7f31be98bd60654..d8ae73b68e449a2ab7e39acf3c120248948480d6 100644
index bace3a1d8e2e4b2b36f1b4cb80bb5c3bb473ad47..08ff8e489d86030dac403b405b016b77d7f81598 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -254,6 +254,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -258,6 +258,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 12f88573544269bc7276ca51d7f31be98bd60654..d8ae73b68e449a2ab7e39acf3c120248
// CraftBukkit end
private int dropSpamTickCount;
private double firstGoodX;
@@ -375,6 +376,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -378,6 +379,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 12f88573544269bc7276ca51d7f31be98bd60654..d8ae73b68e449a2ab7e39acf3c120248
/* Use thread-safe field access instead
if (this.chatSpamTickCount > 0) {
--this.chatSpamTickCount;
@@ -2975,6 +2977,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2983,6 +2985,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {

Datei anzeigen

@ -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 fb3f65feab6f5febf58be71f0b9b1a4381958f1d..6c498338d3918afb4f7ad5bac013f6dbb43594c2 100644
index 4bac05cb48d81dc9776d90502b6f12285b92122b..2957b3929c1e92af1b1a2636b83b757a0fbc789d 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -183,7 +183,7 @@ public abstract class Player extends LivingEntity {
@@ -178,7 +178,7 @@ public abstract class Player extends LivingEntity {
private Optional<GlobalPos> lastDeathLocation;
@Nullable
public FishingHook fishing;
@ -18,10 +18,10 @@ index fb3f65feab6f5febf58be71f0b9b1a4381958f1d..6c498338d3918afb4f7ad5bac013f6db
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 d41e37afeab1e8bb098c6ed012b10b113c4a4715..408c23c8310c464baebfb1f4adafe56a01645a5a 100644
index 2609da834c014e82d0038de580d50163dd0c5687..6a5f5c00f9276337ddee8c8d1458a429bc5443d9 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 {
@@ -127,6 +127,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
}
@ -36,10 +36,10 @@ index d41e37afeab1e8bb098c6ed012b10b113c4a4715..408c23c8310c464baebfb1f4adafe56a
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 a654f22a6c331cd69290b99e6c73f3ed611c58a5..810f06b3dc7148f9d71635981b3be79659fd0906 100644
index 66c762c13a70f917e06795dcee85cae66cd316d4..4fc1ea695611e636349ea9d4d4ae48bab93d3b98 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 {
@@ -937,5 +937,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) {
getHandle().take(((CraftItem) item).getHandle(), quantity);
}

Datei anzeigen

@ -5,7 +5,7 @@ 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 e2b09b575416a47277c53c6d49572d0845cb8a72..84f23d00a42af612d4ef636d8841db089e77270f 100644
index bb7ec8b5a76155ec5a6bfa29eda4e395cf3f23d2..c4dd2ab7afe61d354418dc5475c3b444609ccd80 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -304,6 +304,10 @@ public class CraftEventFactory {

Datei anzeigen

@ -37,10 +37,10 @@ index 73bc45000b5285ccf5b06e2f372d6c82bf843b82..5a591c439c5cef6b7e7e6f836ab813cb
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 35b2e4853c2791a39ebfd75c4c0208c998a43160..877b80ef3028acd9a783adf933286be0a86227bf 100644
index 52e57fa3b25dce10c17682964cbd4bcb4c130dc6..c6ac55cdece9e2901e5d17a23408171c6c49ff69 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 {
@@ -760,6 +760,14 @@ public abstract class AbstractContainerMenu {
public abstract boolean stillValid(Player player);
protected boolean moveItemStackTo(ItemStack stack, int startIndex, int endIndex, boolean fromLast) {
@ -55,7 +55,7 @@ index 35b2e4853c2791a39ebfd75c4c0208c998a43160..877b80ef3028acd9a783adf933286be0
boolean flag1 = false;
int k = startIndex;
@@ -778,18 +786,27 @@ public abstract class AbstractContainerMenu {
@@ -782,18 +790,27 @@ public abstract class AbstractContainerMenu {
slot = (Slot) this.slots.get(k);
itemstack1 = slot.getItem();
@ -83,7 +83,7 @@ index 35b2e4853c2791a39ebfd75c4c0208c998a43160..877b80ef3028acd9a783adf933286be0
flag1 = true;
}
}
@@ -820,14 +837,33 @@ public abstract class AbstractContainerMenu {
@@ -824,14 +841,33 @@ public abstract class AbstractContainerMenu {
slot = (Slot) this.slots.get(k);
itemstack1 = slot.getItem();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Implement TargetHitEvent
diff --git a/src/main/java/net/minecraft/world/level/block/TargetBlock.java b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
index fdaba168dd1ed25ed8d5b4cdd89d4ad801b10388..69eaf1341d282c4783dab84533ea2c053deed529 100644
index 5ea231aadfafdfc6d08aae472827ff1e3d62f4eb..3fdc994a9b27eb099e5483c019d673c1b390434c 100644
--- a/src/main/java/net/minecraft/world/level/block/TargetBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
@@ -35,6 +35,10 @@ public class TargetBlock extends Block {
@@ -42,6 +42,10 @@ public class TargetBlock extends Block {
@Override
public void onProjectileHit(Level world, BlockState state, BlockHitResult hit, Projectile projectile) {
int i = updateRedstoneOutput(world, state, hit, projectile);
@ -19,7 +19,7 @@ index fdaba168dd1ed25ed8d5b4cdd89d4ad801b10388..69eaf1341d282c4783dab84533ea2c05
Entity entity = projectile.getOwner();
if (entity instanceof ServerPlayer serverPlayer) {
serverPlayer.awardStat(Stats.TARGET_HIT);
@@ -46,6 +50,20 @@ public class TargetBlock extends Block {
@@ -53,6 +57,20 @@ public class TargetBlock extends Block {
private static int updateRedstoneOutput(LevelAccessor world, BlockState state, BlockHitResult hitResult, Entity entity) {
int i = getRedstoneStrength(hitResult, hitResult.getLocation());
int j = entity instanceof AbstractArrow ? 20 : 8;

Datei anzeigen

@ -28,10 +28,10 @@ index 05ac41e136da43284fb24a6b698ebd36318278fb..33d9131e9c75ef23cd637f5d6c39a270
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 4841e57256092b5c8b71fa1dc56b61f790837cdd..8ba9dc9c1fe2c2589178ec54b5ff2d19a7a8c633 100644
index 90621d3dfe8660f9b389ed292a3582a5dbb726bd..e68874f8d3d7628d11c1164849a4f835399d2452 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4227,6 +4227,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4269,6 +4269,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return;
}
// Paper end - rewrite chunk system

Datei anzeigen

@ -9,10 +9,10 @@ process to do this in the Bukkit API
Adds API for buildable, replaceable, burnable too.
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 848f089e559e4feb67dea9148291f70460da9e9d..1d637f5be518a054767154296fb7905bdbc175ec 100644
index aa644231425b9622437538b5c092d4064a40cced..98e87dc15e2ed23f6897ba6359846ff5bc32b655 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -439,6 +439,25 @@ public class CraftBlock implements Block {
@@ -440,6 +440,25 @@ public class CraftBlock implements Block {
return this.getNMS().liquid();
}

Datei anzeigen

@ -8,7 +8,7 @@ Before this patch, instant effects would be applied before the potion ItemStack
This patch makes it so that instant effects are applied after the potion ItemStack is removed, and the glass bottle is only put into the player's inventory if the player is not dead. Otherwise, the glass bottle is dropped on the ground.
diff --git a/src/main/java/net/minecraft/world/item/PotionItem.java b/src/main/java/net/minecraft/world/item/PotionItem.java
index 84723e0e04cde81d695b95ea6a29bc875fb58ff1..8c79ca75089e739d4899421106833e42e4e57280 100644
index bb19a00c24e92058e05076b2ca0278dcae1890ae..d7ef159cc44787558ba41964f57a79f048371e97 100644
--- a/src/main/java/net/minecraft/world/item/PotionItem.java
+++ b/src/main/java/net/minecraft/world/item/PotionItem.java
@@ -50,6 +50,7 @@ public class PotionItem extends Item {

Datei anzeigen

@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BrodyBeckwith <brody@beckwith.dev>
Date: Fri, 9 Oct 2020 20:30:12 -0400
Subject: [PATCH] Allow disabling mob spawner spawn egg transformation
diff --git a/src/main/java/net/minecraft/world/item/SpawnEggItem.java b/src/main/java/net/minecraft/world/item/SpawnEggItem.java
index 8176b64e49166cc24ef7f011881fda38bc68c2a4..591291d3d872d505a6031048c21b2cbeeb5394b2 100644
--- a/src/main/java/net/minecraft/world/item/SpawnEggItem.java
+++ b/src/main/java/net/minecraft/world/item/SpawnEggItem.java
@@ -63,6 +63,7 @@ public class SpawnEggItem extends Item {
EntityType entitytypes;
if (tileentity instanceof Spawner) {
+ if (!world.paperConfig().entities.spawning.disableMobSpawnerSpawnEggTransformation) { // Paper - add condition
Spawner spawner = (Spawner) tileentity;
entitytypes = this.getType(itemstack.getTag());
@@ -71,6 +72,7 @@ public class SpawnEggItem extends Item {
world.gameEvent((Entity) context.getPlayer(), GameEvent.BLOCK_CHANGE, blockposition);
itemstack.shrink(1);
return InteractionResult.CONSUME;
+ } // Paper - end if
} else {
BlockPos blockposition1;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerFlowerPotManipulateEvent
diff --git a/src/main/java/net/minecraft/world/level/block/FlowerPotBlock.java b/src/main/java/net/minecraft/world/level/block/FlowerPotBlock.java
index 9a8fc69de43fcfeebcb31c895fa4b5868952fa0a..b229b21b4a9b953983e743f345e46e4235e2809d 100644
index c450faf8c043665eab020141f3c27e3d9890cb86..f8d76e05a1b5ed25cbe8e2adeb63a748ff0fe3d7 100644
--- a/src/main/java/net/minecraft/world/level/block/FlowerPotBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FlowerPotBlock.java
@@ -52,6 +52,25 @@ public class FlowerPotBlock extends Block {
@@ -66,6 +66,25 @@ public class FlowerPotBlock extends Block {
boolean bl = blockState.is(Blocks.AIR);
boolean bl2 = this.isEmpty();
if (bl != bl2) {

Datei anzeigen

@ -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 d8ae73b68e449a2ab7e39acf3c120248948480d6..11f62618aa36cbc7c12e477d6a8c773c86e59a21 100644
index 08ff8e489d86030dac403b405b016b77d7f81598..f26d43404a613807cef765897e17192651b9e1a8 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1734,7 +1734,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1761,7 +1761,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 d8ae73b68e449a2ab7e39acf3c120248948480d6..11f62618aa36cbc7c12e477d6a8c773c
this.player.swing(enumhand, true);
}
}
@@ -2296,13 +2296,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2304,13 +2304,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d3 = this.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

Datei anzeigen

@ -5,7 +5,7 @@ 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 4677e47e4a84d09025cfb9327c1ed3bead1a3feb..21311d67565443b4ef59f8676f616237d28a8084 100644
index fa014c04cc51a55345a1c50098f486161051741d..37724831ba9db2d0fb2e7756816e0355bc760815 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
@@ -243,6 +243,7 @@ public class Slime extends Mob implements Enemy {

Datei anzeigen

@ -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 6a1001cb708a7f779a801428d2b00fbcde888bc1..2e240ad721928a9a68370114ba61c21884ef1472 100644
index 334001cb749600c973c82391e1c11f0e40bd2dfb..2a480026c3bfb06e6556fe5b11d9712c8e02debe 100644
--- a/src/main/java/net/minecraft/world/level/GameRules.java
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
@@ -281,10 +281,10 @@ public class GameRules {
@@ -285,10 +285,10 @@ public class GameRules {
this.type = type;
}
@ -35,7 +35,7 @@ index 6a1001cb708a7f779a801428d2b00fbcde888bc1..2e240ad721928a9a68370114ba61c218
this.onChanged(((CommandSourceStack) context.getSource()).getServer());
}
@@ -342,8 +342,11 @@ public class GameRules {
@@ -346,8 +346,11 @@ public class GameRules {
}
@Override
@ -49,7 +49,7 @@ index 6a1001cb708a7f779a801428d2b00fbcde888bc1..2e240ad721928a9a68370114ba61c218
}
public boolean get() {
@@ -407,8 +410,11 @@ public class GameRules {
@@ -411,8 +414,11 @@ public class GameRules {
}
@Override
@ -64,10 +64,10 @@ index 6a1001cb708a7f779a801428d2b00fbcde888bc1..2e240ad721928a9a68370114ba61c218
public int get() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 787f78e663017eae375d7eaee9d1508913598829..b4e1a0990ca8a9d4a17012ff3bae367e046ae27f 100644
index 16df867ff996d33dc08831200d172633c9d68612..cb9db52f7dba755146713be45cb66905e065336f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1873,8 +1873,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1879,8 +1879,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
if (!this.isGameRule(rule)) return false;
@ -82,7 +82,7 @@ index 787f78e663017eae375d7eaee9d1508913598829..b4e1a0990ca8a9d4a17012ff3bae367e
handle.onChanged(this.getHandle().getServer());
return true;
}
@@ -1910,8 +1915,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1916,8 +1921,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
if (!this.isGameRule(rule.getName())) return false;

Datei anzeigen

@ -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 331cc75f4802b7c6a2903d506e58d887ba15921d..27c7c696647271ffed345e339822526730a9523b 100644
index f73ad3b85ed46913c10891edd3a52b9ad694e5e2..c063dece36e110691297b38635a9d14d70c4e391 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2009,7 +2009,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2108,7 +2108,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.functionManager;
}
@ -22,7 +22,7 @@ index 331cc75f4802b7c6a2903d506e58d887ba15921d..27c7c696647271ffed345e3398225267
RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE);
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
@@ -2050,6 +2056,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2149,6 +2155,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

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Implemented BlockFailedDispenseEvent
diff --git a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
index e66ed3fcfcbabf4b466c1f7988d337b3b7bcd85d..5cf5b451fecb1ff04d0c4aca1fb0b702c7f99bdf 100644
index d77ca08832105e82cee265eea222e0d64a8876ef..21c37ad365e09a296c3e7a2d0cde7a29ced09c33 100644
--- a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
@@ -89,8 +89,10 @@ public class DispenserBlock extends BaseEntityBlock {
@@ -95,8 +95,10 @@ public class DispenserBlock extends BaseEntityBlock {
int i = tileentitydispenser.getRandomSlot(world.random);
if (i < 0) {
@ -20,10 +20,10 @@ index e66ed3fcfcbabf4b466c1f7988d337b3b7bcd85d..5cf5b451fecb1ff04d0c4aca1fb0b702
ItemStack itemstack = tileentitydispenser.getItem(i);
DispenseItemBehavior idispensebehavior = this.getDispenseMethod(itemstack);
diff --git a/src/main/java/net/minecraft/world/level/block/DropperBlock.java b/src/main/java/net/minecraft/world/level/block/DropperBlock.java
index 7dd0570b2457c612484ab89a8efcedd094c4772c..b1ba2c1da9d7b59a5316574deb8247406b55d28d 100644
index 913ed110d8402d377152753325901eb7f3ac82d6..675644974ae6fb5380a6496a2ac3ec4d1ef7c924 100644
--- a/src/main/java/net/minecraft/world/level/block/DropperBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DropperBlock.java
@@ -52,6 +52,7 @@ public class DropperBlock extends DispenserBlock {
@@ -59,6 +59,7 @@ public class DropperBlock extends DispenserBlock {
int i = tileentitydispenser.getRandomSlot(world.random);
if (i < 0) {
@ -32,10 +32,10 @@ index 7dd0570b2457c612484ab89a8efcedd094c4772c..b1ba2c1da9d7b59a5316574deb824740
} else {
ItemStack itemstack = tileentitydispenser.getItem(i);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 84f23d00a42af612d4ef636d8841db089e77270f..ba4c8e74e0e073b48b5cf1fad86eb670bc35586f 100644
index c4dd2ab7afe61d354418dc5475c3b444609ccd80..7b6ed5812a9ea1ba1a4a2183c1568e9c60cc9c21 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2044,4 +2044,12 @@ public class CraftEventFactory {
@@ -2043,4 +2043,12 @@ public class CraftEventFactory {
Bukkit.getPluginManager().callEvent(event);
return event;
}

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen