mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
Patching patched patched patches
This commit is contained in:
parent
7f3d2ff503
commit
d0620624d7
@ -100,10 +100,10 @@ index 0000000000000000000000000000000000000000..07cd02c6f9df00844b808218be2afd79
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/ChatDecorationProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatDecorationProcessor.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..87e791801b624859477025df49824637eb347dec
|
||||
index 0000000000000000000000000000000000000000..a9c2b67cab07b3a4e996159176919c7695f62951
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/ChatDecorationProcessor.java
|
||||
@@ -0,0 +1,141 @@
|
||||
@@ -0,0 +1,140 @@
|
||||
+package io.papermc.paper.adventure;
|
||||
+
|
||||
+import io.papermc.paper.event.player.AsyncChatCommandDecorateEvent;
|
||||
@ -146,14 +146,12 @@ index 0000000000000000000000000000000000000000..87e791801b624859477025df49824637
|
||||
+ final @Nullable ServerPlayer player;
|
||||
+ final @Nullable CommandSourceStack commandSourceStack;
|
||||
+ final Component originalMessage;
|
||||
+ final boolean isPreview;
|
||||
+
|
||||
+ public ChatDecorationProcessor(final MinecraftServer server, final @Nullable ServerPlayer player, final @Nullable CommandSourceStack commandSourceStack, final net.minecraft.network.chat.Component originalMessage, final boolean isPreview) {
|
||||
+ public ChatDecorationProcessor(final MinecraftServer server, final @Nullable ServerPlayer player, final @Nullable CommandSourceStack commandSourceStack, final net.minecraft.network.chat.Component originalMessage) {
|
||||
+ this.server = server;
|
||||
+ this.player = player;
|
||||
+ this.commandSourceStack = commandSourceStack;
|
||||
+ this.originalMessage = PaperAdventure.asAdventure(originalMessage);
|
||||
+ this.isPreview = isPreview;
|
||||
+ }
|
||||
+
|
||||
+ public CompletableFuture<ChatDecorator.Result> process() {
|
||||
@ -190,11 +188,12 @@ index 0000000000000000000000000000000000000000..87e791801b624859477025df49824637
|
||||
+
|
||||
+ final Component initialResult = input.message().component();
|
||||
+ final AsyncChatDecorateEvent event;
|
||||
+ //TODO
|
||||
+ if (this.commandSourceStack != null) {
|
||||
+ // TODO more command decorate context
|
||||
+ event = new AsyncChatCommandDecorateEvent(true, player, this.originalMessage, this.isPreview, initialResult);
|
||||
+ event = new AsyncChatCommandDecorateEvent(true, player, this.originalMessage, false, initialResult);
|
||||
+ } else {
|
||||
+ event = new AsyncChatDecorateEvent(true, player, this.originalMessage, this.isPreview, initialResult);
|
||||
+ event = new AsyncChatDecorateEvent(true, player, this.originalMessage, false, initialResult);
|
||||
+ }
|
||||
+ this.post(event);
|
||||
+ if (!event.isCancelled() && !event.result().equals(initialResult)) {
|
||||
@ -1845,7 +1844,7 @@ index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490
|
||||
buf.writeComponent(this.footer);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0f7dd33d51281b383be0fb47d4e6b133f123ce1f..fce3826745cf753247e0a7df02f3c73cf49dac06 100644
|
||||
index 0f7dd33d51281b383be0fb47d4e6b133f123ce1f..011c3d2dbd34dd0c2afba477202c937c654d42a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -241,6 +241,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -1902,8 +1901,8 @@ index 0f7dd33d51281b383be0fb47d4e6b133f123ce1f..fce3826745cf753247e0a7df02f3c73c
|
||||
- }, chatExecutor);
|
||||
- };
|
||||
+ // Paper start - moved to ChatPreviewProcessor
|
||||
+ return ChatDecorator.create((sender, commandSourceStack, message, isPreview) -> {
|
||||
+ final io.papermc.paper.adventure.ChatDecorationProcessor processor = new io.papermc.paper.adventure.ChatDecorationProcessor(this, sender, commandSourceStack, message, isPreview);
|
||||
+ return ChatDecorator.create((sender, commandSourceStack, message) -> {
|
||||
+ final io.papermc.paper.adventure.ChatDecorationProcessor processor = new io.papermc.paper.adventure.ChatDecorationProcessor(this, sender, commandSourceStack, message);
|
||||
+ return processor.process();
|
||||
+ });
|
||||
+ // Paper end
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 84bcabdd92cefe16f7bf5270e1d2989dd7d010d7..90992b652941365a46f9e01985365447ba2ff461 100644
|
||||
index 300658b41ed77c5f9403c260b6cdc62f3a323a35..21b5f0742f16409ace4fabf44f04d5964d486aeb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -622,7 +622,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -644,7 +644,7 @@ public class ServerPlayer extends Player {
|
||||
containerUpdateDelay = level.paperConfig().tickRates.containerUpdate;
|
||||
}
|
||||
// Paper end
|
||||
@ -17,7 +17,7 @@ index 84bcabdd92cefe16f7bf5270e1d2989dd7d010d7..90992b652941365a46f9e01985365447
|
||||
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
@@ -1500,7 +1500,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1522,7 +1522,7 @@ public class ServerPlayer extends Player {
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
this.containerMenu = container;
|
@ -0,0 +1,43 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Wed, 15 Apr 2020 17:56:07 -0700
|
||||
Subject: [PATCH] Don't run entity collision code if not needed
|
||||
|
||||
Will not run if:
|
||||
Max entity cramming is disabled and the max collisions per entity is less than or equal to 0.
|
||||
Entity#isPushable() returns false, meaning all entities will not be able to collide with this
|
||||
entity anyways.
|
||||
The entity's current team collision rule causes them to NEVER collide.
|
||||
|
||||
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 37b1354edb2974e82eaa5c859f58c588df70c575..c5a11e22c44d5adb55844bde964ca43acbc03fdf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3364,10 +3364,24 @@ public abstract class LivingEntity extends Entity {
|
||||
if (this.level.isClientSide()) {
|
||||
this.level.getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
|
||||
} else {
|
||||
+ // Paper start - don't run getEntities if we're not going to use its result
|
||||
+ if (!this.isPushable()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ net.minecraft.world.scores.Team team = this.getTeam();
|
||||
+ if (team != null && team.getCollisionRule() == net.minecraft.world.scores.Team.CollisionRule.NEVER) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING);
|
||||
+ if (i <= 0 && level.paperConfig().collisions.maxEntityCollisions <= 0) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - don't run getEntities if we're not going to use its result
|
||||
List<Entity> list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this));
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
- int i = this.level.getGameRules().getInt(GameRules.RULE_MAX_ENTITY_CRAMMING);
|
||||
+ // Paper - moved up
|
||||
int j;
|
||||
|
||||
if (i > 0 && list.size() > i - 1 && this.random.nextInt(4) == 0) {
|
@ -87,10 +87,10 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 90992b652941365a46f9e01985365447ba2ff461..fd2bc49f713cccdcb2a3e49db52f56374690c5de 100644
|
||||
index 21b5f0742f16409ace4fabf44f04d5964d486aeb..9ec157712b9c891067507f9a308428cee2895fed 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1861,9 +1861,24 @@ public class ServerPlayer extends Player {
|
||||
@@ -1885,9 +1885,24 @@ public class ServerPlayer extends Player {
|
||||
return s;
|
||||
}
|
||||
|
||||
@ -116,10 +116,10 @@ index 90992b652941365a46f9e01985365447ba2ff461..fd2bc49f713cccdcb2a3e49db52f5637
|
||||
if (getMainArm() != packet.mainHand()) {
|
||||
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index cdc4ef88c8369b3bd1c607ff5301fc1b04ec4582..a9ec1f77b7b9e60d735c72a01f0bce32d3083cb9 100644
|
||||
index b9e484ec8173be94fae307830e87a9205e56a11e..d9e278d2f7f4bc767c0211736817748d4ca6dae0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -615,6 +615,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -617,6 +617,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
|
||||
}
|
||||
}
|
@ -31,10 +31,10 @@ delays anymore.
|
||||
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 9fbdb834559df0da45ea4a61eb3963fa8e371af3..1bf18259505997c39e7880abf49e583cc763beb1 100644
|
||||
index e8a52daa2ff7782fa39862e97580234058b8766e..6b01d5b5535887eef0ac7b8a5e0a669a2700e83f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1024,6 +1024,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1036,6 +1036,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
+ ": " + entity + (this.entityMap.containsKey(entity.getId()) ? " ALREADY CONTAINED (This would have crashed your server)" : ""), new Throwable());
|
||||
return;
|
||||
}
|
||||
@ -43,10 +43,10 @@ index 9fbdb834559df0da45ea4a61eb3963fa8e371af3..1bf18259505997c39e7880abf49e583c
|
||||
if (!(entity instanceof EnderDragonPart)) {
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index fd2bc49f713cccdcb2a3e49db52f56374690c5de..8660fc4bc748131d9bc3088afb5bb9af073300f8 100644
|
||||
index 9ec157712b9c891067507f9a308428cee2895fed..ecaf03a72caac6e7866094bae7256f5447a962e4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -254,6 +254,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -259,6 +259,7 @@ public class ServerPlayer extends Player {
|
||||
public double maxHealthCache;
|
||||
public boolean joining = true;
|
||||
public boolean sentListPacket = false;
|
||||
@ -55,12 +55,12 @@ index fd2bc49f713cccdcb2a3e49db52f56374690c5de..8660fc4bc748131d9bc3088afb5bb9af
|
||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 89d45ae9b2856aaed265d7333ba2e69a3836bb2e..6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5 100644
|
||||
index 6c5c00e2fb29b5bdd73540badd159778eb1c1ff6..cfc497822e4e1dfc21807ec93bcfabb215cdbb95 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -282,6 +282,12 @@ public abstract class PlayerList {
|
||||
@@ -291,6 +291,12 @@ public abstract class PlayerList {
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
// this.broadcastAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
|
||||
|
||||
+ // Paper start - correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks
|
||||
+ player.supressTrackerForLogin = true;
|
||||
@ -71,16 +71,16 @@ index 89d45ae9b2856aaed265d7333ba2e69a3836bb2e..6cc70d6eb84fb819fb7f1b8b1ef1bbb4
|
||||
// CraftBukkit start
|
||||
CraftPlayer bukkitPlayer = player.getBukkitEntity();
|
||||
|
||||
@@ -320,6 +326,8 @@ public abstract class PlayerList {
|
||||
player.connection.send(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.ADD_PLAYER, new ServerPlayer[]{entityplayer1}));
|
||||
@@ -329,6 +335,8 @@ public abstract class PlayerList {
|
||||
player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
|
||||
}
|
||||
player.sentListPacket = true;
|
||||
+ player.supressTrackerForLogin = false; // Paper
|
||||
+ ((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now
|
||||
// CraftBukkit end
|
||||
|
||||
player.connection.send(new ClientboundSetEntityDataPacket(player.getId(), player.getEntityData(), true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
|
||||
@@ -345,6 +353,11 @@ public abstract class PlayerList {
|
||||
player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
|
||||
@@ -353,6 +361,11 @@ public abstract class PlayerList {
|
||||
playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect));
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ index 89d45ae9b2856aaed265d7333ba2e69a3836bb2e..6cc70d6eb84fb819fb7f1b8b1ef1bbb4
|
||||
if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) {
|
||||
CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle");
|
||||
// CraftBukkit start
|
||||
@@ -393,6 +406,10 @@ public abstract class PlayerList {
|
||||
@@ -401,6 +414,10 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ index 89d45ae9b2856aaed265d7333ba2e69a3836bb2e..6cc70d6eb84fb819fb7f1b8b1ef1bbb4
|
||||
player.initInventoryMenu();
|
||||
// CraftBukkit - Moved from above, added world
|
||||
// Paper start - Add to collideRule team if needed
|
||||
@@ -402,6 +419,7 @@ public abstract class PlayerList {
|
||||
@@ -410,6 +427,7 @@ public abstract class PlayerList {
|
||||
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
||||
}
|
||||
// Paper end
|
@ -5,10 +5,10 @@ Subject: [PATCH] Load Chunks for Login Asynchronously
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index ceab806cf008f8c9306283c86a92164176f8f1c5..d18337c4c123819e4d5f55b65985e548da492627 100644
|
||||
index 8646b9b07bc61ec1ee11b4053c67119c8ae20459..3bd645d9f642e6484d8ac8f02872873bc306e3de 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -170,6 +170,7 @@ import org.bukkit.event.world.GenericGameEvent;
|
||||
@@ -173,6 +173,7 @@ import org.bukkit.event.world.GenericGameEvent;
|
||||
import org.bukkit.event.world.TimeSkipEvent;
|
||||
// CraftBukkit end
|
||||
import it.unimi.dsi.fastutil.ints.IntArrayList; // Paper
|
||||
@ -16,7 +16,7 @@ index ceab806cf008f8c9306283c86a92164176f8f1c5..d18337c4c123819e4d5f55b65985e548
|
||||
|
||||
public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@@ -436,6 +437,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -439,6 +440,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return player != null && player.level == this ? player : null;
|
||||
}
|
||||
// Paper end
|
||||
@ -25,10 +25,10 @@ index ceab806cf008f8c9306283c86a92164176f8f1c5..d18337c4c123819e4d5f55b65985e548
|
||||
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 8660fc4bc748131d9bc3088afb5bb9af073300f8..7ad1d2cd3b2d4b1f9b21f0de5ddbf2626aea0310 100644
|
||||
index ecaf03a72caac6e7866094bae7256f5447a962e4..55705fca6dba1bebe0cb444a68c130f8f2785ae3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -182,6 +182,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -184,6 +184,7 @@ public class ServerPlayer extends Player {
|
||||
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;
|
||||
@ -36,7 +36,7 @@ index 8660fc4bc748131d9bc3088afb5bb9af073300f8..7ad1d2cd3b2d4b1f9b21f0de5ddbf262
|
||||
public final MinecraftServer server;
|
||||
public final ServerPlayerGameMode gameMode;
|
||||
private final PlayerAdvancements advancements;
|
||||
@@ -255,6 +256,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -260,6 +261,7 @@ public class ServerPlayer extends Player {
|
||||
public boolean joining = true;
|
||||
public boolean sentListPacket = false;
|
||||
public boolean supressTrackerForLogin = false; // Paper
|
||||
@ -57,10 +57,10 @@ index 97d1ff2af23bac14e67bca5896843325aaa5bfc1..e9bc61590d33dc341074371859ceec54
|
||||
public static final TicketType<ChunkPos> UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1);
|
||||
public static final TicketType<Unit> PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c40da6e0f5da3a6663aba74720c530713b94650b..2a75c77ac51b620098f5cc49a8a6bebafdfc06a1 100644
|
||||
index c6ad5963540b5f51776ba52eefdf7d5be3475906..a4a2e560304def17ab0943a2d876f6e8e521809b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -346,6 +346,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -339,6 +339,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -71,7 +71,7 @@ index c40da6e0f5da3a6663aba74720c530713b94650b..2a75c77ac51b620098f5cc49a8a6beba
|
||||
if (this.ackBlockChangesUpTo > -1) {
|
||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||
this.ackBlockChangesUpTo = -1;
|
||||
@@ -392,7 +396,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -385,7 +389,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.lastVehicle = null;
|
||||
this.clientVehicleIsFloating = false;
|
||||
this.aboveGroundVehicleTickCount = 0;
|
||||
@ -81,10 +81,10 @@ index c40da6e0f5da3a6663aba74720c530713b94650b..2a75c77ac51b620098f5cc49a8a6beba
|
||||
this.server.getProfiler().push("keepAlive");
|
||||
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 3a20c6e2214ad075e4cdd3fbdf0b59e1891b0f2b..42cdb2c70f6b906d27c4b1409df92f7459bf2c1b 100644
|
||||
index 203786383387765d1f5a2d2ccce79d792fd5b187..82f2872cf32638a0df82fe751af4b634d8691c9c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -89,7 +89,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -84,7 +84,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
}
|
||||
// Paper end
|
||||
} else if (this.state == ServerLoginPacketListenerImpl.State.DELAY_ACCEPT) {
|
||||
@ -93,7 +93,7 @@ index 3a20c6e2214ad075e4cdd3fbdf0b59e1891b0f2b..42cdb2c70f6b906d27c4b1409df92f74
|
||||
|
||||
if (entityplayer == null) {
|
||||
this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
|
||||
@@ -188,7 +188,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -169,7 +169,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
}
|
||||
|
||||
this.connection.send(new ClientboundGameProfilePacket(this.gameProfile));
|
||||
@ -103,10 +103,10 @@ index 3a20c6e2214ad075e4cdd3fbdf0b59e1891b0f2b..42cdb2c70f6b906d27c4b1409df92f74
|
||||
try {
|
||||
ServerPlayer entityplayer1 = this.server.getPlayerList().getPlayerForLogin(this.gameProfile, s); // CraftBukkit - add player reference
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe9917592384984e 100644
|
||||
index cfc497822e4e1dfc21807ec93bcfabb215cdbb95..2c0e45b3d0f5a1178ccecc851a110e5dc6f2023c 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -139,6 +139,7 @@ public abstract class PlayerList {
|
||||
@@ -143,6 +143,7 @@ public abstract class PlayerList {
|
||||
private final IpBanList ipBans;
|
||||
private final ServerOpList ops;
|
||||
private final UserWhiteList whitelist;
|
||||
@ -114,7 +114,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
// CraftBukkit start
|
||||
// private final Map<UUID, ServerStatisticManager> stats;
|
||||
// private final Map<UUID, AdvancementDataPlayer> advancements;
|
||||
@@ -180,6 +181,13 @@ public abstract class PlayerList {
|
||||
@@ -186,6 +187,13 @@ public abstract class PlayerList {
|
||||
public void placeNewPlayer(Connection connection, ServerPlayer player) {
|
||||
player.isRealPlayer = true; // Paper
|
||||
player.loginTime = System.currentTimeMillis(); // Paper
|
||||
@ -128,7 +128,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
GameProfile gameprofile = player.getGameProfile();
|
||||
GameProfileCache usercache = this.server.getProfileCache();
|
||||
Optional<GameProfile> optional = usercache.get(gameprofile.getId());
|
||||
@@ -192,7 +200,7 @@ public abstract class PlayerList {
|
||||
@@ -198,7 +206,7 @@ public abstract class PlayerList {
|
||||
if (nbttagcompound != null && nbttagcompound.contains("bukkit")) {
|
||||
CompoundTag bukkit = nbttagcompound.getCompound("bukkit");
|
||||
s = bukkit.contains("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s;
|
||||
@ -137,7 +137,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
// CraftBukkit end
|
||||
|
||||
if (nbttagcompound != null) {
|
||||
@@ -219,11 +227,15 @@ public abstract class PlayerList {
|
||||
@@ -225,11 +233,15 @@ public abstract class PlayerList {
|
||||
if (nbttagcompound == null) player.fudgeSpawnLocation(worldserver1); // Paper - only move to spawn on first login, otherwise, stay where you are....
|
||||
|
||||
player.setLevel(worldserver1);
|
||||
@ -154,7 +154,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
|
||||
// Spigot start - spawn location event
|
||||
Player spawnPlayer = player.getBukkitEntity();
|
||||
@@ -265,6 +277,56 @@ public abstract class PlayerList {
|
||||
@@ -272,6 +284,56 @@ public abstract class PlayerList {
|
||||
player.getRecipeBook().sendInitialRecipeBook(player);
|
||||
this.updateEntireScoreboard(worldserver1.getScoreboard(), player);
|
||||
this.server.invalidateStatus();
|
||||
@ -211,7 +211,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
MutableComponent ichatmutablecomponent;
|
||||
|
||||
if (player.getGameProfile().getName().equalsIgnoreCase(s)) {
|
||||
@@ -506,6 +568,7 @@ public abstract class PlayerList {
|
||||
@@ -514,6 +576,7 @@ public abstract class PlayerList {
|
||||
|
||||
protected void save(ServerPlayer player) {
|
||||
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
|
||||
@ -219,7 +219,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
this.playerIo.save(player);
|
||||
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
|
||||
|
||||
@@ -533,7 +596,7 @@ public abstract class PlayerList {
|
||||
@@ -541,7 +604,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName())));
|
||||
@ -228,7 +228,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||
|
||||
if (server.isSameThread()) entityplayer.doTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog)
|
||||
@@ -578,6 +641,13 @@ public abstract class PlayerList {
|
||||
@@ -586,6 +649,13 @@ public abstract class PlayerList {
|
||||
// this.advancements.remove(uuid);
|
||||
// CraftBukkit end
|
||||
}
|
||||
@ -241,8 +241,8 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
+ // Paper end
|
||||
|
||||
// CraftBukkit start
|
||||
// this.broadcastAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer}));
|
||||
@@ -595,7 +665,7 @@ public abstract class PlayerList {
|
||||
// this.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(entityplayer.getUUID())));
|
||||
@@ -603,7 +673,7 @@ public abstract class PlayerList {
|
||||
this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
|
||||
// CraftBukkit end
|
||||
|
||||
@ -251,7 +251,7 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
}
|
||||
|
||||
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
|
||||
@@ -614,6 +684,13 @@ public abstract class PlayerList {
|
||||
@@ -622,6 +692,13 @@ public abstract class PlayerList {
|
||||
list.add(entityplayer);
|
||||
}
|
||||
}
|
||||
@ -266,10 +266,10 @@ index 6cc70d6eb84fb819fb7f1b8b1ef1bbb4715315e5..1ec5facab133f265b280738afe991759
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a2750cba8540caa9f12f5d5179b51f7753d38bba..e5c5a514e6b7bdf663d33074557e34372f18ea77 100644
|
||||
index 026a9decf87965ebe3c45df7e129cf6758364e5a..e28b973efe4f107d0a0d18dd2492f03ce2b424e9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1219,7 +1219,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1243,7 +1243,7 @@ public final class CraftServer implements Server {
|
||||
return false;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ The code following this has better support for null worlds to move
|
||||
them back to the world spawn.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5de420c0a2f0881abb03c16b2621d081ef7ad4fd..58a8bbda3ddff1ed561d9035d45176c6ca689115 100644
|
||||
index fada693b270d0954f6bbc5965fb3af82a8bd524e..0a07a99e67e087db87c493d7c2b8b0c94d5b3771 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2162,9 +2162,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2177,9 +2177,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
bworld = server.getWorld(worldName);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 67c3e02bf4ee61237a7d0ea72e7bb0260af159e9..df3aad08242b40fca5be719ae9fb13bc1c2e8091 100644
|
||||
index c5a11e22c44d5adb55844bde964ca43acbc03fdf..632119d31b2c2821ef4871abf4fd6916668b0de7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2115,7 +2115,16 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2128,7 +2128,16 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
|
||||
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads
|
||||
Caused a deadlock
|
||||
|
||||
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 69903bad7b3e143b73b20624c06909458564396c..8d79612cdba48756bb0352c41b98f8a9ea489ff6 100644
|
||||
index 7e48326b6dc847a84e0aff2d393cadf9bace7979..68be050e5187d372a65290c01c69f3582053f7a1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -100,6 +100,7 @@ public class FireBlock extends BaseFireBlock {
|
@ -29,7 +29,7 @@ index 0e96e9d7e4d636f4222f60cec556663f506c3906..5432b3eff8ac09e45c7e118ddc1bc530
|
||||
return true;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index 0dbb0c4d038379c6ffdae8528d98431e98faeb93..2093d08bccbfbe096ea24cc4f70cbfdfa07d6a56 100644
|
||||
index 900a66fc7eb817509df904b71ccc3bd3976f3b35..24fa62da17ad6c84d45c6fb726305a87df85d2aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -51,7 +51,7 @@ public class PhantomSpawner implements CustomSpawner {
|
@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
|
||||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f55f056dea 100644
|
||||
index 0a07a99e67e087db87c493d7c2b8b0c94d5b3771..19218e993052d44a830f825f9a0eb695635861c1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2292,11 +2292,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2307,11 +2307,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
// CraftBukkit start - Capture drops for death event
|
||||
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
|
||||
@ -34,7 +34,7 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
// CraftBukkit start
|
||||
@@ -3060,6 +3061,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3086,6 +3087,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@Nullable
|
||||
public Entity teleportTo(ServerLevel worldserver, PositionImpl location) {
|
||||
// CraftBukkit end
|
||||
@ -47,7 +47,7 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5
|
||||
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
||||
this.level.getProfiler().push("changeDimension");
|
||||
// CraftBukkit start
|
||||
@@ -3086,6 +3093,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3112,6 +3119,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit end
|
||||
|
||||
this.level.getProfiler().popPush("reloading");
|
||||
@ -59,7 +59,7 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5
|
||||
Entity entity = this.getType().create(worldserver);
|
||||
|
||||
if (entity != null) {
|
||||
@@ -3099,10 +3111,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3125,10 +3137,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||
this.getBukkitEntity().setHandle(entity);
|
||||
entity.bukkitEntity = this.getBukkitEntity();
|
||||
@ -70,7 +70,7 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -3223,7 +3231,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3249,7 +3257,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public boolean canChangeDimensions() {
|
||||
@ -80,10 +80,10 @@ index 58a8bbda3ddff1ed561d9035d45176c6ca689115..32623f90a5bc4fb6fe99897c682ef4f5
|
||||
|
||||
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index df3aad08242b40fca5be719ae9fb13bc1c2e8091..a337ce97a31998a63e7c329ac94cad9a5f783a5c 100644
|
||||
index 632119d31b2c2821ef4871abf4fd6916668b0de7..b6741c72216378368392e65aad3ff75a3191d0ce 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1646,9 +1646,9 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1647,9 +1647,9 @@ public abstract class LivingEntity extends Entity {
|
||||
// Paper start
|
||||
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource);
|
||||
if (deathEvent == null || !deathEvent.isCancelled()) {
|
||||
@ -96,7 +96,7 @@ index df3aad08242b40fca5be719ae9fb13bc1c2e8091..a337ce97a31998a63e7c329ac94cad9a
|
||||
// Paper start - clear equipment if event is not cancelled
|
||||
if (this instanceof Mob) {
|
||||
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
|
||||
@@ -1746,8 +1746,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1747,8 +1747,13 @@ public abstract class LivingEntity extends Entity {
|
||||
this.dropCustomDeathLoot(source, i, flag);
|
||||
this.clearEquipmentSlots = prev; // Paper
|
||||
}
|
||||
@ -135,7 +135,7 @@ index e463ae13ce6f65675c2b6d553ecf91db5a047dbc..7ff1e7e4d493770bfdbc0ad5e8f10387
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 118d7068700bbd4aeaf766ee8d3984b474c6bf9a..751f376e175881d9e9f750c90143a7c39431ce6c 100644
|
||||
index b35dd78b08b15842e87182de9afef6c49c249366..120e21edad328f382b5edc030f546e3b9a80916b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -809,6 +809,11 @@ public class CraftEventFactory {
|
@ -7,7 +7,7 @@ Subject: [PATCH] Villager Restocks API
|
||||
public net.minecraft.world.entity.npc.Villager numberOfRestocksToday
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
index 1400f8c0cac3d653465b3750078de4d2691ac2a1..1a8a49bd269ed52879866ff3853e131d04aa8bba 100644
|
||||
index e4f0770b0c9a00b813f3473298fb0d5e21e7c008..4f73b71fb39eab10c44da31617632a83e4f0b83f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
@@ -91,6 +91,18 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2a75c77ac51b620098f5cc49a8a6bebafdfc06a1..6c17ae02e3c076b738037454afb7ea08f0f0e79e 100644
|
||||
index a4a2e560304def17ab0943a2d876f6e8e521809b..f9c84bc2018391670d4e2dd97d0fca224cd1a728 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -967,7 +967,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -959,7 +959,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@Override
|
||||
public void handlePickItem(ServerboundPickItemPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e5c5a514e6b7bdf663d33074557e34372f18ea77..86402126b13e5e6542f880cbdc978eb581d33a8a 100644
|
||||
index e28b973efe4f107d0a0d18dd2492f03ce2b424e9..c2e018cc05d6c6aaa615150ab4b62b85acfe1d05 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -579,6 +579,13 @@ public final class CraftServer implements Server {
|
||||
@@ -592,6 +592,13 @@ public final class CraftServer implements Server {
|
||||
return this.bukkitVersion;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ Additionally, this lets us avoid even allocating new objects for this too, furth
|
||||
reducing memory usage.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/phys/shapes/IndirectMerger.java b/src/main/java/net/minecraft/world/phys/shapes/IndirectMerger.java
|
||||
index 9e0afab2329e560c4b2512548dd4b02dd1a2e69f..06662dbff8180751a8684841aa35f709007078ae 100644
|
||||
index 0d9c15120148409967027dead617e80769939697..2214a3198c712deaac0f3d3478c85352185761d4 100644
|
||||
--- a/src/main/java/net/minecraft/world/phys/shapes/IndirectMerger.java
|
||||
+++ b/src/main/java/net/minecraft/world/phys/shapes/IndirectMerger.java
|
||||
@@ -10,12 +10,33 @@ public class IndirectMerger implements IndexMerger {
|
@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache.
|
||||
Set system properly at server startup if not set already to help protect from this.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index cce6886bb3973eed8f0c7ca7b1189547324fd4e2..0aef4fc4a89e627bc80504d7402f1ca2cdc95a74 100644
|
||||
index 8fbc14fb4b38bb73439b0b5d31d29c69f1f229b2..6a9485f1c3743562700779930282285c6ad1067a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -28,6 +28,7 @@ public class Main {
|
@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c5ecf010fff3af1c9b4ebf24ca80fb6b19afccfc..7c7114193fadc6c14d6d8a87cc2d734eaa68b864 100644
|
||||
index d406df9626d29ee257b8eedcbea2af09ed4b6baf..366959f9841eb0ef3669b3b3b069d7670f0ba7e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -881,6 +881,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -889,6 +889,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
private boolean hasStopped = false;
|
||||
public volatile boolean hasFullyShutdown = false; // Paper
|
||||
@ -40,7 +40,7 @@ index c5ecf010fff3af1c9b4ebf24ca80fb6b19afccfc..7c7114193fadc6c14d6d8a87cc2d734e
|
||||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -895,6 +896,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -903,6 +904,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
@ -48,20 +48,20 @@ index c5ecf010fff3af1c9b4ebf24ca80fb6b19afccfc..7c7114193fadc6c14d6d8a87cc2d734e
|
||||
// Paper start - kill main thread, and kill it hard
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
@@ -996,6 +998,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1004,6 +1006,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
public void safeShutdown(boolean flag, boolean isRestarting) {
|
||||
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
|
||||
this.isRestarting = isRestarting;
|
||||
+ this.hasLoggedStop = true; // Paper
|
||||
+ if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper
|
||||
// Paper end
|
||||
this.running = false;
|
||||
if (flag) {
|
||||
if (waitForShutdown) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 42cdb2c70f6b906d27c4b1409df92f7459bf2c1b..930da83ff754bab6b6b6fff651df417baa76c46f 100644
|
||||
index 82f2872cf32638a0df82fe751af4b634d8691c9c..8cb9606cf791d6f0e241cc92baa87988414d94e0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -202,6 +202,11 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -183,6 +183,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
} catch (Exception exception) {
|
||||
ServerLoginPacketListenerImpl.LOGGER.error("Couldn't place player in world", exception);
|
||||
MutableComponent ichatmutablecomponent = Component.translatable("multiplayer.disconnect.invalid_player_data");
|
||||
@ -74,10 +74,10 @@ index 42cdb2c70f6b906d27c4b1409df92f7459bf2c1b..930da83ff754bab6b6b6fff651df417b
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatmutablecomponent));
|
||||
this.connection.disconnect(ichatmutablecomponent);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 86402126b13e5e6542f880cbdc978eb581d33a8a..8d4388df7e62016df262e377e5f75cc44e17e284 100644
|
||||
index c2e018cc05d6c6aaa615150ab4b62b85acfe1d05..718126fbd5829ec6030d5fb2a75f6c8ce76059d7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1002,6 +1002,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1015,6 +1015,7 @@ public final class CraftServer implements Server {
|
||||
plugin.getDescription().getFullName(),
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6c17ae02e3c076b738037454afb7ea08f0f0e79e..8c8ccd61fb1592a9274e54ed6e06ec7737e942e0 100644
|
||||
index f9c84bc2018391670d4e2dd97d0fca224cd1a728..6936e9b671915fbc5d849adefa473906ed29ab95 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1632,6 +1632,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1625,6 +1625,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index e260462933a9f7065b2360e6bf9e4ee56069a705..2ff278cdc3dfef4644b12755be2e3a69a43e1f07 100644
|
||||
index a4b47b69e14643cd82d71d18941144ecbf50db8b..ce7a583355a6f4ce98c571fa7b60d9034f51bd3c 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -19,12 +19,14 @@ dependencies {
|
||||
@ -15,7 +15,7 @@ index e260462933a9f7065b2360e6bf9e4ee56069a705..2ff278cdc3dfef4644b12755be2e3a69
|
||||
implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
|
||||
+ annotationProcessor("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - Needed to generate meta for our Log4j plugins
|
||||
// Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.3")
|
||||
implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation
|
||||
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||
@ -503,10 +503,10 @@ index 8bc8b6013ea5803e091cf3534130b72278b9c29e..dca0c978b30962d4216dc443d7d105e5
|
||||
|
||||
protected void channelRead0(ChannelHandlerContext channelhandlercontext, Packet<?> packet) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 6fba140877e7369cdb7933ec225572c6b153e3a8..e3a62579067209c447f2fdcb76b2a11e489a376b 100644
|
||||
index 549ea8e0fe702615eefcbfd1cd6a30e05b7b3fd5..771677c0e1cd7bfe089b9a5bb9095650216ff588 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -200,6 +200,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -195,6 +195,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
org.spigotmc.SpigotConfig.registerCommands();
|
||||
// Spigot end
|
||||
// Paper start
|
||||
@ -515,10 +515,10 @@ index 6fba140877e7369cdb7933ec225572c6b153e3a8..e3a62579067209c447f2fdcb76b2a11e
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index d18337c4c123819e4d5f55b65985e548da492627..6cdd0c13189f372dcf562c4190f4c6155b33dd13 100644
|
||||
index 3bd645d9f642e6484d8ac8f02872873bc306e3de..3fff95ffe0e343f873dda31507567cbd8fa2460e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -218,7 +218,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -221,7 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||
@ -529,7 +529,7 @@ index d18337c4c123819e4d5f55b65985e548da492627..6cdd0c13189f372dcf562c4190f4c615
|
||||
}
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
@@ -1290,7 +1292,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1330,7 +1332,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity.isRemoved()) {
|
||||
// Paper start
|
||||
if (DEBUG_ENTITIES) {
|
||||
@ -556,10 +556,10 @@ index a24ef433d0c9d06b86fd612978cfd6d877036791..1b38326c9a709536dc4cccf9af93aede
|
||||
final MinecraftServer server;
|
||||
public volatile boolean running;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 930da83ff754bab6b6b6fff651df417baa76c46f..c3027735725c68eeb1b42a42ebb8646f3a35a518 100644
|
||||
index 8cb9606cf791d6f0e241cc92baa87988414d94e0..d92aaec3a4535d3683e842f9a712ba06c03014ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -204,7 +204,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -185,7 +185,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
MutableComponent ichatmutablecomponent = Component.translatable("multiplayer.disconnect.invalid_player_data");
|
||||
// Paper start
|
||||
if (MinecraftServer.getServer().isDebugging()) {
|
||||
@ -591,7 +591,7 @@ index 6599f874d9f97e9ef4862039ecad7277bbc5fd91..7edd4b88eb0476f0630630bc4681e859
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index b2d06181ad76b1db2abb1ddca075f4ec6dab55dc..aa3adc628178962ce89df0e372c925e8f4801606 100644
|
||||
index 6e95a98727322106d2c418de80f5f0aad2ea1953..a3c1bba1c1f795d203207776bab41b4b8f4e69d7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -640,7 +640,7 @@ public class LevelChunk extends ChunkAccess {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 2ff278cdc3dfef4644b12755be2e3a69a43e1f07..2d1e639bd2880469d849ca1242184b0af1f6903c 100644
|
||||
index ce7a583355a6f4ce98c571fa7b60d9034f51bd3c..8f32e0c3078366f4b07a499b1838929564a05b76 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -35,6 +35,7 @@ dependencies {
|
||||
@ -789,10 +789,10 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31
|
||||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8d4388df7e62016df262e377e5f75cc44e17e284..f1134bce181e8ea5eebb241e3af9691390cd2533 100644
|
||||
index 718126fbd5829ec6030d5fb2a75f6c8ce76059d7..3e48976a9f0317b02241ed9e313fbce1d373efe3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2691,5 +2691,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2715,5 +2715,11 @@ public final class CraftServer implements Server {
|
||||
public boolean isStopping() {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
@ -8,19 +8,19 @@ public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips
|
||||
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips <init>()V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||
index 76dfb546ddddb14497269d22ac1c8f84a0a9c15c..92beb137d86ae89d90b1963a024c0be308d81a42 100644
|
||||
index 6c021402ab7522f132193619fae4be4ca70d70f8..4e7b7a3910840908b73c80faf9a83b728186f775 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||
@@ -27,7 +27,7 @@ import net.minecraft.util.VisibleForDebug;
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.slf4j.Logger;
|
||||
public class GossipContainer {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final int DISCARD_THRESHOLD = 2;
|
||||
- private final Map<UUID, GossipContainer.EntityGossips> gossips = Maps.newHashMap();
|
||||
+ private final Map<UUID, GossipContainer.EntityGossips> gossips = Maps.newHashMap(); public Map<UUID, GossipContainer.EntityGossips> getReputations() { return this.gossips; } // Paper - add getter for reputations
|
||||
|
||||
@VisibleForDebug
|
||||
public Map<UUID, Object2IntMap<GossipType>> getGossipEntries() {
|
||||
@@ -226,6 +226,43 @@ public class GossipContainer {
|
||||
@@ -231,6 +231,43 @@ public class GossipContainer {
|
||||
public void remove(GossipType gossipType) {
|
||||
this.entries.removeInt(gossipType);
|
||||
}
|
||||
@ -63,9 +63,9 @@ index 76dfb546ddddb14497269d22ac1c8f84a0a9c15c..92beb137d86ae89d90b1963a024c0be3
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
static class GossipEntry {
|
||||
static record GossipEntry(UUID target, GossipType type, int value) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
index 1a8a49bd269ed52879866ff3853e131d04aa8bba..d1f5e1292246e0fb252d3d3409bbf37cc8166bbc 100644
|
||||
index 4f73b71fb39eab10c44da31617632a83e4f0b83f..11e44a81934255fd4efa418009d8bb78c785cfd5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
@@ -17,6 +17,13 @@ import org.bukkit.entity.Villager;
|
||||
@ -84,7 +84,7 @@ index 1a8a49bd269ed52879866ff3853e131d04aa8bba..d1f5e1292246e0fb252d3d3409bbf37c
|
||||
public CraftVillager(CraftServer server, net.minecraft.world.entity.npc.Villager entity) {
|
||||
@@ -146,4 +153,45 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||
public static VillagerProfession bukkitToNmsProfession(Profession bukkit) {
|
||||
return Registry.VILLAGER_PROFESSION.get(CraftNamespacedKey.toMinecraft(bukkit.getKey()));
|
||||
return BuiltInRegistries.VILLAGER_PROFESSION.get(CraftNamespacedKey.toMinecraft(bukkit.getKey()));
|
||||
}
|
||||
+
|
||||
+ // Paper start - Add villager reputation API
|
@ -5,7 +5,7 @@ Subject: [PATCH] Option for maximum exp value when merging orbs
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 751f376e175881d9e9f750c90143a7c39431ce6c..2dde21dea012f4531e737586752ae1b1f5023d99 100644
|
||||
index 120e21edad328f382b5edc030f546e3b9a80916b..2fd5e1b4f20c28ebed0b480cc866ed05cb739462 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -630,16 +630,30 @@ public class CraftEventFactory {
|
@ -9,7 +9,7 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
|
||||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 2dde21dea012f4531e737586752ae1b1f5023d99..359964cd8820b8ef8b8dba5501119164cebcf743 100644
|
||||
index 2fd5e1b4f20c28ebed0b480cc866ed05cb739462..571eb0eea3bf7b0cf567cdf571699e729402fda0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -640,7 +640,7 @@ public class CraftEventFactory {
|
@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns
|
||||
if any are still running after that delay just as reload does.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7c7114193fadc6c14d6d8a87cc2d734eaa68b864..fb2d02ad6f6a4a1c69dde06e7e193aaef8655028 100644
|
||||
index 366959f9841eb0ef3669b3b3b069d7670f0ba7e6..93c1a1bf602af1e73202590e78dac8336a5d3296 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -921,6 +921,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -929,6 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@ -22,10 +22,10 @@ index 7c7114193fadc6c14d6d8a87cc2d734eaa68b864..fb2d02ad6f6a4a1c69dde06e7e193aae
|
||||
// CraftBukkit end
|
||||
if (this.getConnection() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f1134bce181e8ea5eebb241e3af9691390cd2533..e8e31ddaa7fa87b9854961dd44abff9ddb6a6142 100644
|
||||
index 3e48976a9f0317b02241ed9e313fbce1d373efe3..77d798a2c1a6fc7c171c07c103b54939e1aca497 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1011,6 +1011,35 @@ public final class CraftServer implements Server {
|
||||
@@ -1024,6 +1024,35 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ A config is provided if you rather let players use these exploits, and let
|
||||
them destroy the worlds End Portals and get on top of the nether easy.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 38bb502e9f1272020a23a3ef8ebb0cb1a5a251ef..b18b0e1b5e059f08fd3117eaa0fb28a10fac6562 100644
|
||||
index 2dc93845749951cd51a19fd9ee515cebcba5d731..7f769f72c847d4894c1cd7a3b09c58f51c392388 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -172,6 +172,7 @@ public class Explosion {
|
||||
@@ -168,6 +168,7 @@ public class Explosion {
|
||||
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
|
||||
BlockPos blockposition = new BlockPos(d4, d5, d6);
|
||||
BlockState iblockdata = this.level.getBlockState(blockposition);
|
||||
@ -24,7 +24,7 @@ index 38bb502e9f1272020a23a3ef8ebb0cb1a5a251ef..b18b0e1b5e059f08fd3117eaa0fb28a1
|
||||
FluidState fluid = iblockdata.getFluidState(); // Paper
|
||||
|
||||
if (!this.level.isInWorldBounds(blockposition)) {
|
||||
@@ -350,7 +351,7 @@ public class Explosion {
|
||||
@@ -346,7 +347,7 @@ public class Explosion {
|
||||
BlockState iblockdata = this.level.getBlockState(blockposition);
|
||||
Block block = iblockdata.getBlock();
|
||||
|
||||
@ -34,10 +34,10 @@ index 38bb502e9f1272020a23a3ef8ebb0cb1a5a251ef..b18b0e1b5e059f08fd3117eaa0fb28a1
|
||||
|
||||
this.level.getProfiler().push("explosion_blocks");
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index cff803e60a7592fc55fc4a76e39f2254196c07f6..e58f576c1bd7a3b1f3d57ed384bbdbc13248147b 100644
|
||||
index 6498a4073867fc2cb24e2d75776d2a84661846fb..44f0325e8762e1bc528ab22d56a71322dbc84bd6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -429,6 +429,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -428,6 +428,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
|
||||
// CraftBukkit start - tree generation
|
||||
if (this.captureTreeGeneration) {
|
||||
@ -49,10 +49,10 @@ index cff803e60a7592fc55fc4a76e39f2254196c07f6..e58f576c1bd7a3b1f3d57ed384bbdbc1
|
||||
if (blockstate == null) {
|
||||
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 77125720fcbeb7bfc180effb27cfb78c74832ce5..cb11cef117fc896ddcb40993ddb852a2e717c2ad 100644
|
||||
index 11b0b1a217648496ccf08f09bb3aa53904ffa9cb..a9171ca47e836428e1b5c8366898a94702242e13 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -92,6 +92,19 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -90,6 +90,19 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
protected final StateDefinition<Block, BlockState> stateDefinition;
|
||||
private BlockState defaultBlockState;
|
||||
// Paper start
|
||||
@ -115,10 +115,10 @@ index 76720517cd2d82065eb8430cf854b536295341db..29755807fdb6c30e31c0ec2bbf33bed9
|
||||
|
||||
world.playSound((Player) null, pos, SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.15F + 0.6F);
|
||||
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 61a792c5ccf3688d4f78c6e7461090f63a0cc26a..b2ab7749e3ddf124d5ef97271a76dc875a650771 100644
|
||||
index c53b80cba9ea658d20e527a9bfcd6b5d7d9f51fc..6a549229037c8b8c2093feb563780ef8565d709f 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
|
||||
@@ -223,7 +223,7 @@ public abstract class BlockBehaviour {
|
||||
@@ -234,7 +234,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
public boolean canBeReplaced(BlockState state, BlockPlaceContext context) {
|
||||
@ -127,7 +127,7 @@ index 61a792c5ccf3688d4f78c6e7461090f63a0cc26a..b2ab7749e3ddf124d5ef97271a76dc87
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
@@ -741,6 +741,12 @@ public abstract class BlockBehaviour {
|
||||
@@ -775,6 +775,12 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
return ((Block) this.owner).builtInRegistryHolder();
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ index 61a792c5ccf3688d4f78c6e7461090f63a0cc26a..b2ab7749e3ddf124d5ef97271a76dc87
|
||||
public Material getMaterial() {
|
||||
return this.material;
|
||||
}
|
||||
@@ -838,7 +844,7 @@ public abstract class BlockBehaviour {
|
||||
@@ -872,7 +878,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
}
|
||||
|
||||
public PushReaction getPistonPushReaction() {
|
||||
@ -150,10 +150,10 @@ index 61a792c5ccf3688d4f78c6e7461090f63a0cc26a..b2ab7749e3ddf124d5ef97271a76dc87
|
||||
|
||||
public boolean isSolidRender(BlockGetter world, BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||
index 953a1dfd71605ac123133dc1d4e8133a33884f4a..1369d4f818d203e3092fd6ba4def106dda16d6d2 100644
|
||||
index d1c7eba29c64a6dbf55d3062ced9769eecb548ed..faaf50cb9bce254aef554ed8b402b145532e12a4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||
@@ -215,6 +215,13 @@ public class PortalForcer {
|
||||
@@ -221,6 +221,13 @@ public class PortalForcer {
|
||||
for (int j = -1; j < 3; ++j) {
|
||||
for (int k = -1; k < 4; ++k) {
|
||||
temp.setWithOffset(pos, portalDirection.getStepX() * j + enumdirection1.getStepX() * distanceOrthogonalToPortal, k, portalDirection.getStepZ() * j + enumdirection1.getStepZ() * distanceOrthogonalToPortal);
|
@ -5,23 +5,23 @@ Subject: [PATCH] Reduce allocation of Vec3D by entity tracker
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java
|
||||
index 3167f5c6be39757e3cc42cbb17ab0cf13a2fe470..3768a71491ef7836b9739bdaec7a077c523dbacd 100644
|
||||
index 05ac41e136da43284fb24a6b698ebd36318278fb..5ca3ad7b3d7606accd0a58b3c708fadb349608f7 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.world.phys.Vec3;
|
||||
@@ -5,7 +5,7 @@ import org.jetbrains.annotations.VisibleForTesting;
|
||||
|
||||
public class VecDeltaCodec {
|
||||
private static final double TRUNCATION_STEPS = 4096.0D;
|
||||
- private Vec3 base = Vec3.ZERO;
|
||||
+ public Vec3 base = Vec3.ZERO; // Paper
|
||||
|
||||
private static long encode(double value) {
|
||||
return Mth.lfloor(value * 4096.0D);
|
||||
@VisibleForTesting
|
||||
static long encode(double value) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 1bf18259505997c39e7880abf49e583cc763beb1..2651e6d22658beea7247a93a6c73f99f1d258752 100644
|
||||
index 6b01d5b5535887eef0ac7b8a5e0a669a2700e83f..f18df9d9e569bda32865a05e85a843f0422e17cf 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1302,9 +1302,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1339,9 +1339,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public void updatePlayer(ServerPlayer player) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot
|
||||
if (player != this.entity) {
|
||||
@ -38,10 +38,10 @@ index 1bf18259505997c39e7880abf49e583cc763beb1..2651e6d22658beea7247a93a6c73f99f
|
||||
boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 286a14aafe2e8b4662515165ede8a74833897f33..5d16d9dc07349c4193084ba9e70c16e58155c892 100644
|
||||
index 841bb7741ae6b0e9cb98120ee1649b93ef4c3dab..4ebe6bdc01b2d80fc84ba31aae9eb9ac26339436 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -148,7 +148,13 @@ public class ServerEntity {
|
||||
@@ -152,7 +152,13 @@ public class ServerEntity {
|
||||
i = Mth.floor(this.entity.getYRot() * 256.0F / 360.0F);
|
||||
j = Mth.floor(this.entity.getXRot() * 256.0F / 360.0F);
|
||||
Vec3 vec3d = this.entity.trackingPosition();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Ensure safe gateway teleport
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index 9bb730b489006c7baaaf55194ef796ff20771dd3..89bf5fc4fab2cf39378600aa8925ac4bb7707428 100644
|
||||
index 1c0c1be2b08fc8a28ff36896da01d668308570f4..f80545f80948db27d1fbde77d0505c916eb504ed 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -105,7 +105,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
@@ -106,7 +106,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
List<Entity> list = world.getEntitiesOfClass(Entity.class, new AABB(pos), TheEndGatewayBlockEntity::canEntityTeleport);
|
||||
|
||||
if (!list.isEmpty()) {
|
@ -42,10 +42,10 @@ index 2ba3bb4e5670ece798a8882801a856d82851c00a..a61f55ed1fbe5aac5289014cb95cb695
|
||||
this.newChunkHolder = newChunkHolder; // Paper - rewrite chunk system
|
||||
this.chunkToSaveHistory = null;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a501e450e 100644
|
||||
index f18df9d9e569bda32865a05e85a843f0422e17cf..d17a5b8d6f1b61ac1894e642d70704881c343f25 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -152,12 +152,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -156,12 +156,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// Paper start - distance maps
|
||||
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
|
||||
public final io.papermc.paper.chunk.PlayerChunkLoader playerChunkManager = new io.papermc.paper.chunk.PlayerChunkLoader(this, this.pooledLinkedPlayerHashSets); // Paper - replace chunk loader
|
||||
@ -70,7 +70,7 @@ index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a
|
||||
// Paper start - per player mob spawning
|
||||
if (this.playerMobDistanceMap != null) {
|
||||
this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
||||
@@ -168,6 +180,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -172,6 +184,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
||||
this.playerChunkManager.removePlayer(player); // Paper - replace chunk loader
|
||||
|
||||
@ -81,7 +81,7 @@ index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a
|
||||
// Paper start - per player mob spawning
|
||||
if (this.playerMobDistanceMap != null) {
|
||||
this.playerMobDistanceMap.remove(player);
|
||||
@@ -180,6 +196,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -184,6 +200,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||
this.playerChunkManager.updatePlayer(player); // Paper - replace chunk loader
|
||||
@ -89,7 +89,7 @@ index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a
|
||||
// Paper start - per player mob spawning
|
||||
if (this.playerMobDistanceMap != null) {
|
||||
this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
||||
@@ -267,6 +284,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -275,6 +292,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.regionManagers.add(this.dataRegionManager);
|
||||
// Paper end
|
||||
this.playerMobDistanceMap = this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets) : null; // Paper
|
||||
@ -128,7 +128,7 @@ index 2651e6d22658beea7247a93a6c73f99f1d258752..c68be481bbedbe347651f73741bf378a
|
||||
}
|
||||
|
||||
protected ChunkGenerator generator() {
|
||||
@@ -822,43 +871,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -834,43 +883,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return this.anyPlayerCloseEnoughForSpawning(pos, false);
|
||||
}
|
||||
|
||||
@ -262,10 +262,10 @@ index d3c3db919e9b0507e8543313d9028394e5163673..52cba8f68d274cce106304aef1249a95
|
||||
|
||||
public String getDebugStatus() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index f0ab91b93dabd0c77a8537e40c8b504200b261fd..324a99ea21bccdf27c15248ae2811048efaa2595 100644
|
||||
index 665e088cb0b73f6a0c62f29c56da462bab7c927e..298e4468f7b5346733257f7117f76c66e9a1d8f0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -657,6 +657,37 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -658,6 +658,37 @@ public class ServerChunkCache extends ChunkSource {
|
||||
if (flag) {
|
||||
this.chunkMap.tick();
|
||||
} else {
|
||||
@ -303,7 +303,7 @@ index f0ab91b93dabd0c77a8537e40c8b504200b261fd..324a99ea21bccdf27c15248ae2811048
|
||||
LevelData worlddata = this.level.getLevelData();
|
||||
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||
|
||||
@@ -700,15 +731,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -701,15 +732,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
|
||||
Collections.shuffle(list);
|
||||
@ -320,7 +320,7 @@ index f0ab91b93dabd0c77a8537e40c8b504200b261fd..324a99ea21bccdf27c15248ae2811048
|
||||
Iterator iterator1 = list.iterator();
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
@@ -716,9 +739,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -717,9 +740,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
LevelChunk chunk1 = chunkproviderserver_a.chunk;
|
||||
ChunkPos chunkcoordintpair = chunk1.getPos();
|
||||
|
||||
@ -333,14 +333,14 @@ index f0ab91b93dabd0c77a8537e40c8b504200b261fd..324a99ea21bccdf27c15248ae2811048
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 7ad1d2cd3b2d4b1f9b21f0de5ddbf2626aea0310..61904f4d3160d83f87d66fd9f86acf54ab31adc6 100644
|
||||
index 55705fca6dba1bebe0cb444a68c130f8f2785ae3..924969d5cb52e5361b6bf383a8ba6f63508dad6d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -263,6 +263,7 @@ public class ServerPlayer extends Player {
|
||||
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||
|
||||
@@ -266,6 +266,7 @@ public class ServerPlayer extends Player {
|
||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// CraftBukkit end
|
||||
public boolean isRealPlayer; // Paper
|
||||
+ public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
||||
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||
|
||||
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use distance map to optimise entity tracker
|
||||
Use the distance map to find candidate players for tracking.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751b7c7aa96 100644
|
||||
index d17a5b8d6f1b61ac1894e642d70704881c343f25..993d04766c81990e72166f1348a01d8ef7e05d0f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -66,6 +66,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
|
||||
@@ -68,6 +68,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetPassengersPacket;
|
||||
import net.minecraft.network.protocol.game.DebugPackets;
|
||||
import io.papermc.paper.util.MCUtil;
|
||||
@ -17,7 +17,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||
import net.minecraft.server.network.ServerPlayerConnection;
|
||||
import net.minecraft.util.CsvOutput;
|
||||
@@ -163,6 +164,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -167,6 +168,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick
|
||||
public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerChunkTickRangeMap;
|
||||
// Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||
@ -41,7 +41,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
|
||||
void addPlayerToDistanceMaps(ServerPlayer player) {
|
||||
this.playerChunkManager.addPlayer(player); // Paper - replace chunk loader
|
||||
@@ -175,6 +193,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -179,6 +197,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
||||
}
|
||||
// Paper end - per player mob spawning
|
||||
@ -56,7 +56,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
}
|
||||
|
||||
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
||||
@@ -189,6 +215,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -193,6 +219,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.playerMobDistanceMap.remove(player);
|
||||
}
|
||||
// Paper end - per player mob spawning
|
||||
@ -68,7 +68,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
}
|
||||
|
||||
void updateMaps(ServerPlayer player) {
|
||||
@@ -202,6 +233,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -206,6 +237,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
||||
}
|
||||
// Paper end - per player mob spawning
|
||||
@ -83,7 +83,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
}
|
||||
// Paper end
|
||||
// Paper start
|
||||
@@ -284,6 +323,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -292,6 +331,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.regionManagers.add(this.dataRegionManager);
|
||||
// Paper end
|
||||
this.playerMobDistanceMap = this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets) : null; // Paper
|
||||
@ -129,7 +129,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
// Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||
this.playerChunkTickRangeMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets,
|
||||
(ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ,
|
||||
@@ -986,17 +1064,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -998,17 +1076,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
public void move(ServerPlayer player) {
|
||||
@ -148,7 +148,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
|
||||
int i = SectionPos.blockToSectionCoord(player.getBlockX());
|
||||
int j = SectionPos.blockToSectionCoord(player.getBlockZ());
|
||||
@@ -1095,7 +1163,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1107,7 +1175,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker
|
||||
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
|
||||
@ -157,7 +157,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
if (entity instanceof ServerPlayer) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||
|
||||
@@ -1139,7 +1207,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1151,7 +1219,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
entity.tracker = null; // Paper - We're no longer tracked
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
List<ServerPlayer> list = Lists.newArrayList();
|
||||
List<ServerPlayer> list1 = this.level.players();
|
||||
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
||||
@@ -1213,46 +1311,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1250,46 +1348,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}));
|
||||
// Paper end
|
||||
DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos());
|
||||
@ -243,7 +243,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
|
||||
}
|
||||
|
||||
@@ -1307,6 +1366,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1344,6 +1403,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.lastSectionPos = SectionPos.of((EntityAccess) entity);
|
||||
}
|
||||
|
||||
@ -287,7 +287,7 @@ index c68be481bbedbe347651f73741bf378a501e450e..f337b380c443016fc593dc768e32b751
|
||||
return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 32623f90a5bc4fb6fe99897c682ef4f55f056dea..26c8b19d484032f5d0935ba8672a3121a3197d67 100644
|
||||
index 19218e993052d44a830f825f9a0eb695635861c1..2609bdb3f051e449f9a2e760e9c4d38f85855cf6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -57,6 +57,7 @@ import net.minecraft.network.syncher.EntityDataSerializers;
|
@ -15,18 +15,18 @@ Previously maps would load all chunks in a certain radius depending on
|
||||
five ticks that movement occur in anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
index 339dfd9fdffbc1c49b9112ba43ef6f05d85bdf86..44bfc5560a1b43925aabfd8137495e169da32fa2 100644
|
||||
index 0c4b4c8b770ea0adb1a8346ea2cda96570687bea..e58ba9c46e6de59b55c6471a44e1a5f158e70e07 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
@@ -131,9 +131,9 @@ public class MapItem extends ComplexItem {
|
||||
int k2 = (j / i + k1 - 64) * i;
|
||||
int l2 = (k / i + l1 - 64) * i;
|
||||
@@ -134,9 +134,9 @@ public class MapItem extends ComplexItem {
|
||||
int j2 = (j / i + k1 - 64) * i;
|
||||
int k2 = (k / i + l1 - 64) * i;
|
||||
Multiset<MaterialColor> multiset = LinkedHashMultiset.create();
|
||||
- LevelChunk chunk = world.getChunkAt(new BlockPos(k2, 0, l2));
|
||||
+ LevelChunk chunk = world.getChunkIfLoaded(new BlockPos(k2, 0, l2)); // Paper - Maps shouldn't load chunks
|
||||
- LevelChunk chunk = world.getChunk(SectionPos.blockToSectionCoord(j2), SectionPos.blockToSectionCoord(k2));
|
||||
+ LevelChunk chunk = world.getChunkIfLoaded(SectionPos.blockToSectionCoord(j2), SectionPos.blockToSectionCoord(k2)); // Paper - Maps shouldn't load chunks
|
||||
|
||||
- if (!chunk.isEmpty()) {
|
||||
+ if (chunk != null && !chunk.isEmpty()) { // Paper - Maps shouldn't load chunks
|
||||
ChunkPos chunkcoordintpair = chunk.getPos();
|
||||
int i3 = k2 & 15;
|
||||
int j3 = l2 & 15;
|
||||
int l2 = 0;
|
||||
double d1 = 0.0D;
|
||||
int i3;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use seed based lookup for Treasure Maps - Fixes lag from
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
index 44bfc5560a1b43925aabfd8137495e169da32fa2..d407cf849a31a7a77fda07aa687ebb254f43d6ab 100644
|
||||
index e58ba9c46e6de59b55c6471a44e1a5f158e70e07..f883e1bc4150bc074f1d8363a95b4eae16f3828e 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
@@ -252,14 +252,13 @@ public class MapItem extends ComplexItem {
|
||||
@@ -250,14 +250,13 @@ public class MapItem extends ComplexItem {
|
||||
boolean[] aboolean = new boolean[16384];
|
||||
int l = j / i - 64;
|
||||
int i1 = k / i - 64;
|
@ -66,10 +66,10 @@ index 29755807fdb6c30e31c0ec2bbf33bed9afd5d478..8d73893100884c08aa552ff41c2a07a3
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
index 1bcaed2abd1118804a362d6852e4a29d3064aa14..4b61602a1d2d6817272e02cfd282ac5dabbd976d 100644
|
||||
index 4f7b12d8f213d43f4ef5538b7e05809a1a106cbd..221c5d080d55326e458c1182823d6b49224ef498 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
@@ -285,7 +285,7 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
||||
@@ -288,7 +288,7 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
||||
if (world.getBlockState(pos).is(Blocks.MOVING_PISTON)) {
|
||||
BlockState blockState = Block.updateFromNeighbourShapes(blockEntity.movedState, world, pos);
|
||||
if (blockState.isAir()) {
|
@ -7,10 +7,10 @@ If the falling block dies during teleportation (entity#move), then we need
|
||||
to detect that by placing a check after the move.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index 108c9ea0eb4a7f381042bfe0203ac40a9c4f27a7..da00fab453f3fb580acc9de65a0853656f9b6fc4 100644
|
||||
index e7404619877099aa2223da349e15090d2c9be1d0..23bd2a9af71b63bf463c7091ac261b033e9ce9af 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -126,6 +126,11 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -128,6 +128,11 @@ public class FallingBlockEntity extends Entity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -22,7 +22,7 @@ index 108c9ea0eb4a7f381042bfe0203ac40a9c4f27a7..da00fab453f3fb580acc9de65a085365
|
||||
if (this.blockState.isAir()) {
|
||||
this.discard();
|
||||
} else {
|
||||
@@ -138,6 +143,12 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -140,6 +145,12 @@ public class FallingBlockEntity extends Entity {
|
||||
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
|
@ -15,10 +15,10 @@ allows the distance calculation to avoid overflow and work as intended.
|
||||
This issue is being tracked in Mojira ticket MC-159283
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java b/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java
|
||||
index 30b6c5839b0da1aea792b7e092f0fcf5e83835db..683474cd96d3a0cdfb3b22d0111c8d3231f01d92 100644
|
||||
index 299116c5c4d25c78a2af00bb44c4f51ac04286e8..fac92f37c32e0398ebc05d9a0378446fcabaef1a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java
|
||||
@@ -501,7 +501,7 @@ public final class DensityFunctions {
|
||||
@@ -502,7 +502,7 @@ public final class DensityFunctions {
|
||||
int j = z / 2;
|
||||
int k = x % 2;
|
||||
int l = z % 2;
|
@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside
|
||||
of the move call and into an appropriate place in the tick method.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8c8ccd61fb1592a9274e54ed6e06ec7737e942e0..10efc010cf5c43d3e009972c1f5ee7c4083d21f8 100644
|
||||
index 6936e9b671915fbc5d849adefa473906ed29ab95..dc10d5add00e77a2da761e806019785eb83d2bc6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1446,6 +1446,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1438,6 +1438,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9));
|
||||
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
|
@ -5,10 +5,10 @@ Subject: [PATCH] Inventory getHolder method without block snapshot
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
index 3796f8b122ad981b6faacd2afcaf3696314aad6b..b17dab9e5c06d8789553b104602d7da35d926dd1 100644
|
||||
index 94a71073a0d69145cf3429a2b6f646a2dc2015fd..7271cf41d9ad153ce10b5b5e08ebcdbb3bc65be9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
@@ -532,6 +532,13 @@ public class CraftInventory implements Inventory {
|
||||
@@ -535,6 +535,13 @@ public class CraftInventory implements Inventory {
|
||||
return this.inventory.getOwner();
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 10efc010cf5c43d3e009972c1f5ee7c4083d21f8..496fdfcf3e6a80f9f2f073105bc2819ce127c8ef 100644
|
||||
index dc10d5add00e77a2da761e806019785eb83d2bc6..8f6ab03ade0e54f91d55dc54103f89425802aa42 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3229,9 +3229,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3096,9 +3096,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
if (!this.player.containerMenu.stillValid(this.player)) {
|
||||
ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
|
||||
} else {
|
@ -9,10 +9,10 @@ on harddrives.
|
||||
-DPaper.enable-sync-chunk-writes=true to enable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index 1e01277448a3cf2b2045b54b182166a66c822e20..a32cfa75a9bea896f558bab646d0868391b069a9 100644
|
||||
index e72fb5c548a9baef09ae547863c4bdc439ce28b2..c7e4330c93baff1f3027d7c75cf857b673d38970 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -136,7 +136,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@@ -144,7 +144,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.maxWorldSize = this.get("max-world-size", (integer) -> {
|
||||
return Mth.clamp(integer, (int) 1, 29999984);
|
||||
}, 29999984);
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add permission for command blocks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index af00442931f9f6cf878bd61137c2f29fc7c8d0b1..431ff490760f54be76847c7b370dbbb4b65de102 100644
|
||||
index aee5144bdc5bd9f7b07ce3b72331bcfd42663ec9..a98254e38076e82f94db7b2f2112500eaadd52d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -396,7 +396,7 @@ public class ServerPlayerGameMode {
|
||||
@ -18,10 +18,10 @@ index af00442931f9f6cf878bd61137c2f29fc7c8d0b1..431ff490760f54be76847c7b370dbbb4
|
||||
return false;
|
||||
} else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 496fdfcf3e6a80f9f2f073105bc2819ce127c8ef..033c1038ccc5f4c340f853a89a72aeadbf15922e 100644
|
||||
index 8f6ab03ade0e54f91d55dc54103f89425802aa42..9f095be14d7bb8495b09a10cad4d81dbcb7c3138 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -878,7 +878,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -870,7 +870,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (!this.server.isCommandBlockEnabled()) {
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
||||
@ -30,7 +30,7 @@ index 496fdfcf3e6a80f9f2f073105bc2819ce127c8ef..033c1038ccc5f4c340f853a89a72aead
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
|
||||
} else {
|
||||
BaseCommandBlock commandblocklistenerabstract = null;
|
||||
@@ -945,7 +945,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -937,7 +937,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (!this.server.isCommandBlockEnabled()) {
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 26c8b19d484032f5d0935ba8672a3121a3197d67..1582da75f92aed598c1c076af7b94af7ab48d10a 100644
|
||||
index 2609bdb3f051e449f9a2e760e9c4d38f85855cf6..09b2b6633b108739e8fe6d4c400d42d88b27435e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -713,8 +713,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -19,7 +19,7 @@ index 26c8b19d484032f5d0935ba8672a3121a3197d67..1582da75f92aed598c1c076af7b94af7
|
||||
}
|
||||
|
||||
protected AABB makeBoundingBox() {
|
||||
@@ -3945,6 +3945,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3995,6 +3995,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public final void setPosRaw(double x, double y, double z) {
|
||||
@ -31,7 +31,7 @@ index 26c8b19d484032f5d0935ba8672a3121a3197d67..1582da75f92aed598c1c076af7b94af7
|
||||
// Paper start - rewrite chunk system
|
||||
if (this.updatingSectionStatus) {
|
||||
LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable());
|
||||
@@ -3968,6 +3973,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4018,6 +4023,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.levelCallback.onMove();
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead
|
||||
of restoring the server.properties every single load.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index fb2d02ad6f6a4a1c69dde06e7e193aaef8655028..dda33bd52d9c527c37f67b829010c27dba4b667a 100644
|
||||
index 93c1a1bf602af1e73202590e78dac8336a5d3296..ce02077acd0958272e01e695c040a030eb8febdc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -791,7 +791,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -799,7 +799,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
chunkproviderserver.getLightEngine().setTaskPerBatch(worldserver.paperConfig().misc.lightQueueSize); // Paper - increase light queue size
|
||||
// CraftBukkit start
|
||||
// this.updateMobSpawningFlags();
|
||||
@ -20,7 +20,7 @@ index fb2d02ad6f6a4a1c69dde06e7e193aaef8655028..dda33bd52d9c527c37f67b829010c27d
|
||||
|
||||
this.forceTicks = false;
|
||||
// CraftBukkit end
|
||||
@@ -1704,11 +1704,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1702,11 +1702,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index fb2d02ad6f6a4a1c69dde06e7e193aaef8655028..dda33bd52d9c527c37f67b829010c27d
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1722,7 +1725,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1720,7 +1723,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
|
||||
@ -63,10 +63,10 @@ index 4bb29f86538552bb62125cc61210fd77b1ec671d..817193ca5fc15134d2985187bc2226cc
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index e3a62579067209c447f2fdcb76b2a11e489a376b..a8e18a168e8288ebea95bacd61a38039b3427d5e 100644
|
||||
index 771677c0e1cd7bfe089b9a5bb9095650216ff588..520cd1a6b347687b2ec6d13f034be391d1a1af85 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -332,7 +332,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -326,7 +326,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@Override
|
||||
public void forceDifficulty() {
|
||||
@ -76,23 +76,23 @@ index e3a62579067209c447f2fdcb76b2a11e489a376b..a8e18a168e8288ebea95bacd61a38039
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 61904f4d3160d83f87d66fd9f86acf54ab31adc6..c32f09e993ef25876373a34d148b0452ea03bcf0 100644
|
||||
index 924969d5cb52e5361b6bf383a8ba6f63508dad6d..39c3c4a5239c177ef81b13be1139300bb9af1dea 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1129,7 +1129,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1151,7 +1151,7 @@ public class ServerPlayer extends Player {
|
||||
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
||||
|
||||
this.connection.send(new ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), this.gameMode.getGameModeForPlayer(), this.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), true, this.getLastDeathLocation()));
|
||||
this.connection.send(new ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), this.gameMode.getGameModeForPlayer(), this.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), (byte) 3, this.getLastDeathLocation()));
|
||||
- this.connection.send(new ClientboundChangeDifficultyPacket(this.level.getDifficulty(), this.level.getLevelData().isDifficultyLocked()));
|
||||
+ this.connection.send(new ClientboundChangeDifficultyPacket(worldserver.getDifficulty(), this.level.getLevelData().isDifficultyLocked())); // Paper - fix difficulty sync issue
|
||||
PlayerList playerlist = this.server.getPlayerList();
|
||||
|
||||
playerlist.sendPlayerPermissionLevel(this);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 033c1038ccc5f4c340f853a89a72aeadbf15922e..f6012bf8134f0606710511150dd296a1d677334d 100644
|
||||
index 9f095be14d7bb8495b09a10cad4d81dbcb7c3138..f440d9446d738429e33ed1fa9fa495af67f6427a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3499,7 +3499,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3371,7 +3371,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
|
||||
@ -102,10 +102,10 @@ index 033c1038ccc5f4c340f853a89a72aeadbf15922e..f6012bf8134f0606710511150dd296a1
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e8e31ddaa7fa87b9854961dd44abff9ddb6a6142..4c6c9aa8b3305f5ab4f7b8d356e860da169fb1db 100644
|
||||
index 77d798a2c1a6fc7c171c07c103b54939e1aca497..69cf645d88756c4b11942e07bdc41d56b6732825 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -951,8 +951,8 @@ public final class CraftServer implements Server {
|
||||
@@ -964,8 +964,8 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
@ -117,10 +117,10 @@ index e8e31ddaa7fa87b9854961dd44abff9ddb6a6142..4c6c9aa8b3305f5ab4f7b8d356e860da
|
||||
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
|
||||
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index c3703933598ee96d856a18dcc0932061959c9791..298012beaf6f587a05d230b7208325ea8c3ad811 100644
|
||||
index 3f7b277cd931a60d348802114ee2a1af02c479e0..72721a229f1febc23575ed994261efb1192a99d2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1147,7 +1147,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1146,7 +1146,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public void setDifficulty(Difficulty difficulty) {
|
@ -7,7 +7,7 @@ Inline bit operations and reduce instruction count to make these hot
|
||||
operations faster
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index f8361dcf9d0378497ec5a34ea53b4e0019700851..e68cd32a7db88f29d3224b0908119232ab3cf71a 100644
|
||||
index f35cc28b1fde73e9eae077f597c2822842a282ce..08fee16ab39d9da3c4262b356dd956fd5c967d06 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -30,15 +30,16 @@ public class BlockPos extends Vec3i {
|
@ -22,10 +22,10 @@ wants it to collect even faster, they can restore that setting back to 1 instead
|
||||
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4c6c9aa8b3305f5ab4f7b8d356e860da169fb1db..2aab13270af76bcc1b62787e9910d23d5ab56add 100644
|
||||
index 69cf645d88756c4b11942e07bdc41d56b6732825..0b6f9567aaad080ff2a21be9e17a93d2d24fd010 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -360,7 +360,7 @@ public final class CraftServer implements Server {
|
||||
@@ -373,7 +373,7 @@ public final class CraftServer implements Server {
|
||||
this.overrideSpawnLimits();
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
@ -34,7 +34,7 @@ index 4c6c9aa8b3305f5ab4f7b8d356e860da169fb1db..2aab13270af76bcc1b62787e9910d23d
|
||||
this.minimumAPI = this.configuration.getString("settings.minimum-api");
|
||||
this.loadIcon();
|
||||
|
||||
@@ -931,7 +931,7 @@ public final class CraftServer implements Server {
|
||||
@@ -944,7 +944,7 @@ public final class CraftServer implements Server {
|
||||
this.console.setMotd(config.motd);
|
||||
this.overrideSpawnLimits();
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
@ -44,10 +44,10 @@ index 4c6c9aa8b3305f5ab4f7b8d356e860da169fb1db..2aab13270af76bcc1b62787e9910d23d
|
||||
this.printSaveWarning = false;
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 298012beaf6f587a05d230b7208325ea8c3ad811..f19bfe6d6d4d915876cea3e6ef792639300fced1 100644
|
||||
index 72721a229f1febc23575ed994261efb1192a99d2..f3723a8219881d55959e7231e230d28bfb521dcd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -282,8 +282,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -281,8 +281,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public Chunk getChunkAt(int x, int z) {
|
||||
@ -70,7 +70,7 @@ index 298012beaf6f587a05d230b7208325ea8c3ad811..f19bfe6d6d4d915876cea3e6ef792639
|
||||
|
||||
@Override
|
||||
public Chunk getChunkAt(Block block) {
|
||||
@@ -350,7 +363,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -349,7 +362,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public boolean unloadChunkRequest(int x, int z) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
|
||||
if (this.isChunkLoaded(x, z)) {
|
||||
@ -79,7 +79,7 @@ index 298012beaf6f587a05d230b7208325ea8c3ad811..f19bfe6d6d4d915876cea3e6ef792639
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -436,9 +449,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -435,9 +448,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
|
||||
// Paper start - Optimize this method
|
||||
ChunkPos chunkPos = new ChunkPos(x, z);
|
||||
@ -93,7 +93,7 @@ index 298012beaf6f587a05d230b7208325ea8c3ad811..f19bfe6d6d4d915876cea3e6ef792639
|
||||
if (immediate == null) {
|
||||
immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z);
|
||||
}
|
||||
@@ -446,7 +462,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -445,7 +461,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
if (!(immediate instanceof ImposterProtoChunk) && !(immediate instanceof net.minecraft.world.level.chunk.LevelChunk)) {
|
||||
return false; // not full status
|
||||
}
|
||||
@ -102,7 +102,7 @@ index 298012beaf6f587a05d230b7208325ea8c3ad811..f19bfe6d6d4d915876cea3e6ef792639
|
||||
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
|
||||
return true;
|
||||
}
|
||||
@@ -472,7 +488,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -471,7 +487,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
// we do this so we do not re-read the chunk data on disk
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index 298012beaf6f587a05d230b7208325ea8c3ad811..f19bfe6d6d4d915876cea3e6ef792639
|
||||
world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
|
||||
return true;
|
||||
// Paper end
|
||||
@@ -2148,6 +2164,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2147,6 +2163,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad(this.getHandle(), x, z, gen, ChunkStatus.FULL, true, priority, (c) -> {
|
||||
net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> {
|
||||
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c;
|
@ -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 dda33bd52d9c527c37f67b829010c27dba4b667a..e42b12839faab0c040495b00368b107b35b93283 100644
|
||||
index ce02077acd0958272e01e695c040a030eb8febdc..8e101269ca2edf5f3cc9c1ccedd03afaf1392d19 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -864,7 +864,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -872,7 +872,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
try {
|
||||
this.isSaving = true;
|
||||
@ -17,7 +17,7 @@ index dda33bd52d9c527c37f67b829010c27dba4b667a..e42b12839faab0c040495b00368b107b
|
||||
flag3 = this.saveAllChunks(suppressLogs, flush, force);
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
@@ -1394,13 +1394,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1401,13 +1401,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,10 +53,10 @@ index dda33bd52d9c527c37f67b829010c27dba4b667a..e42b12839faab0c040495b00368b107b
|
||||
// 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 324a99ea21bccdf27c15248ae2811048efaa2595..998c333c0b7064e9077c2b30d6b36623ffc419c7 100644
|
||||
index 298e4468f7b5346733257f7117f76c66e9a1d8f0..d1652c237b2b272f0dfe80f774cff16056f39046 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -601,6 +601,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -602,6 +602,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
} // Paper - Timings
|
||||
}
|
||||
|
||||
@ -73,10 +73,10 @@ index 324a99ea21bccdf27c15248ae2811048efaa2595..998c333c0b7064e9077c2b30d6b36623
|
||||
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 6cdd0c13189f372dcf562c4190f4c6155b33dd13..5537903d6e1233489d31127f3af3d99c40258eb4 100644
|
||||
index 3fff95ffe0e343f873dda31507567cbd8fa2460e..772512a77f67ef83b99241de930c07a0b8c96c8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1123,6 +1123,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1144,6 +1144,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return !this.server.isUnderSpawnProtection(this, pos, player) && this.getWorldBorder().isWithinBounds(pos);
|
||||
}
|
||||
|
||||
@ -115,10 +115,10 @@ index 6cdd0c13189f372dcf562c4190f4c6155b33dd13..5537903d6e1233489d31127f3af3d99c
|
||||
// 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 c32f09e993ef25876373a34d148b0452ea03bcf0..b41fddf5225b9d7cccf73b91dd0c14897c990346 100644
|
||||
index 39c3c4a5239c177ef81b13be1139300bb9af1dea..eafc2651a15e1e905a6f2343760969cb5bd414c3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -179,6 +179,7 @@ import org.bukkit.inventory.MainHand;
|
||||
@@ -181,6 +181,7 @@ import org.bukkit.inventory.MainHand;
|
||||
public class ServerPlayer extends Player {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@ -127,10 +127,10 @@ index c32f09e993ef25876373a34d148b0452ea03bcf0..b41fddf5225b9d7cccf73b91dd0c1489
|
||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
|
||||
public ServerGamePacketListenerImpl connection;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1ec5facab133f265b280738afe9917592384984e..80c98d35293cd5a25982d04c980c9fd7e7b4670c 100644
|
||||
index 2c0e45b3d0f5a1178ccecc851a110e5dc6f2023c..b4e9462cbeec9ec8bd25b79839fde7d92410057f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -569,6 +569,7 @@ public abstract class PlayerList {
|
||||
@@ -577,6 +577,7 @@ public abstract class PlayerList {
|
||||
protected void save(ServerPlayer player) {
|
||||
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
|
||||
if (!player.didPlayerJoinEvent) return; // Paper - If we never fired PJE, we disconnected during login. Data has not changed, and additionally, our saved vehicle is not loaded! If we save now, we will lose our vehicle (CraftBukkit bug)
|
||||
@ -138,7 +138,7 @@ index 1ec5facab133f265b280738afe9917592384984e..80c98d35293cd5a25982d04c980c9fd7
|
||||
this.playerIo.save(player);
|
||||
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
|
||||
|
||||
@@ -1171,10 +1172,22 @@ public abstract class PlayerList {
|
||||
@@ -1181,10 +1182,22 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
@ -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 0778fdd4f47015787f7ffbfb39c31ec0e1c039bd..912fd5135e89348bdd3c0a8b6c07860ebc106df3 100644
|
||||
index 07593ecae8fb00412c5342681263e3333d3809c0..42ea3573c0e8559a264fd24fc09c3a5cd7628d9b 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
@@ -181,6 +181,12 @@ public class CompoundTag implements Tag {
|
||||
@@ -194,6 +194,12 @@ public class CompoundTag implements Tag {
|
||||
}
|
||||
|
||||
public void putUUID(String key, UUID value) {
|
||||
@ -24,7 +24,7 @@ index 0778fdd4f47015787f7ffbfb39c31ec0e1c039bd..912fd5135e89348bdd3c0a8b6c07860e
|
||||
this.tags.put(key, NbtUtils.createUUID(value));
|
||||
}
|
||||
|
||||
@@ -189,10 +195,20 @@ public class CompoundTag implements Tag {
|
||||
@@ -202,10 +208,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) {
|
||||
@ -46,10 +46,10 @@ index 0778fdd4f47015787f7ffbfb39c31ec0e1c039bd..912fd5135e89348bdd3c0a8b6c07860e
|
||||
return tag != null && tag.getType() == IntArrayTag.TYPE && ((IntArrayTag)tag).getAsIntArray().length == 4;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
index d6d8adf1e49cdb74dc5d8e2e60bcaca7c5e1c16d..b31741a9c3363e4288636ceff9b38c598a84aa43 100644
|
||||
index c0fe7c576f2361e599bc23003da7c49bb7cb62b2..846f8267f7d24f52b84314483c8230c620ef2dce 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
@@ -75,6 +75,11 @@ public final class NbtUtils {
|
||||
@@ -79,6 +79,11 @@ public final class NbtUtils {
|
||||
if (nbt.contains("Name", 8)) {
|
||||
string = nbt.getString("Name");
|
||||
}
|
@ -9,10 +9,10 @@ growing to large sizes and preventing login.
|
||||
This now automatically cleans up the extra properties.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
index b31741a9c3363e4288636ceff9b38c598a84aa43..46681f3fa63516aa750de11cf1dee17cb3734fcd 100644
|
||||
index 846f8267f7d24f52b84314483c8230c620ef2dce..c33a6d3d5700a7ec1dae2434d00cf0f480a5f0e5 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
@@ -93,7 +93,8 @@ public final class NbtUtils {
|
||||
@@ -97,7 +97,8 @@ public final class NbtUtils {
|
||||
for(String string2 : compoundTag.getAllKeys()) {
|
||||
ListTag listTag = compoundTag.getList(string2, 10);
|
||||
|
||||
@ -23,10 +23,10 @@ index b31741a9c3363e4288636ceff9b38c598a84aa43..46681f3fa63516aa750de11cf1dee17c
|
||||
String string3 = compoundTag2.getString("Value");
|
||||
if (compoundTag2.contains("Signature", 8)) {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/PlayerHeadItem.java b/src/main/java/net/minecraft/world/item/PlayerHeadItem.java
|
||||
index 2fb1500e9d3202b6377bf4d8e50102a98f409148..72a0c7ad03b18c3156b4f3c7240f7551583f981c 100644
|
||||
index 8fb0d34e3c9a15e763f3ad493a31ba8d59b240d7..045a988fc11587e2d7bd78b43f058092c880272c 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/PlayerHeadItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/PlayerHeadItem.java
|
||||
@@ -52,6 +52,18 @@ public class PlayerHeadItem extends StandingAndWallBlockItem {
|
||||
@@ -53,6 +53,18 @@ public class PlayerHeadItem extends StandingAndWallBlockItem {
|
||||
});
|
||||
// CraftBukkit start
|
||||
} else {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Convert legacy attributes in Item Meta
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java
|
||||
index 0520c45197629cbdc2777d9ae11eef572e793160..46c313d581b9af6aa0a48f97ae3cc800a88535f2 100644
|
||||
index fac4097be2ee3d0bffbc92fb217f98831e78d6b3..233e372ba5d785352c9ac12dac37395bac63315c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java
|
||||
@@ -11,6 +11,20 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||
@@ -12,6 +12,20 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||
public class CraftAttributeMap implements Attributable {
|
||||
|
||||
private final AttributeMap handle;
|
@ -6,7 +6,7 @@ Subject: [PATCH] Remove some streams from structures
|
||||
This showed up a lot in the spark profiler, should have a low-medium performance improvement.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/Beardifier.java b/src/main/java/net/minecraft/world/level/levelgen/Beardifier.java
|
||||
index 24f58441ae7b43a62d74aa55e9808c1c65f466e4..99e329d374b60ebf77f93551f6bf83b9bca1e4b8 100644
|
||||
index ad82bed470471dcb11035be2cb54972e4f2c1c9b..af63ad44103e0ca1dfe17d468e41531728c957aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/Beardifier.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/Beardifier.java
|
||||
@@ -36,9 +36,10 @@ public class Beardifier implements DensityFunctions.BeardifierOrMarker {
|
@ -5,20 +5,30 @@ Subject: [PATCH] Remove streams from classes related villager gossip
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||
index 92beb137d86ae89d90b1963a024c0be308d81a42..e377dd95b7824804611d0e4ce825576ed533e73e 100644
|
||||
index 4e7b7a3910840908b73c80faf9a83b728186f775..f64da4c3bd4301453688974182e7793804655d2c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
|
||||
@@ -58,8 +58,21 @@ public class GossipContainer {
|
||||
@@ -30,7 +30,7 @@ import org.slf4j.Logger;
|
||||
public class GossipContainer {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final int DISCARD_THRESHOLD = 2;
|
||||
- private final Map<UUID, GossipContainer.EntityGossips> gossips = Maps.newHashMap(); public Map<UUID, GossipContainer.EntityGossips> getReputations() { return this.gossips; } // Paper - add getter for reputations
|
||||
+ private final Map<UUID, GossipContainer.EntityGossips> gossips = Maps.newHashMap();
|
||||
|
||||
@VisibleForDebug
|
||||
public Map<UUID, Object2IntMap<GossipType>> getGossipEntries() {
|
||||
@@ -61,8 +61,22 @@ public class GossipContainer {
|
||||
});
|
||||
}
|
||||
|
||||
+ // Paper start - Remove streams from reputation
|
||||
+ private List<GossipContainer.GossipEntry> decompress() {
|
||||
+ List<GossipContainer.GossipEntry> list = new it.unimi.dsi.fastutil.objects.ObjectArrayList<>();
|
||||
+ for (Map.Entry<UUID, GossipContainer.EntityGossips> entry : getReputations().entrySet()) {
|
||||
+ for (Map.Entry<UUID, GossipContainer.EntityGossips> entry : this.gossips.entrySet()) {
|
||||
+ for (GossipContainer.GossipEntry cur : entry.getValue().decompress(entry.getKey())) {
|
||||
+ if (cur.weightedValue() != 0)
|
||||
+ if (cur.weightedValue() != 0) {
|
||||
+ list.add(cur);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return list;
|
||||
@ -26,21 +36,21 @@ index 92beb137d86ae89d90b1963a024c0be308d81a42..e377dd95b7824804611d0e4ce825576e
|
||||
+ // Paper end
|
||||
+
|
||||
private Collection<GossipContainer.GossipEntry> selectGossipsForTransfer(RandomSource random, int count) {
|
||||
- List<GossipContainer.GossipEntry> list = this.unpack().collect(Collectors.toList());
|
||||
- List<GossipContainer.GossipEntry> list = this.unpack().toList();
|
||||
+ List<GossipContainer.GossipEntry> list = this.decompress(); // Paper - Remove streams from reputation
|
||||
if (list.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
} else {
|
||||
@@ -153,7 +166,7 @@ public class GossipContainer {
|
||||
@@ -156,7 +170,7 @@ public class GossipContainer {
|
||||
}
|
||||
|
||||
public <T> Dynamic<T> store(DynamicOps<T> ops) {
|
||||
- return new Dynamic<>(ops, ops.createList(this.unpack().map((entry) -> {
|
||||
+ return new Dynamic<>(ops, ops.createList(this.decompress().stream().map((entry) -> { // Paper - remove streams from reputation
|
||||
return entry.store(ops);
|
||||
}).map(Dynamic::getValue)));
|
||||
public <T> T store(DynamicOps<T> ops) {
|
||||
- return GossipContainer.GossipEntry.LIST_CODEC.encodeStart(ops, this.unpack().toList()).resultOrPartial((error) -> {
|
||||
+ return GossipContainer.GossipEntry.LIST_CODEC.encodeStart(ops, this.decompress()).resultOrPartial((error) -> {
|
||||
LOGGER.warn("Failed to serialize gossips: {}", (Object)error);
|
||||
}).orElseGet(ops::emptyList);
|
||||
}
|
||||
@@ -179,11 +192,23 @@ public class GossipContainer {
|
||||
@@ -184,11 +198,23 @@ public class GossipContainer {
|
||||
final Object2IntMap<GossipType> entries = new Object2IntOpenHashMap<>();
|
||||
|
||||
public int weightedValue(Predicate<GossipType> gossipTypeFilter) {
|
@ -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 3bda8128c2956d817677e28ff87c9c5ed61c8bd2..ceb7123362ba85df825a50c035a399174b6634dc 100644
|
||||
index e900c64b8b07dc9cf47cc565e60df6781ca95756..6cc448268f786b06529f5488fa3153f6c8cc8fdf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1271,5 +1271,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1273,5 +1273,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason() {
|
||||
return getHandle().spawnReason;
|
||||
}
|
@ -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 2650deb381bae30593128fc003c042f42110802c..85dead69d41ca10ad76fdab13da8548d359142b0 100644
|
||||
index 29c605ff88956435752412847734992fe6bcd55d..36107f22914ec47212e41c17852fb486c67e5c52 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -166,6 +166,44 @@ public final class ItemStack {
|
||||
@@ -170,6 +170,44 @@ public final class ItemStack {
|
||||
list.sort((java.util.Comparator<? super net.minecraft.nbt.Tag>) enchantSorter); // Paper
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
@ -53,7 +53,7 @@ index 2650deb381bae30593128fc003c042f42110802c..85dead69d41ca10ad76fdab13da8548d
|
||||
// Paper end
|
||||
|
||||
public ItemStack(ItemLike item) {
|
||||
@@ -220,6 +258,7 @@ public final class ItemStack {
|
||||
@@ -224,6 +262,7 @@ public final class ItemStack {
|
||||
this.tag = nbttagcompound.getCompound("tag").copy();
|
||||
// CraftBukkit end
|
||||
this.processEnchantOrder(this.tag); // Paper
|
@ -5,10 +5,10 @@ Subject: [PATCH] Spawn player in correct world on login
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 80c98d35293cd5a25982d04c980c9fd7e7b4670c..55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277 100644
|
||||
index b4e9462cbeec9ec8bd25b79839fde7d92410057f..b4ee231092c0e7a9e4a6ee978d9d8de320ac1cad 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -203,7 +203,18 @@ public abstract class PlayerList {
|
||||
@@ -209,7 +209,18 @@ public abstract class PlayerList {
|
||||
}String lastKnownName = s; // Paper
|
||||
// CraftBukkit end
|
||||
|
@ -20,7 +20,7 @@ index eb22059fe008c3d3fc0364a7f85f91b4cca8b328..506d758efbf16da9467f120321d2359a
|
||||
|
||||
public int getCost() {
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java b/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java
|
||||
index fc2b400c58ddbd7b012707c61d9a37363d351251..4f5593d387545545e30475d3edaa92a4306ba96b 100644
|
||||
index 74447bd2ff36c5360db52d2a56fe3fbe56aee7d2..7733b5271307849e3e56c6089649c4caa7c0ac1d 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java
|
||||
@@ -150,6 +150,7 @@ public class CartographyTableMenu extends AbstractContainerMenu {
|
||||
@ -32,7 +32,7 @@ index fc2b400c58ddbd7b012707c61d9a37363d351251..4f5593d387545545e30475d3edaa92a4
|
||||
|
||||
private void setupResultSlot(ItemStack map, ItemStack item, ItemStack oldResult) {
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
index aa0ba9c7dcb0ee81c9081031c447eeab61d92a10..7a0c38c743ef02f5b9c052f88c2d6429a53b8286 100644
|
||||
index 9010656b7f013d50872017a298368ec8a3016e9c..00e2148419517c94def76f0a75562cc0093ea3ed 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
@@ -159,6 +159,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
@ -44,7 +44,7 @@ index aa0ba9c7dcb0ee81c9081031c447eeab61d92a10..7a0c38c743ef02f5b9c052f88c2d6429
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java b/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java
|
||||
index f5e52220abc5c678c090b32d83eb9644fa91ce9d..35575434f3c90f1bd23df6584ee8a5a991f93f9f 100644
|
||||
index a0caf5d4085305121f77089dc50e4b32cd1a8d9b..c34a66310969c3c837d09693159b827c1edddd3b 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java
|
||||
@@ -78,6 +78,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu {
|
||||
@ -56,7 +56,7 @@ index f5e52220abc5c678c090b32d83eb9644fa91ce9d..35575434f3c90f1bd23df6584ee8a5a9
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
||||
index d028ad0ab0e800b0fd93362d21942dff392f24af..942b4cc710bede4c942d269dcfc14ae105ab848d 100644
|
||||
index cb08da8b5f6abc644ff5834f2ca32acf4fd0a255..b7f3dc81ecac0d814203028a9213f304bcc19574 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
||||
@@ -248,7 +248,8 @@ public class LoomMenu extends AbstractContainerMenu {
|
||||
@ -70,11 +70,11 @@ index d028ad0ab0e800b0fd93362d21942dff392f24af..942b4cc710bede4c942d269dcfc14ae1
|
||||
this.resultSlot.set(ItemStack.EMPTY);
|
||||
this.selectablePatterns = List.of();
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java
|
||||
index 92dd2ea23185bba311e184b2ac9744a423c102ea..71bb09e3d31f098503d0e1bdf073b60f07d76ed0 100644
|
||||
index 9c898862d665d073cccd0c33e5b0435c52fef5b6..c4cdf54dc5f7f84474a7af7ff43c5f986311b210 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java
|
||||
@@ -76,6 +76,7 @@ public class SmithingMenu extends ItemCombinerMenu {
|
||||
// CraftBukkit end
|
||||
@@ -79,6 +79,7 @@ public class SmithingMenu extends ItemCombinerMenu {
|
||||
}
|
||||
}
|
||||
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareResultEvent(this, RESULT_SLOT); // Paper
|
||||
@ -82,7 +82,7 @@ index 92dd2ea23185bba311e184b2ac9744a423c102ea..71bb09e3d31f098503d0e1bdf073b60f
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||
index cdebd0cdf6eb901464cf4c16089b10ea0147b54d..b47dc7671fab2117b989d647d7e8e36d12af5f76 100644
|
||||
index 78c1bd1c709ef29ccfa75fa87d8af1217cc57b59..4ee54e3a61588e5574e3f7ba06a73bbd73975957 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||
@@ -176,6 +176,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
||||
@ -94,7 +94,7 @@ index cdebd0cdf6eb901464cf4c16089b10ea0147b54d..b47dc7671fab2117b989d647d7e8e36d
|
||||
|
||||
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 359964cd8820b8ef8b8dba5501119164cebcf743..2809ec8fcd43d096a187fc2fbda042a81d301c0c 100644
|
||||
index 571eb0eea3bf7b0cf567cdf571699e729402fda0..88fb677231e13d714e20ae55c08443212b0512a9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1584,19 +1584,44 @@ public class CraftEventFactory {
|
@ -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 a337ce97a31998a63e7c329ac94cad9a5f783a5c..9c5421b9aa35c5f90a51ed097e68c5143054e966 100644
|
||||
index b6741c72216378368392e65aad3ff75a3191d0ce..b96a783e4df3a5ce1115d05e00e1ae2e0cd6378d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3446,7 +3446,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3471,7 +3471,7 @@ public abstract class LivingEntity extends Entity {
|
||||
Entity entity = this.getVehicle();
|
||||
|
||||
super.stopRiding(suppressCancellation); // Paper - suppress
|
@ -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 672e296cec289abd3bf797d84e16983ca50907be..aec921477e035095d569eab3335175b93a65e672 100644
|
||||
index 1c243b60bf955841d69d1a5ace9d243edf88a6fb..19f05a2d202e3b71391d20acbf54392f644978e4 100644
|
||||
--- a/src/main/java/net/minecraft/network/ConnectionProtocol.java
|
||||
+++ b/src/main/java/net/minecraft/network/ConnectionProtocol.java
|
||||
@@ -302,6 +302,7 @@ public enum ConnectionProtocol {
|
||||
@@ -300,6 +300,7 @@ public enum ConnectionProtocol {
|
||||
|
||||
@Nullable
|
||||
public Packet<?> createPacket(int id, FriendlyByteBuf buf) {
|
@ -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 da92f324322f4fb18f9aa72c4298ffc8ab040953..3b1e17a8733de823b36315c81e8ca5884e83368e 100644
|
||||
index f268fc2914996698490b84c4a30bac819c581d05..61d4a58ab25ce3bdf7ced426d2f92bc75ef02f7d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -199,6 +199,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
@@ -200,6 +200,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
|
||||
++this.inGroundTime;
|
||||
} else {
|
@ -26,10 +26,10 @@ 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 891d1fb88d8de9d1b34f300ba640cfc6fbd8a4de..2ff021966426dd6c7c1081fbcfacf4677b404264 100644
|
||||
index b8f5b5895bf75aa8e08b2b0431ef6fdacd235430..c2af60bdb755034e46b85143826a29c4482d58f5 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -59,7 +59,7 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
@@ -61,7 +61,7 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
private final Vec2 rotation;
|
||||
private final CommandSigningContext signingContext;
|
||||
private final TaskChainer chatMessageChainer;
|
||||
@ -38,7 +38,7 @@ index 891d1fb88d8de9d1b34f300ba640cfc6fbd8a4de..2ff021966426dd6c7c1081fbcfacf467
|
||||
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) {
|
||||
@@ -196,9 +196,11 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
@@ -194,9 +194,11 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
@Override
|
||||
public boolean hasPermission(int level) {
|
||||
// CraftBukkit start
|
@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is
|
||||
still at a respawn anchor.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277..7528491e129b250da5cb505d7befceee8cfe74e6 100644
|
||||
index b4ee231092c0e7a9e4a6ee978d9d8de320ac1cad..62fe8133e10ca4e04670b504bf18db9f5e7512e0 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -842,6 +842,7 @@ public abstract class PlayerList {
|
||||
@@ -850,6 +850,7 @@ public abstract class PlayerList {
|
||||
// Paper start
|
||||
boolean isBedSpawn = false;
|
||||
boolean isRespawn = false;
|
||||
@ -21,7 +21,7 @@ index 55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277..7528491e129b250da5cb505d7befceee
|
||||
// Paper end
|
||||
|
||||
// CraftBukkit start - fire PlayerRespawnEvent
|
||||
@@ -852,7 +853,7 @@ public abstract class PlayerList {
|
||||
@@ -860,7 +861,7 @@ public abstract class PlayerList {
|
||||
Optional optional;
|
||||
|
||||
if (blockposition != null) {
|
||||
@ -30,7 +30,7 @@ index 55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277..7528491e129b250da5cb505d7befceee
|
||||
} else {
|
||||
optional = Optional.empty();
|
||||
}
|
||||
@@ -896,7 +897,12 @@ public abstract class PlayerList {
|
||||
@@ -904,7 +905,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
@ -44,7 +44,7 @@ index 55c5576bd76718a0cc5d8fbcb80eeeac8b6c9277..7528491e129b250da5cb505d7befceee
|
||||
if (!flag) entityplayer.reset(); // SPIGOT-4785
|
||||
isRespawn = true; // Paper
|
||||
} else {
|
||||
@@ -934,8 +940,12 @@ public abstract class PlayerList {
|
||||
@@ -944,8 +950,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
// entityplayer1.initInventoryMenu();
|
||||
entityplayer1.setHealth(entityplayer1.getHealth());
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SPIGOT-5824 Bukkit world-container is not used
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 151b13e257c09fc5c4bbccfc388b15ad76133909..3f7dde4fe1fdce3638d1db5e96a546b9fae90269 100644
|
||||
index 7c1ad1e39c3b3dfd476133ef4d938187b7a11f09..9b1ec0186e7dfa1591532fa887f27fa378fb1d95 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -154,8 +154,17 @@ public class Main {
|
||||
@@ -157,8 +157,17 @@ public class Main {
|
||||
return;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SPIGOT-5885 Unable to disable advancements
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 3f7dde4fe1fdce3638d1db5e96a546b9fae90269..13ef3bb2b84fac9a1be72b09e7e3c022fa08221a 100644
|
||||
index 9b1ec0186e7dfa1591532fa887f27fa378fb1d95..727efbe152dccabf130a6871e3d2582a5a733016 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -154,6 +154,7 @@ public class Main {
|
||||
@@ -157,6 +157,7 @@ public class Main {
|
||||
return;
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add missing strikeLighting call to
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index f19bfe6d6d4d915876cea3e6ef792639300fced1..643b682db12560fc3409ede861a4e0aea8fc5360 100644
|
||||
index f3723a8219881d55959e7231e230d28bfb521dcd..d9ac6e687ad7f4c2cfe6698cdf6e7d1d4652eb2b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2134,6 +2134,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2133,6 +2133,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
lightning.moveTo( loc.getX(), loc.getY(), loc.getZ() );
|
||||
lightning.visualOnly = true;
|
||||
lightning.isSilent = isSilent;
|
@ -9,10 +9,10 @@ the game, immediately stop the server to prevent data corruption.
|
||||
You can override this functionality at your own peril.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
index 89c367f542aee35ba9f596d678bfeb5412c1697d..4236cf65b893bc21d2597010a2f9745fc0e107a4 100644
|
||||
index f6d1eac46c619831e146c62a9c08d3305c63c7bc..f8edcc9697289c2cf43c9021d5518955d0d701e7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -126,9 +126,22 @@ public class ChunkSerializer {
|
||||
@@ -128,9 +128,22 @@ public class ChunkSerializer {
|
||||
return holder.protoChunk;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Brand support
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042d7e930fe 100644
|
||||
index f440d9446d738429e33ed1fa9fa495af67f6427a..8eeb521b11062ecc699813c2132f7edf655d8d09 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -298,6 +298,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@ -16,8 +16,8 @@ index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042
|
||||
+
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
this.lastSeenMessagesValidator = new LastSeenMessagesValidator();
|
||||
@@ -3454,6 +3456,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.lastSeenMessages = new LastSeenMessagesValidator(20);
|
||||
@@ -3326,6 +3328,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register");
|
||||
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
|
||||
|
||||
@ -26,7 +26,7 @@ index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042
|
||||
@Override
|
||||
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
@@ -3481,6 +3485,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3353,6 +3357,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
try {
|
||||
byte[] data = new byte[packet.data.readableBytes()];
|
||||
packet.data.readBytes(data);
|
||||
@ -42,7 +42,7 @@ index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042
|
||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
@@ -3490,6 +3503,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3362,6 +3375,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
}
|
||||
|
||||
@ -56,10 +56,10 @@ index f6012bf8134f0606710511150dd296a1d677334d..6e7d909bd87a1732e99c68d2baf57042
|
||||
return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index a9ec1f77b7b9e60d735c72a01f0bce32d3083cb9..d06d1bb3c426304aa222721285574368db24368e 100644
|
||||
index d9e278d2f7f4bc767c0211736817748d4ca6dae0..60e8e82a1fc255aa713808a78ae2dc73ef0b6be3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2764,6 +2764,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2766,6 +2766,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Paper end
|
||||
};
|
||||
|
@ -5,23 +5,23 @@ Subject: [PATCH] Add #setMaxPlayers API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 7528491e129b250da5cb505d7befceee8cfe74e6..fcd2f8514e60e1faafec787f162baf98663fb734 100644
|
||||
index 62fe8133e10ca4e04670b504bf18db9f5e7512e0..4b2862c6c5397ebec7cc22938b76ed0d24d7125f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -147,7 +147,7 @@ public abstract class PlayerList {
|
||||
public final PlayerDataStorage playerIo;
|
||||
@@ -152,7 +152,7 @@ public abstract class PlayerList {
|
||||
private boolean doWhiteList;
|
||||
private final RegistryAccess.Frozen registryHolder;
|
||||
private final LayeredRegistryAccess<RegistryLayer> registries;
|
||||
private final RegistryAccess.Frozen synchronizedRegistries;
|
||||
- protected final int maxPlayers;
|
||||
+ protected int maxPlayers; public final void setMaxPlayers(int maxPlayers) { this.maxPlayers = maxPlayers; } // Paper - remove final and add setter
|
||||
private int viewDistance;
|
||||
private int simulationDistance;
|
||||
private boolean allowCheatsForAllPlayers;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2aab13270af76bcc1b62787e9910d23d5ab56add..50a540f796f4d418ae5f5377b39a08bc3e02543e 100644
|
||||
index 0b6f9567aaad080ff2a21be9e17a93d2d24fd010..6e5f72f5d226b94603710d84f9054ce3aa4bd034 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -674,6 +674,13 @@ public final class CraftServer implements Server {
|
||||
@@ -687,6 +687,13 @@ public final class CraftServer implements Server {
|
||||
return this.playerList.getMaxPlayers();
|
||||
}
|
||||
|
@ -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 5537903d6e1233489d31127f3af3d99c40258eb4..12534be05aa56930cde39e6fef90d402b5eb7c4e 100644
|
||||
index 772512a77f67ef83b99241de930c07a0b8c96c8a..5f5cd9ae01039432c138ff901d7f3462c5a2e491 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1893,6 +1893,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1869,6 +1869,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
//ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(new BlockPosition(this.worldData.a(), 0, this.worldData.c()));
|
||||
|
||||
this.levelData.setSpawn(pos, angle);
|
||||
@ -17,10 +17,10 @@ index 5537903d6e1233489d31127f3af3d99c40258eb4..12534be05aa56930cde39e6fef90d402
|
||||
// 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 643b682db12560fc3409ede861a4e0aea8fc5360..ca768eea4f4ad7196f6f595516683b28372de71a 100644
|
||||
index d9ac6e687ad7f4c2cfe6698cdf6e7d1d4652eb2b..66d87216a3964c5fd39af564c3b4c40eee278c9a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -263,11 +263,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -262,11 +262,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public boolean setSpawnLocation(int x, int y, int z, float angle) {
|
||||
try {
|
||||
Location previousLocation = this.getSpawnLocation();
|
@ -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 e395628ccf59c1b7a4efcabb3c38e8a879b95e38..ee5e59c37301d9a806e2f696d52d9d217b232833 100644
|
||||
index 100d59c37cf699bd33bdf0c3fc085dfe0065b93a..3e4ac4020c9f51e634eadd43243d34267bea4b22 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -932,4 +932,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
@@ -938,4 +938,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
|
||||
throw new IllegalArgumentException("Cannot spawn an entity for " + clazz.getName());
|
||||
}
|
@ -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 b18b0e1b5e059f08fd3117eaa0fb28a10fac6562..01477e7240f9e33d08d416a7d40ee10f3e5d4abf 100644
|
||||
index 7f769f72c847d4894c1cd7a3b09c58f51c392388..446b0e74c406d3d57268d8332ea4c29a4dd5f9eb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -187,6 +187,15 @@ public class Explosion {
|
||||
@@ -183,6 +183,15 @@ public class Explosion {
|
||||
|
||||
if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockposition, iblockdata, f)) {
|
||||
set.add(blockposition);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add zombie targets turtle egg config
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index 473782e8b6a760aec492fa28270a7eb05a484e78..d5633a869819b26376c01d38e08763457e3b7b68 100644
|
||||
index 23fe7c324b8faca954dbef1a5703db6a8763edf6..5d295e1d66b57bbecebc5415b3c64cb38c7249d2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -107,7 +107,7 @@ public class Zombie extends Monster {
|
||||
@@ -108,7 +108,7 @@ public class Zombie extends Monster {
|
||||
|
||||
@Override
|
||||
protected void registerGoals() {
|
@ -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 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1bb4d634a3 100644
|
||||
index bef1da32111cd86358c434f095e91493fadbeed6..004894157f732046e89f124872da86c79af1676f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
@@ -253,6 +253,116 @@ public class RedStoneWireBlock extends Block {
|
||||
@@ -252,6 +252,116 @@ public class RedStoneWireBlock extends Block {
|
||||
return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER);
|
||||
}
|
||||
|
||||
@ -1106,7 +1106,7 @@ index 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1b
|
||||
private void updatePowerStrength(Level world, BlockPos pos, BlockState state) {
|
||||
int i = this.calculateTargetStrength(world, pos);
|
||||
|
||||
@@ -322,6 +432,7 @@ public class RedStoneWireBlock extends Block {
|
||||
@@ -321,6 +431,7 @@ public class RedStoneWireBlock extends Block {
|
||||
return Math.max(i, j - 1);
|
||||
}
|
||||
|
||||
@ -1114,7 +1114,7 @@ index 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1b
|
||||
private int getWireSignal(BlockState state) {
|
||||
return state.is((Block) this) ? (Integer) state.getValue(RedStoneWireBlock.POWER) : 0;
|
||||
}
|
||||
@@ -344,7 +455,7 @@ public class RedStoneWireBlock extends Block {
|
||||
@@ -343,7 +454,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 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1b
|
||||
Iterator iterator = Direction.Plane.VERTICAL.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -371,7 +482,7 @@ public class RedStoneWireBlock extends Block {
|
||||
@@ -370,7 +481,7 @@ public class RedStoneWireBlock extends Block {
|
||||
world.updateNeighborsAt(pos.relative(enumdirection), this);
|
||||
}
|
||||
|
||||
@ -1132,7 +1132,7 @@ index 74241146a034c5817cddc608c095d829d765f06a..3cba4921daad4b346a3f964f0fa48e1b
|
||||
this.updateNeighborsOfNeighboringWires(world, pos);
|
||||
}
|
||||
}
|
||||
@@ -406,7 +517,7 @@ public class RedStoneWireBlock extends Block {
|
||||
@@ -405,7 +516,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)) {
|
@ -25,10 +25,10 @@ index 34e4d00ede62be50808a2782e54da987cc62c9af..e12c67bdfa326b3f52f6a4973063cef4
|
||||
|
||||
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 c3027735725c68eeb1b42a42ebb8646f3a35a518..8eec59b01b8366a0ee8c926d9bf77b22a8d75cb7 100644
|
||||
index d92aaec3a4535d3683e842f9a712ba06c03014ef..3042af47778f5d6c878a7a734a8eb92e952c01a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -107,7 +107,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se
|
||||
@@ -102,7 +102,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
// CraftBukkit start
|
||||
@Deprecated
|
||||
public void disconnect(String s) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] PortalCreateEvent needs to know its entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 85dead69d41ca10ad76fdab13da8548d359142b0..0bd7b64bd1c468221d3354494527b456bc02437a 100644
|
||||
index 36107f22914ec47212e41c17852fb486c67e5c52..40e2fc6746b3a243c82d6100578ad510b193faa0 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -431,7 +431,7 @@ public final class ItemStack {
|
||||
@@ -439,7 +439,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
|
||||
@ -52,7 +52,7 @@ index 378d4316a51d48cb84e2d8a553f7b28bae55630e..922b5b22a4ccfeead9d6d2b9a2a2b3cc
|
||||
|
||||
}
|
||||
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 8d79612cdba48756bb0352c41b98f8a9ea489ff6..f17233ea94d61af41b4db1696b114e9c721466f8 100644
|
||||
index 68be050e5187d372a65290c01c69f3582053f7a1..cfddfcad9b09970b28dccd2dcd80be2c2dbed0e7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.core.Direction;
|
||||
@ -79,10 +79,10 @@ index 8d79612cdba48756bb0352c41b98f8a9ea489ff6..f17233ea94d61af41b4db1696b114e9c
|
||||
|
||||
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 b2ab7749e3ddf124d5ef97271a76dc875a650771..97b0e820d353e8ab4ca9d9e2efd0a8819119b2ab 100644
|
||||
index 6a549229037c8b8c2093feb563780ef8565d709f..efbcd2b78d75481793e0f29a7431d3eb76489abc 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
|
||||
@@ -35,6 +35,7 @@ import net.minecraft.world.item.DyeColor;
|
||||
@@ -39,6 +39,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;
|
||||
@ -90,7 +90,7 @@ index b2ab7749e3ddf124d5ef97271a76dc875a650771..97b0e820d353e8ab4ca9d9e2efd0a881
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.EmptyBlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
@@ -136,6 +137,12 @@ public abstract class BlockBehaviour {
|
||||
@@ -142,6 +143,12 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
DebugPackets.sendNeighborsUpdatePacket(world, pos);
|
||||
}
|
||||
|
||||
@ -104,18 +104,18 @@ index b2ab7749e3ddf124d5ef97271a76dc875a650771..97b0e820d353e8ab4ca9d9e2efd0a881
|
||||
@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 4d9023d1baa06802ab97af4be2739c13dee4f9b9..0ef049f0fac81312bee4f0e0c14dc3e74b09d272 100644
|
||||
index bc0dfa8efe0b2a891c000e750f436db632607ada..c461e0d04047db9c0c5ecc04063cebd38bf96ec2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityDimensions;
|
||||
+import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.NetherPortalBlock;
|
||||
@@ -184,7 +185,10 @@ public class PortalShape {
|
||||
@@ -190,7 +191,10 @@ public class PortalShape {
|
||||
}
|
||||
|
||||
// CraftBukkit start - return boolean
|
||||
@ -127,7 +127,7 @@ index 4d9023d1baa06802ab97af4be2739c13dee4f9b9..0ef049f0fac81312bee4f0e0c14dc3e7
|
||||
org.bukkit.World bworld = this.level.getMinecraftWorld().getWorld();
|
||||
|
||||
// Copy below for loop
|
||||
@@ -194,7 +198,7 @@ public class PortalShape {
|
||||
@@ -200,7 +204,7 @@ public class PortalShape {
|
||||
this.blocks.setBlock(blockposition, iblockdata, 18);
|
||||
});
|
||||
|
@ -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 ea3358905dcd39a1a855d98570457c65dcd7513d..396fb96abed1e77893d8ee8a15cff18cad804475 100644
|
||||
index 7e97b09376b1e9000511f56f3406dba550ba2612..89b8abc3e7e946aae2ab3d2c870f2d2c95f9671d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -668,5 +668,15 @@ public class CraftBlock implements Block {
|
||||
@@ -670,5 +670,15 @@ public class CraftBlock implements Block {
|
||||
public org.bukkit.SoundGroup getBlockSoundGroup() {
|
||||
return org.bukkit.craftbukkit.CraftSoundGroup.getSoundGroup(this.getNMS().getSoundType());
|
||||
}
|
||||
@ -30,7 +30,7 @@ index ea3358905dcd39a1a855d98570457c65dcd7513d..396fb96abed1e77893d8ee8a15cff18c
|
||||
// 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 a859a675b4bc543e139358223cc92ad5eee3ddb5..31a22f26070059e5379730c1940ff1c5fb109be1 100644
|
||||
index e8334e2264510f5101e80b4f130e7ae1442560d7..57decf4156f176ebcc988478c17856cbc555c5e4 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 {
|
||||
@ -46,10 +46,10 @@ index a859a675b4bc543e139358223cc92ad5eee3ddb5..31a22f26070059e5379730c1940ff1c5
|
||||
|
||||
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index b38b2b3855583b26d7ed2ede041a73cf14cbe81c..8b0090ba3359c68aa98c0cf74e0dc0b3e9143577 100644
|
||||
index cb7fd05f498448c87525eeeb012d055f90bac05e..30fe764640c8dad4b0f28486d00aa58a17bc7452 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -483,6 +483,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -481,6 +481,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
|
||||
return compound;
|
||||
}
|
@ -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 f05923a6292f02a01791627abce2770daff24b6a..f3a6a4d97b5be2e75c438a6f7010a8f588afe86c 100644
|
||||
index 6cdce121f1f04e2ca23cdbdf0844aa118be5dec8..b7a53edbf6c4730ae65a8e5fb414feaef9bdf1b7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -405,5 +405,40 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -430,5 +430,40 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
|
||||
return nms != null ? net.minecraft.locale.Language.getInstance().getOrDefault(nms.getItem().getDescriptionId(nms)) : null;
|
||||
}
|
@ -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 e42b12839faab0c040495b00368b107b35b93283..83a9c7f8a92055da43854d16fffe6892beff8c6b 100644
|
||||
index 8e101269ca2edf5f3cc9c1ccedd03afaf1392d19..8ce413404930cca3a470bb58d73b9bd0c9a9c2d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2026,6 +2026,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2022,6 +2022,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 e42b12839faab0c040495b00368b107b35b93283..83a9c7f8a92055da43854d16fffe6892
|
||||
|
||||
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 514e1ab74cd24cfcf1dd031e69a8ebfaddf9d3dc..d02a5e383190fc4713141d953efc111bb2f7f89c 100644
|
||||
index 6182ce8c32a334d3488c03f42bf3befcc0b80503..76efbcb951b133246bd9cbd8808f900f958d9298 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
@@ -506,9 +506,39 @@ public class CraftBlockData implements BlockData {
|
||||
@@ -509,9 +509,39 @@ public class CraftBlockData implements BlockData {
|
||||
Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user