3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Dieser Commit ist enthalten in:
Lulu13022002 2023-09-22 18:11:35 +02:00
Ursprung ac7e4ad35e
Commit 8baf510f92
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 491C8F0B8ACDEB01
64 geänderte Dateien mit 158 neuen und 180 gelöschten Zeilen

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Expose pre-collision moving velocity to
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ca93f7a5484fb93cdfb6bb7749ffbaefb6f43042..d9f6b0e0b20f4106ffead6b773b5489b71924c61 100644
index 05d351c60e86014b384195c20bfeddcc214b7d4e..b31a574278bb5c6168d85d5d48b96ccac2d1ceaf 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1156,7 +1156,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1037,7 +1037,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
if (!bl.getType().isAir()) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] config for disabling entity tag tags
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index c11e805dc4b77f08cadb0e99d86635036405da3e..9afc81ccb237c3655d64cdbe8a0db9a4d7791043 100644
index 0d38fe5a88af0afce85b8be7051d0e2f43f0ac34..ee3db367162ce075ff420fd724484a8593da0fe7 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -492,6 +492,13 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@@ -493,6 +493,13 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
if (world.isClientSide || !entity.onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) {
CompoundTag nbttagcompound1 = entity.saveWithoutId(new CompoundTag());
UUID uuid = entity.getUUID();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 771341996a41723cceb945e18ac8b5adae337d91..5cb45e6e5f73996b2a603589b8571cf0155a42c5 100644
index 4b8406a5cae41ca6db7170681b50bd23fb0f00d8..fb9265fbcb2d1fe13d4006d13520bb92e764d349 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3616,7 +3616,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3401,7 +3401,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
this.chatMessageChain.append((executor) -> {
this.player.setChatSession(session);
@ -18,10 +18,10 @@ index 771341996a41723cceb945e18ac8b5adae337d91..5cb45e6e5f73996b2a603589b8571cf0
});
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 490f2d6f7a43d0a5915a80960c1c7c48b3eea19f..8547e7ff2f1f5b7701fb0f3c3010c14601a5f83e 100644
index e199f723517fc4ed7f5320ac18bf3e5c45fca560..620c136d970c836c036ea5c22b5642ae6f5dc567 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -353,6 +353,7 @@ public abstract class PlayerList {
@@ -339,6 +339,7 @@ public abstract class PlayerList {
// CraftBukkit start - sendAll above replaced with this loop
ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player));
@ -29,7 +29,7 @@ index 490f2d6f7a43d0a5915a80960c1c7c48b3eea19f..8547e7ff2f1f5b7701fb0f3c3010c146
for (int i = 0; i < this.players.size(); ++i) {
ServerPlayer entityplayer1 = (ServerPlayer) this.players.get(i);
@@ -360,12 +361,17 @@ public abstract class PlayerList {
@@ -346,12 +347,17 @@ public abstract class PlayerList {
entityplayer1.connection.send(packet);
}

Datei anzeigen

@ -22,10 +22,10 @@ This patch corrects this behaviour by only shrinking the item if a totem
of undying was found and the event was called uncancelled.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 6a50f553753d4a7c596ad081c6bb3557afa884d6..634d272b71c464b9279a7e3ba83e9eacfcff580b 100644
index ac89d89081cde83b700dd7c13930cd14bf1e2bc4..3580c3f6d17186b591e78f62feb63213c9d34fd6 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1582,7 +1582,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1614,7 +1614,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getCraftServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] Win Screen API
public net.minecraft.server.level.ServerPlayer seenCredits
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e50651a0c9f856d0cfca3b8ee3b664f19393690f..241cc7dda1de8c711050b269b74b1b74adef5fce 100644
index 0c1e4c7c1c57dec05b59e8c89c4534e9015de79d..80903afc3678828eccece4149395538a51d20d3d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1213,6 +1213,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1173,6 +1173,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix force-opening enchantment tables
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 6f694f68c2792da7088c2aba1d2b201f802b3a5c..50f2a94c5f2e9f7c08cea137d8d84d65e2c41326 100644
index beefbb0d04bd995bc8750707487183c3ffc22239..196aa9dd610e7a10c35e0a532de012976829bb43 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -402,7 +402,18 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add Entity Body Yaw API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 1186ee7cc4671892346b7173d10125febcfbf88a..4c2818f2ab2c53a836622d0ef17b19ecd1762908 100644
index 6915da7ef7f1179f1efb3a959194c573e6b362e9..fd89da8b92492c3b507b68d1040d293977528441 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1430,6 +1430,31 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -41,7 +41,7 @@ index 1186ee7cc4671892346b7173d10125febcfbf88a..4c2818f2ab2c53a836622d0ef17b19ec
// Paper Start - Collision API
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 4b8d619e447d761cb09252388e09c843bbc7d3a2..ae1a86798a5d65ec6ee4388c650e09850c3f35f8 100644
index dc6f09332d76b9f23e42fce42a2900d7a3d968a4..22847ea7063a660934515a1108e66f9265f1685f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1056,6 +1056,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Update the flag when a captured block state is outdated
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 6b9b5af04fe06c3f5f20a56955bd12bd2ddb7e5c..c24944d24d6e40e853823e6e2653275553157b1f 100644
index aa5879aef6e6e517ead13a422fed7674f715c994..5841a5be7e0b206ecb120a0a5771733ca6439989 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -615,6 +615,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -550,6 +550,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
this.capturedBlockStates.put(pos.immutable(), blockstate);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityFertilizeEggEvent
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
index 76ab82553488e129882fc9beb603636bb723ec42..d3c15d029d5f003cba3c89f7ea1f3ed4f943f2bd 100644
index 5f57f13d50e051c621e401b63c0b55b3a2a73fa3..490472bb618e9ac07da5883a71dff8920525b1e2 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
@@ -441,6 +441,10 @@ public class Turtle extends Animal {
@@ -450,6 +450,10 @@ public class Turtle extends Animal {
if (entityplayer == null && this.partner.getLoveCause() != null) {
entityplayer = this.partner.getLoveCause();
}
@ -19,7 +19,7 @@ index 76ab82553488e129882fc9beb603636bb723ec42..d3c15d029d5f003cba3c89f7ea1f3ed4
if (entityplayer != null) {
entityplayer.awardStat(Stats.ANIMALS_BRED);
@@ -455,7 +459,7 @@ public class Turtle extends Animal {
@@ -464,7 +468,7 @@ public class Turtle extends Animal {
RandomSource randomsource = this.animal.getRandom();
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
@ -29,10 +29,10 @@ index 76ab82553488e129882fc9beb603636bb723ec42..d3c15d029d5f003cba3c89f7ea1f3ed4
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
index 22eb0a8fc35baa04b34265b62aa29a71f3cc7343..203691417e208b9e023e5f8c3b76993db2747ba8 100644
index 7d1e6427ab5f2dabe9072d092d733b0ff34e0b44..5000ebc5f19dee72a86360062b822aecd60beb47 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
@@ -242,7 +242,12 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
@@ -244,7 +244,12 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
@Override
public void spawnChildFromBreeding(ServerLevel world, Animal other) {
@ -47,10 +47,10 @@ index 22eb0a8fc35baa04b34265b62aa29a71f3cc7343..203691417e208b9e023e5f8c3b76993d
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
index 3de0424a18e0a3b0cd2f755adfa859e474d5c643..94965855233509cbe48cebd690a83ef29cd0c27a 100644
index 36b3945832733b5ad66d25aa3a31335234d2acff..47a5125e44cea1ece84657cdb874807f13ee824f 100644
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -350,11 +350,16 @@ public class Sniffer extends Animal {
@@ -347,11 +347,16 @@ public class Sniffer extends Animal {
@Override
public void spawnChildFromBreeding(ServerLevel world, Animal other) {
@ -69,10 +69,10 @@ index 3de0424a18e0a3b0cd2f755adfa859e474d5c643..94965855233509cbe48cebd690a83ef2
this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F);
} // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index ee382cae3feca1de40d95faf6af023c8a7df05b9..3362ded586f723ef1f89ad6dfa872ae468f92933 100644
index 52875848c97be4569b03f3ebdb02a332da06e361..bdcb1752d0959bbabc17d411f36680bad6669651 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2047,4 +2047,29 @@ public class CraftEventFactory {
@@ -2049,4 +2049,29 @@ public class CraftEventFactory {
return event.callEvent();
}
// Paper end

Datei anzeigen

@ -7,7 +7,7 @@ Subject: [PATCH] Fix HumanEntity#drop not updating the client inv
public net.minecraft.server.level.ServerPlayer containerSynchronizer
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 50f2a94c5f2e9f7c08cea137d8d84d65e2c41326..5fe9a0985432ac6cdd28a2a138854a24f10e42ba 100644
index 196aa9dd610e7a10c35e0a532de012976829bb43..5b01ffcdbfff7dbd05143cb08479c90e9b29dfba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -755,8 +755,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {

Datei anzeigen

@ -23,10 +23,10 @@ index f054d67a637b204de604fadc0d321f5c9816d808..fc5f1e1b445f0a55a35a31d58a90920a
return !this.getResponse();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 634d272b71c464b9279a7e3ba83e9eacfcff580b..cf3173c3b3d3362040eb57ee39221e24a5bc5221 100644
index 3580c3f6d17186b591e78f62feb63213c9d34fd6..e20793aedc099857d82dac394e9ef23b14ccc33f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2273,7 +2273,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2307,7 +2307,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Duplicate triggers if blocking
if (event.getDamage(DamageModifier.BLOCKING) < 0) {
if (this instanceof ServerPlayer) {
@ -35,7 +35,7 @@ index 634d272b71c464b9279a7e3ba83e9eacfcff580b..cf3173c3b3d3362040eb57ee39221e24
f2 = (float) -event.getDamage(DamageModifier.BLOCKING);
if (f2 > 0.0F && f2 < 3.4028235E37F) {
((ServerPlayer) this).awardStat(Stats.DAMAGE_BLOCKED_BY_SHIELD, Math.round(originalDamage * 10.0F));
@@ -2281,7 +2281,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2315,7 +2315,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
if (damagesource.getEntity() instanceof ServerPlayer) {

Datei anzeigen

@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Thu, 16 Mar 2023 16:27:50 +0100
Subject: [PATCH] Fix text display error on spawn
diff --git a/src/main/java/net/minecraft/world/entity/Display.java b/src/main/java/net/minecraft/world/entity/Display.java
index 355800fe33a24b47379a14139711459a54e90c5a..ec4325b90b5707e97927b95064ef4dd840b2a538 100644
--- a/src/main/java/net/minecraft/world/entity/Display.java
+++ b/src/main/java/net/minecraft/world/entity/Display.java
@@ -862,7 +862,7 @@ public abstract class Display extends Entity {
byte b = loadFlag((byte)0, nbt, "shadow", (byte)1);
b = loadFlag(b, nbt, "see_through", (byte)2);
b = loadFlag(b, nbt, "default_background", (byte)4);
- Optional<Display.TextDisplay.Align> optional = Display.TextDisplay.Align.CODEC.decode(NbtOps.INSTANCE, nbt.get("alignment")).resultOrPartial(Util.prefix("Display entity", Display.LOGGER::error)).map(Pair::getFirst);
+ Optional<Display.TextDisplay.Align> optional = Display.TextDisplay.Align.CODEC.decode(NbtOps.INSTANCE, nbt.get("alignment")).result().map(Pair::getFirst); // Paper - hide error message
if (optional.isPresent()) {
byte var10000;
switch ((Display.TextDisplay.Align)optional.get()) {

Datei anzeigen

@ -30,10 +30,10 @@ index e938e46a142f3764f8224a1fd035e7d541b59c56..9d1ee40456a8d7001eee654a62e62cab
}
diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
index f984af71fc034e09147fa339bd5f260a7466e127..46fd2f45923366c38b77270a45c80b31250ae37e 100644
index 0b1a0be964d799f1706c273092dc653fa04e8014..a6e712606ece631502ae4c7513403092df77524f 100644
--- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
@@ -49,6 +49,12 @@ public class BeaconMenu extends AbstractContainerMenu {
@@ -51,6 +51,12 @@ public class BeaconMenu extends AbstractContainerMenu {
public int getMaxStackSize() {
return 1;
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix chiseled bookshelf and jukebox setItem with air
diff --git a/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
index bf39b8b061dd12d33217d80a4620e13ec921fe98..fd8a38dc031621b4e1bfb74a4cdf4654c5cd2b0a 100644
index 15ef84c39a1a77cd9e33efee670bd0967c52657c..dda68d157d4da6e379567b25810051b652ec122f 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
@@ -147,7 +147,7 @@ public class ChiseledBookShelfBlockEntity extends BlockEntity implements Contain
@@ -149,7 +149,7 @@ public class ChiseledBookShelfBlockEntity extends BlockEntity implements Contain
@Override
public void setItem(int slot, ItemStack stack) {
@ -16,9 +16,9 @@ index bf39b8b061dd12d33217d80a4620e13ec921fe98..fd8a38dc031621b4e1bfb74a4cdf4654
+ if (stack.isEmpty() || stack.is(ItemTags.BOOKSHELF_BOOKS)) { // Paper
this.items.set(slot, stack);
if (level != null) this.updateState(slot); // CraftBukkit - SPIGOT-7381: check for null world
}
} else if (stack.isEmpty()) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
index 77ece220a2e204c3e66e660c639abda957bf21b9..62acd6686626c84c9fc3964af62097101e8e582f 100644
index 2c1edc6dfc7fd1a8af977919ce31913365cf3ddd..6c9b3fb1a015320da207c6b724cc18fb6b80267a 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
@@ -183,6 +183,12 @@ public class JukeboxBlockEntity extends BlockEntity implements Clearable, Contai

Datei anzeigen

@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers
* Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins)
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f1b8ebb9718c8ff824d2707a0d1eb08cdcd18f39..b31470c4caeb1bd29b99bfafea90bf10d714568c 100644
index bf9e396505c5004b0fb640837b41a4885bcab08e..189efb8de2b712d554dcbdcfc50faf207a8beed1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1521,6 +1521,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1513,6 +1513,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
@ -25,10 +25,10 @@ index f1b8ebb9718c8ff824d2707a0d1eb08cdcd18f39..b31470c4caeb1bd29b99bfafea90bf10
this.profiler.push(() -> {
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index cc58df88fc3788dcfb7e429ef899b3d558a931cc..b3c99bb1da54209a21b090d31713167fd9729654 100644
index fe153047d3198dc5c86396f5ea595fcc572496af..f9b9cb35a985108794588a1a0a9ca2556cc036b6 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -723,10 +723,16 @@ public final class ItemStack {
@@ -728,10 +728,16 @@ public final class ItemStack {
}
public ItemStack copy() {
@ -68,7 +68,7 @@ index 5bdad1866386908b9fef74d15862eb107fabe68f..370a25d2deb54f10a35ee24d9e7e92fb
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
index 6907e647ef4d3f5c9c46edb4cf0905844dd1cea9..b11f51762ca289d99eaa49e66e31e58595bcea4e 100644
index f98367830e87d5f1428448931f756d9277699563..e2e845a01e43bc01aba7a148d2b2d55b13898f50 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -193,6 +193,202 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@ -500,7 +500,7 @@ index 6907e647ef4d3f5c9c46edb4cf0905844dd1cea9..b11f51762ca289d99eaa49e66e31e585
itemEntity.level().getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
return false;
@@ -442,7 +647,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@@ -443,7 +648,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
stack = stack.split(to.getMaxStackSize());
}
// Spigot end
@ -510,7 +510,7 @@ index 6907e647ef4d3f5c9c46edb4cf0905844dd1cea9..b11f51762ca289d99eaa49e66e31e585
stack = leftover; // Paper
flag = true;
} else if (HopperBlockEntity.canMergeItems(itemstack1, stack)) {
@@ -516,19 +723,47 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@@ -517,19 +724,47 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
// CraftBukkit end
}
@ -562,7 +562,7 @@ index 6907e647ef4d3f5c9c46edb4cf0905844dd1cea9..b11f51762ca289d99eaa49e66e31e585
Object object = null;
BlockPos blockposition = BlockPos.containing(x, y, z);
if ( !world.spigotConfig.hopperCanLoadChunks && !world.hasChunkAt( blockposition ) ) return null; // Spigot
@@ -548,7 +783,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@@ -549,7 +784,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
}
}
@ -571,7 +571,7 @@ index 6907e647ef4d3f5c9c46edb4cf0905844dd1cea9..b11f51762ca289d99eaa49e66e31e585
List<Entity> list = world.getEntities((Entity) null, new AABB(x - 0.5D, y - 0.5D, z - 0.5D, x + 0.5D, y + 0.5D, z + 0.5D), EntitySelector.CONTAINER_ENTITY_SELECTOR);
if (!list.isEmpty()) {
@@ -560,7 +795,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@@ -561,7 +796,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
}
private static boolean canMergeItems(ItemStack first, ItemStack second) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix beehives generating from using bonemeal
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index b3c99bb1da54209a21b090d31713167fd9729654..c9363f01b3c2369d5c63e50977c28a3fa760bae1 100644
index f9b9cb35a985108794588a1a0a9ca2556cc036b6..08464c7f114a04169c9ddeceef936749952770e6 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -396,6 +396,7 @@ public final class ItemStack {
@@ -401,6 +401,7 @@ public final class ItemStack {
}
for (CraftBlockState blockstate : blocks) {
world.setBlock(blockstate.getPosition(),blockstate.getHandle(), blockstate.getFlag()); // SPIGOT-7248 - manual update to avoid physics where appropriate

Datei anzeigen

@ -6,14 +6,14 @@ Subject: [PATCH] Fix crash relating to bad recipes in furnace-like tile
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index 5ccc419b904aec590c5624438da61ca6724b20d6..448fa4f4f200430d6ce3051763c7ceb697696146 100644
index 18cb88ce3d3d0999772f361d66b0c9c3f7cbac85..3a9ebfca6367568f8518340cb9ef7f7ada96409b 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -642,6 +642,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
Entry<ResourceLocation> entry = (Entry) objectiterator.next();
worldserver.getRecipeManager().byKey((ResourceLocation) entry.getKey()).ifPresent((irecipe) -> {
+ if (!(irecipe instanceof AbstractCookingRecipe)) return; // Paper - don't process non-cooking recipes
list.add(irecipe);
AbstractFurnaceBlockEntity.createExperience(worldserver, vec3d, entry.getIntValue(), ((AbstractCookingRecipe) irecipe).getExperience(), blockposition, entityplayer, itemstack, amount); // CraftBukkit
worldserver.getRecipeManager().byKey((ResourceLocation) entry.getKey()).ifPresent((recipeholder) -> {
+ if (!(recipeholder.value() instanceof AbstractCookingRecipe)) return; // Paper - don't process non-cooking recipes
list.add(recipeholder);
AbstractFurnaceBlockEntity.createExperience(worldserver, vec3d, entry.getIntValue(), ((AbstractCookingRecipe) recipeholder.value()).getExperience(), blockposition, entityplayer, itemstack, amount); // CraftBukkit
});

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Treat sequence violations like they should be
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5cb45e6e5f73996b2a603589b8571cf0155a42c5..419979939efcf83f03edab522b4360c9d2c03fe3 100644
index fb9265fbcb2d1fe13d4006d13520bb92e764d349..ed22f5f6d7aacdd9a34793cb213216c669254971 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2129,6 +2129,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1997,6 +1997,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void ackBlockChangesUpTo(int sequence) {
if (sequence < 0) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent causing expired keys from impacting new joins
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java
index 23e0e6937e28f09271a4ec7c35e0076a576cf3d3..4aa8b483841028fbcc43f9ed47730881263e5065 100644
index 40ac5cf19934207f06755fbea02d4626d7aa0511..32e3f347e2e025e2675e9410116386e472bd6a79 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java
@@ -94,7 +94,13 @@ public class ClientboundPlayerInfoUpdatePacket implements Packet<ClientGamePacke
@@ -96,7 +96,13 @@ public class ClientboundPlayerInfoUpdatePacket implements Packet<ClientGamePacke
INITIALIZE_CHAT((serialized, buf) -> {
serialized.chatSession = buf.readNullable(RemoteChatSession.Data::read);
}, (buf, entry) -> {
@ -24,10 +24,10 @@ index 23e0e6937e28f09271a4ec7c35e0076a576cf3d3..4aa8b483841028fbcc43f9ed47730881
UPDATE_GAME_MODE((serialized, buf) -> {
serialized.gameMode = GameType.byId(buf.readVarInt());
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 419979939efcf83f03edab522b4360c9d2c03fe3..f6ba77a7c43a6a030fe4073ba7ee2970e7d774f3 100644
index ed22f5f6d7aacdd9a34793cb213216c669254971..d3b6d1ea60017b40f0ed5a158518d53ca37294a6 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -298,6 +298,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -284,6 +284,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private final AtomicReference<Instant> lastChatTimeStamp;
@Nullable
private RemoteChatSession chatSession;
@ -35,7 +35,7 @@ index 419979939efcf83f03edab522b4360c9d2c03fe3..f6ba77a7c43a6a030fe4073ba7ee2970
private SignedMessageChain.Decoder signedMessageDecoder;
private final LastSeenMessagesValidator lastSeenMessages;
private final MessageSignatureCache messageSignatureCache;
@@ -438,6 +439,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -393,6 +394,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause
}
@ -49,7 +49,7 @@ index 419979939efcf83f03edab522b4360c9d2c03fe3..f6ba77a7c43a6a030fe4073ba7ee2970
}
public void resetPosition() {
@@ -3614,6 +3622,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3399,6 +3407,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private void resetPlayerChatState(RemoteChatSession session) {
this.chatSession = session;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 37873ea2876a89ac8ea702ab0a71171e044852bc..18aac3da3c88f33b1a71a5920a8daa27e9723913 100644
index 23dd27fb62609cfc648a1d1da66a59aa18fa0d8f..a520adc6cb89dbad79ae8464aff7cb9e76e4f42b 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1782,6 +1782,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1433,6 +1433,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@Override
public void gameEvent(GameEvent event, Vec3 emitterPos, GameEvent.Context emitter) {

Datei anzeigen

@ -5,18 +5,18 @@ Subject: [PATCH] Use array for gamerule storage
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
index edd2c9d0cf5a81c779011cb4215d496a8987b784..6fa00d9239546aa82b9e92e25a33103868084c38 100644
index 6c688e41b65376fdaf70de633e560f84b984dfc6..318f3724365a72c7fd137cd4959134266ea5f5cc 100644
--- a/src/main/java/net/minecraft/world/level/GameRules.java
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
@@ -100,6 +100,7 @@ public class GameRules {
public static final GameRules.Key<GameRules.BooleanValue> RULE_GLOBAL_SOUND_EVENTS = GameRules.register("globalSoundEvents", GameRules.Category.MISC, GameRules.BooleanValue.create(true));
@@ -110,6 +110,7 @@ public class GameRules {
public static final GameRules.Key<GameRules.BooleanValue> RULE_DO_VINES_SPREAD = GameRules.register("doVinesSpread", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
public static final GameRules.Key<GameRules.BooleanValue> RULE_ENDER_PEARLS_VANISH_ON_DEATH = GameRules.register("enderPearlsVanishOnDeath", GameRules.Category.PLAYER, GameRules.BooleanValue.create(true));
private final Map<GameRules.Key<?>, GameRules.Value<?>> rules;
+ private final GameRules.Value<?>[] gameruleArray; // Paper
private static <T extends GameRules.Value<T>> GameRules.Key<T> register(String name, GameRules.Category category, GameRules.Type<T> type) {
GameRules.Key<T> gamerules_gamerulekey = new GameRules.Key<>(name, category);
@@ -118,17 +119,30 @@ public class GameRules {
@@ -128,17 +129,30 @@ public class GameRules {
}
public GameRules() {
@ -50,7 +50,7 @@ index edd2c9d0cf5a81c779011cb4215d496a8987b784..6fa00d9239546aa82b9e92e25a331038
}
public CompoundTag createTag() {
@@ -187,6 +201,10 @@ public class GameRules {
@@ -197,6 +211,10 @@ public class GameRules {
}
public static final class Key<T extends GameRules.Value<T>> {

Datei anzeigen

@ -6,15 +6,17 @@ Subject: [PATCH] Fix demo flag not enabling demo mode
https://github.com/PaperMC/Paper/issues/9046
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index c1a492827bbde63dd464402767d4c6a2cdf689eb..a7ebf851a65231074c89a24f30de4ac2fb5b63e4 100644
index dbf230ab5a89b39dba724a0507076102574e860f..d6f5174387f9bb3838aa41fa0d4cd0bb19f721ec 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -312,7 +312,7 @@ public class Main {
@@ -307,7 +307,9 @@ public class Main {
/*
dedicatedserver1.setSingleplayerProfile(optionset.has(optionspec8) ? new GameProfile((UUID) null, (String) optionset.valueOf(optionspec8)) : null);
dedicatedserver1.setPort((Integer) optionset.valueOf(optionspec11));
dedicatedserver1.setPort((Integer) optionset.valueOf(optionspec10));
- dedicatedserver1.setDemo(optionset.has(optionspec2));
+ */dedicatedserver1.setDemo(optionset.has("demo"));/* // Paper - Restore setting the demo mode
dedicatedserver1.setId((String) optionset.valueOf(optionspec12));
+ */
+ dedicatedserver1.setDemo(optionset.has("demo")); // Paper - Restore setting the demo mode
+ /*
dedicatedserver1.setId((String) optionset.valueOf(optionspec11));
*/
boolean flag1 = !optionset.has("nogui") && !optionset.nonOptionArguments().contains("nogui");

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix DamageCause for Falling Blocks
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 3362ded586f723ef1f89ad6dfa872ae468f92933..32587ddf2440cbb16884ed8140f8827357a44cba 100644
index bdcb1752d0959bbabc17d411f36680bad6669651..9f012b6ccedc2f325f1cb7ee2d4cb843db4e6a41 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1058,6 +1058,11 @@ public class CraftEventFactory {
@@ -1060,6 +1060,11 @@ public class CraftEventFactory {
} else if (source.is(DamageTypes.SONIC_BOOM)) {
cause = DamageCause.SONIC_BOOM;
}

Datei anzeigen

@ -16,10 +16,10 @@ sections with a ZeroBitStorage data to to take ~20% of the process,
now it takes <1%.
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
index 7a57a75db00cd64e4c95740b575277a1f355e414..d4477b0dda6a1ef7bd8323c0d11b636bd071d18e 100644
index f150a16fbf888455301d8b9043f0b45fb1fa1d84..fd4c4122e3811c8f5d8c02f8faaf3579bcb8ad79 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
@@ -232,6 +232,7 @@ public class LevelChunkSection {
@@ -229,6 +229,7 @@ public class LevelChunkSection {
this.nonEmptyBlockCount = 0;
this.tickingBlockCount = 0;
this.tickingFluidCount = 0;
@ -27,7 +27,7 @@ index 7a57a75db00cd64e4c95740b575277a1f355e414..d4477b0dda6a1ef7bd8323c0d11b636b
this.states.forEachLocation((BlockState iblockdata, int i) -> {
FluidState fluid = iblockdata.getFluidState();
@@ -251,6 +252,7 @@ public class LevelChunkSection {
@@ -248,6 +249,7 @@ public class LevelChunkSection {
}
});

Datei anzeigen

@ -33,10 +33,10 @@ index 8d8fe55a05eea237a8af99ed15ab16d6167daa77..eca634792d2a7cc649675e3394e84dba
return k > 0 ? this.repairPlayerItems(player, k) : 0;
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 241cc7dda1de8c711050b269b74b1b74adef5fce..5be4d15ac3df989339c586bbeb8148b1b41d47d4 100644
index 80903afc3678828eccece4149395538a51d20d3d..0eddcd61a7253fe840b84f69ba4a4ada6cb716ff 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1735,11 +1735,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1695,11 +1695,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ());
int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());
@ -51,10 +51,10 @@ index 241cc7dda1de8c711050b269b74b1b74adef5fce..5be4d15ac3df989339c586bbeb8148b1
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 32587ddf2440cbb16884ed8140f8827357a44cba..36027749504b239285c57630c0500dfb5a6126ef 100644
index 9f012b6ccedc2f325f1cb7ee2d4cb843db4e6a41..4798ece84ad42cce048811a6b1dc9bb779f73945 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1294,10 +1294,10 @@ public class CraftEventFactory {
@@ -1296,10 +1296,10 @@ public class CraftEventFactory {
return event;
}

Datei anzeigen

@ -14,10 +14,10 @@ clearing the owner.
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d9f6b0e0b20f4106ffead6b773b5489b71924c61..cf9393dd02565134a1ce428e84a9f26ac2d39a0d 100644
index b31a574278bb5c6168d85d5d48b96ccac2d1ceaf..567d2a315503280f90497f2728b2ee220403cbad 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -382,6 +382,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -381,6 +381,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public boolean valid;
public boolean generation;
public int maxAirTicks = this.getDefaultMaxAirSupply(); // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()

Datei anzeigen

@ -22,10 +22,10 @@ index b0204af850ee182773ad458208cccd946ad148d5..ebee8de2ed831755b6fd154f6cc77ac9
if ((entityhuman == null || !entityhuman.getAbilities().instabuild) && itemstack != ItemStack.EMPTY) { // CraftBukkit
itemstack.shrink(1);
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index c9363f01b3c2369d5c63e50977c28a3fa760bae1..6f00794aec16db3e7a466f4b446d38bdb2623e8b 100644
index 08464c7f114a04169c9ddeceef936749952770e6..62fc1b110ec319bb91aa0639b18aa354a306a9ca 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -467,13 +467,7 @@ public final class ItemStack {
@@ -472,13 +472,7 @@ public final class ItemStack {
if (tileentity instanceof JukeboxBlockEntity) {
JukeboxBlockEntity tileentityjukebox = (JukeboxBlockEntity) tileentity;
@ -41,10 +41,10 @@ index c9363f01b3c2369d5c63e50977c28a3fa760bae1..6f00794aec16db3e7a466f4b446d38bd
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index c24944d24d6e40e853823e6e2653275553157b1f..773bfdd3ed457a352b5329f280c0d10297d579ba 100644
index 5841a5be7e0b206ecb120a0a5771733ca6439989..019a86e964f3f0d89aea9e1db18ad551914b07ef 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -730,17 +730,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -659,17 +659,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
CraftWorld world = ((ServerLevel) this).getWorld();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 6f00794aec16db3e7a466f4b446d38bdb2623e8b..2223aba0841280c5205ab0963c406449f85fa433 100644
index 62fc1b110ec319bb91aa0639b18aa354a306a9ca..fcd53d9c7a0a71624e68eb47e947fa783df4829f 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -518,7 +518,11 @@ public final class ItemStack {
@@ -523,7 +523,11 @@ public final class ItemStack {
// SPIGOT-1288 - play sound stripped from ItemBlock
if (this.item instanceof BlockItem) {

Datei anzeigen

@ -6,18 +6,18 @@ Subject: [PATCH] Call BlockGrowEvent for missing blocks
Call the event for pitcher crops and sniffer egg
diff --git a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
index 849c0ae6ca30691134f51e5d4d5da372e0e728bd..d2e8aafb8db17f2426dd83353c0cfdeaf0d372aa 100644
index aca205d641b4a87d093b140585cf04fa4fefca86..1641453fd17938bc8fcdba7f89a0515ebeef20c5 100644
--- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
@@ -126,7 +126,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl
private void grow(ServerLevel world, BlockState state, BlockPos pos, int amount) {
@@ -123,7 +123,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl
int i = Math.min(state.getValue(AGE) + amount, 4);
if (this.canGrow(world, pos, state, i)) {
- world.setBlock(pos, state.setValue(AGE, Integer.valueOf(i)), 2);
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, pos, state.setValue(AGE, Integer.valueOf(i)), 2)) return; // Paper
if (i >= 3) {
BlockPos blockPos = pos.above();
world.setBlock(blockPos, copyWaterloggedFrom(world, pos, this.defaultBlockState().setValue(AGE, Integer.valueOf(i)).setValue(HALF, DoubleBlockHalf.UPPER)), 3);
BlockState blockState = state.setValue(AGE, Integer.valueOf(i));
- world.setBlock(pos, blockState, 2);
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, pos, blockState, 2)) return; // Paper
if (isDouble(i)) {
world.setBlock(pos.above(), blockState.setValue(HALF, DoubleBlockHalf.UPPER), 3);
}
diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
index ecb8224beb0ee65855c7529b69ea56b7b6674664..fab44502b3e22eb8d1311068f88290ce31adb437 100644
--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 03fcdb0eb145d60b96bf241523ade1f4595abdef..1d62b3fa7cfbb891b7a1fda01a22f64a6bc1968e 100644
index 615baf99dd8680b97aa1f03d4a961e15bcdd832b..6438891e243d0c25f1b3fbe0303ef1c133637cbb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -357,7 +357,11 @@ public final class CraftServer implements Server {
@@ -360,7 +360,11 @@ public final class CraftServer implements Server {
}
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
this.commandsConfiguration.options().copyDefaults(true);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] fix MapLike spam for missing key 'selector'
diff --git a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
index 1fe9af20ca9b17cf346e28fc2075ce1db00d5dcd..043edba56c3d0021b9cdfafd9588ec6a50f944ab 100644
index e7bd45e9834ffc6b94dd07cf69a685de66c9c37a..af5019716f487d9e4259b259712cf022f987603b 100644
--- a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
+++ b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
@@ -350,7 +350,7 @@ public interface VibrationSystem {
@@ -347,7 +347,7 @@ public interface VibrationSystem {
public static Codec<VibrationSystem.Data> CODEC = RecordCodecBuilder.create((instance) -> {
return instance.group(VibrationInfo.CODEC.optionalFieldOf("event").forGetter((vibrationsystem_a) -> {
return Optional.ofNullable(vibrationsystem_a.currentVibration);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add method to remove all active potion effects
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index ae1a86798a5d65ec6ee4388c650e09850c3f35f8..b25f5931f836fd4d8695120f0bcb7c52deff8583 100644
index 22847ea7063a660934515a1108e66f9265f1685f..5ce1c779addafad90d54f2dc76578ec6df5af071 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -503,6 +503,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Temp: Pre-init PlayerChunkLoaderData in order to prepopulate
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 2b27feda982ca55257b55c801ec772a18157bd01..7c29d92362a82330440dff151bcf421f15c68f71 100644
index 6f816ec287f35dca6e196f86d016a2c28617bab6..e7746952417a3ca4ea97103e38568db42039f717 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -367,6 +367,7 @@ public class Main {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix incorrect crafting result amount for fireworks
Although vanilla does not specifically call this method anywhere, this fixes a bug where the result using the Bukkit API returns the wrong amount.
diff --git a/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java b/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
index 5296f47a7e344ac59664a48e8ce91240393c7e12..b611ce69defe0dfa69c43f138b20d107c3f46c05 100644
index af7e7a63eacad2367453924806ffb002c33db951..25405c8eb76e428e689b3afad2c00529f687f550 100644
--- a/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
+++ b/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
@@ -82,7 +82,7 @@ public class FireworkRocketRecipe extends CustomRecipe {
@@ -81,7 +81,7 @@ public class FireworkRocketRecipe extends CustomRecipe {
@Override
public ItemStack getResultItem(RegistryAccess registryManager) {

Datei anzeigen

@ -10,10 +10,10 @@ The underlying issue of this is that the client modifies their synced data value
them in order for the client to reset their using item state.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 34ecfb89372f459117db99d57a7edd6f681bbe8a..baf3e79489e310f443788bc917c553ae7ea86c89 100644
index 482e6b217c073ceff30c238c3a8cd8ea526bb07c..034960c1d321e159b3881a900f823ba546cff7ff 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -562,6 +562,7 @@ public class ServerPlayerGameMode {
@@ -560,6 +560,7 @@ public class ServerPlayerGameMode {
}
// Paper end - extend Player Interact cancellation
player.getBukkitEntity().updateInventory(); // SPIGOT-2867
@ -21,7 +21,7 @@ index 34ecfb89372f459117db99d57a7edd6f681bbe8a..baf3e79489e310f443788bc917c553ae
enuminteractionresult = (event.useItemInHand() != Event.Result.ALLOW) ? InteractionResult.SUCCESS : InteractionResult.PASS;
} else if (this.gameModeForPlayer == GameType.SPECTATOR) {
MenuProvider itileinventory = iblockdata.getMenuProvider(world, blockposition);
@@ -605,6 +606,11 @@ public class ServerPlayerGameMode {
@@ -603,6 +604,11 @@ public class ServerPlayerGameMode {
return enuminteractionresult1;
}
@ -34,10 +34,10 @@ index 34ecfb89372f459117db99d57a7edd6f681bbe8a..baf3e79489e310f443788bc917c553ae
return enuminteractionresult;
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f6ba77a7c43a6a030fe4073ba7ee2970e7d774f3..c80aaaea583f87143dab2a4d314b8b3f83d8bbf6 100644
index d3b6d1ea60017b40f0ed5a158518d53ca37294a6..8310735de62b738b5c6d9d48df0cfe3c5bd51295 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2031,6 +2031,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1909,6 +1909,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
if (cancelled) {
@ -46,10 +46,10 @@ index f6ba77a7c43a6a030fe4073ba7ee2970e7d774f3..c80aaaea583f87143dab2a4d314b8b3f
return;
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index cf3173c3b3d3362040eb57ee39221e24a5bc5221..78c98f38bc263664ea4cd344670243a7d372885c 100644
index e20793aedc099857d82dac394e9ef23b14ccc33f..641d4bb568784087426a5e28f96e16858ccb1074 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3748,6 +3748,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3807,6 +3807,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND;
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add event for player editing sign
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 2223aba0841280c5205ab0963c406449f85fa433..879cc823d56625867eb73bb621db6a13f40ad81c 100644
index fcd53d9c7a0a71624e68eb47e947fa783df4829f..7bb47643e748f57a51c613d0a2ee8d05e1fe1798 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -497,7 +497,7 @@ public final class ItemStack {
@@ -502,7 +502,7 @@ public final class ItemStack {
try {
if (world.getBlockEntity(SignItem.openSign) instanceof SignBlockEntity tileentitysign) {
if (world.getBlockState(SignItem.openSign).getBlock() instanceof SignBlock blocksign) {
@ -18,7 +18,7 @@ index 2223aba0841280c5205ab0963c406449f85fa433..879cc823d56625867eb73bb621db6a13
}
} finally {
diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java
index 1733744691e843891fc22991f8da57877a1b14f3..b01cdfe3c62c609e953aa5007e6557cfec0d5a5f 100644
index 1a1f57cad2eeb5fa1d57e6a07e201ee77065ec90..0c1c6fbcf625da4a28514e0d040deb6c98ba9507 100644
--- a/src/main/java/net/minecraft/world/level/block/SignBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java
@@ -115,7 +115,7 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
@ -27,10 +27,10 @@ index 1733744691e843891fc22991f8da57877a1b14f3..b01cdfe3c62c609e953aa5007e6557cf
} else if (!this.otherPlayerIsEditingSign(player, tileentitysign) && player.mayBuild() && this.hasEditableText(player, tileentitysign, flag1)) {
- this.openTextEdit(player, tileentitysign, flag1, org.bukkit.event.player.PlayerSignOpenEvent.Cause.INTERACT); // CraftBukkit
+ this.openTextEdit(player, tileentitysign, flag1, io.papermc.paper.event.player.PlayerOpenSignEvent.Cause.INTERACT); // Paper
return InteractionResult.SUCCESS;
return this.getInteractionResult(flag);
} else {
return InteractionResult.PASS;
@@ -163,16 +163,33 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
@@ -167,16 +167,33 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
return blockpropertywood;
}
@ -38,12 +38,13 @@ index 1733744691e843891fc22991f8da57877a1b14f3..b01cdfe3c62c609e953aa5007e6557cf
public void openTextEdit(Player player, SignBlockEntity blockEntity, boolean front) {
- // Craftbukkit start
- this.openTextEdit(player, blockEntity, front, org.bukkit.event.player.PlayerSignOpenEvent.Cause.UNKNOWN);
+ // Paper start - PlayerOpenSignEvent
+ this.openTextEdit(player, blockEntity, front, io.papermc.paper.event.player.PlayerOpenSignEvent.Cause.UNKNOWN);
}
- }
-
- public void openTextEdit(Player entityhuman, SignBlockEntity tileentitysign, boolean flag, org.bukkit.event.player.PlayerSignOpenEvent.Cause cause) {
- if (!org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerSignOpenEvent(entityhuman, tileentitysign, flag, cause)) {
+ // Paper start - PlayerOpenSignEvent
+ this.openTextEdit(player, blockEntity, front, io.papermc.paper.event.player.PlayerOpenSignEvent.Cause.UNKNOWN);
+ }
+ public void openTextEdit(Player entityhuman, SignBlockEntity tileentitysign, boolean flag, io.papermc.paper.event.player.PlayerOpenSignEvent.Cause cause) {
+ org.bukkit.entity.Player bukkitPlayer = (org.bukkit.entity.Player) entityhuman.getBukkitEntity();
+ org.bukkit.block.Block bukkitBlock = org.bukkit.craftbukkit.block.CraftBlock.at(tileentitysign.getLevel(), tileentitysign.getBlockPos());

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Only tick item frames if players can see it
In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up.
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index fe7aff356a9e7b4f41c3d5cb3bd5afbb0646c16a..d934d07ad761319f338d4386536f68fde211c041 100644
index e7df888c8fa3cde13d727b3bd6b4d66aabea4527..e2795f6ee05141374736dd5821e23431b26c6162 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -108,7 +108,7 @@ public class ServerEntity {
@@ -111,7 +111,7 @@ public class ServerEntity {
Entity entity = this.entity;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Improve command function perm level checks
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
index 43c71d9bf2eac98023057b4483fdd143a8343e98..0de2eae2d448ac9e269a4edf48406d5ea8af8059 100644
index 0112035219b21550ca14fa1755c43a5547ca4136..56ae02aab93b9a698e9d2f07a0448aa4767169d9 100644
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
@@ -216,8 +216,14 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
@@ -212,8 +212,14 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
// CraftBukkit start
public boolean hasPermission(int i, String bukkitPermission) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Call missing BlockDispenseEvent
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index b4f5dbe9022dd20437c15c4f6fbe2ac06dacbadb..70aade6a8d36f8376cc567800258ea6fabb0607f 100644
index c0baec6ae9bd90410f47aa04d7c7704233375d1a..e9b748a81ec223a701b56d2dc890c9eb223d8474 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -1105,6 +1105,13 @@ public interface DispenseItemBehavior {
@@ -1106,6 +1106,13 @@ public interface DispenseItemBehavior {
this.setSuccess(true);
if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) {
if ((Integer) iblockdata.getValue(RespawnAnchorBlock.CHARGE) != 4) {
@ -22,7 +22,7 @@ index b4f5dbe9022dd20437c15c4f6fbe2ac06dacbadb..70aade6a8d36f8376cc567800258ea6f
RespawnAnchorBlock.charge((Entity) null, worldserver, blockposition, iblockdata);
stack.shrink(1);
} else {
@@ -1127,6 +1134,13 @@ public interface DispenseItemBehavior {
@@ -1128,6 +1135,13 @@ public interface DispenseItemBehavior {
Optional<BlockState> optional = HoneycombItem.getWaxed(iblockdata);
if (optional.isPresent()) {
@ -36,7 +36,7 @@ index b4f5dbe9022dd20437c15c4f6fbe2ac06dacbadb..70aade6a8d36f8376cc567800258ea6f
worldserver.setBlockAndUpdate(blockposition, (BlockState) optional.get());
worldserver.levelEvent(3003, blockposition, 0);
stack.shrink(1);
@@ -1152,6 +1166,12 @@ public interface DispenseItemBehavior {
@@ -1153,6 +1167,12 @@ public interface DispenseItemBehavior {
if (!worldserver.getBlockState(blockposition1).is(BlockTags.CONVERTABLE_TO_MUD)) {
return this.defaultDispenseItemBehavior.dispense(pointer, stack);
} else {
@ -50,10 +50,10 @@ index b4f5dbe9022dd20437c15c4f6fbe2ac06dacbadb..70aade6a8d36f8376cc567800258ea6f
for (int k = 0; k < 5; ++k) {
worldserver.sendParticles(ParticleTypes.SPLASH, (double) blockposition.getX() + worldserver.random.nextDouble(), (double) (blockposition.getY() + 1), (double) blockposition.getZ() + worldserver.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 36027749504b239285c57630c0500dfb5a6126ef..c514795dee0c54ae4fc1592dab5b69c39631c9ad 100644
index 4798ece84ad42cce048811a6b1dc9bb779f73945..921e69bddd5b09a90d83a85e530f5f6f45f3ef5f 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2053,6 +2053,32 @@ public class CraftEventFactory {
@@ -2055,6 +2055,32 @@ public class CraftEventFactory {
}
// Paper end

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Don't load chunks for supporting block checks
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e19010627a030753b08aa8451363c6bc4631bf72..0ed297f189e5d21c497ac78294db6ca664c0f2c4 100644
index 567d2a315503280f90497f2728b2ee220403cbad..4f2fa0a5b809f6ec55d00a466dced9a5b0713c38 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1368,7 +1368,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1230,7 +1230,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
protected BlockPos getOnPos(float offset) {

Datei anzeigen

@ -7,10 +7,10 @@ For larger ranges, it's better to iterate over the player list
than the entity slices.
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index c343ae1999672be8be0c982df2fadca8d05ebfa4..5c951ef93fe4cf4f085df86b0cefc02bc2610ab9 100644
index 2f12a1054c9c9e311e02dc5c3244ad3688db15ba..45e3a4f09a0e515932d08f52e7d07cf8f6014fb6 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -320,7 +320,16 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
@@ -329,7 +329,16 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
double d0 = blockEntity != null ? blockEntity.getEffectRange() : (i * 10 + 10);// Paper - custom beacon ranges
AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D);

Datei anzeigen

@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Thu, 16 Mar 2023 16:27:50 +0100
Subject: [PATCH] Fix text display error on spawn
diff --git a/src/main/java/net/minecraft/world/entity/Display.java b/src/main/java/net/minecraft/world/entity/Display.java
index f7eeccbcb4c119f46ebb82284a109f48008c68cd..2a5a4027e5d0d9d48a727834f3f5af65ea83aa23 100644
--- a/src/main/java/net/minecraft/world/entity/Display.java
+++ b/src/main/java/net/minecraft/world/entity/Display.java
@@ -694,7 +694,7 @@ public abstract class Display extends Entity {
Logger logger = Display.LOGGER;
Objects.requireNonNull(logger);
- Optional<Display.TextDisplay.Align> optional = dataresult.resultOrPartial(Util.prefix("Display entity", logger::error)).map(Pair::getFirst);
+ Optional<Display.TextDisplay.Align> optional = dataresult.result().map(Pair::getFirst); // Paper - hide error message
if (optional.isPresent()) {
byte b1;

Datei anzeigen

@ -1,25 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 3 Apr 2023 21:14:19 -0700
Subject: [PATCH] Fix destroying beehive without any players nearby throwing an
exception
If the player moves out of range by the time the block is destroyed,
then the exception would throw and remove the player from the world
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 01c8394c6e6b65f40db04280458d0191c116b845..8b715a750a0406d1d7b25c2f023dc2fb4d8b70fa 100644
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
@@ -98,6 +98,11 @@ public class BeehiveBlock extends BaseEntityBlock {
if (!list.isEmpty()) {
List<Player> list1 = world.getEntitiesOfClass(Player.class, (new AABB(pos)).inflate(8.0D, 6.0D, 8.0D));
+ // Paper start - if there are no players nearby, then nextInt() will throw
+ if (list1.isEmpty()) {
+ return;
+ }
+ // Paper end - if there are no players nearby, then nextInt() will throw
int i = list1.size();
Iterator iterator = list.iterator();