mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 03:55:14 +01:00
Patches!
This commit is contained in:
parent
0225537fd1
commit
906f906089
@ -5,18 +5,18 @@ Subject: [PATCH] Configurable container update tick rate
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index e3e96008d69926c831e5f42b28e1e70160a3c5bd..50264a1da70f120f9adf1619dd72d834ba14e499 100644
|
index ab2336a30c1ffc1698c327c031a648d4121c116e..532282ba4432f55596337f7a0898ecc3d5dc2148 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -247,6 +247,7 @@ public class ServerPlayer extends Player {
|
@@ -262,6 +262,7 @@ public class ServerPlayer extends Player {
|
||||||
private RemoteChatSession chatSession;
|
public final Object object;
|
||||||
private int containerCounter;
|
private int containerCounter;
|
||||||
public boolean wonGame;
|
public boolean wonGame;
|
||||||
+ private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
+ private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public String displayName;
|
public CraftPlayer.TransferCookieConnection transferCookieConnection;
|
||||||
@@ -639,7 +640,12 @@ public class ServerPlayer extends Player {
|
@@ -679,7 +680,12 @@ public class ServerPlayer extends Player {
|
||||||
--this.invulnerableTime;
|
--this.invulnerableTime;
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Use UserCache for player heads
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||||
index 51e94e6f97a7c75e2281ad751c8e2dbee2e28afd..062594cebbe8cc0a0c94ecf7c8da4ee349a27521 100644
|
index 271255fb1daf297d066bcea2a8539b25d2cc0337..d20ae5345d85dee1bcc83a45837d2288a6da49be 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||||
@@ -211,7 +211,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
@@ -202,7 +202,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
this.setProfile(null);
|
this.setProfile(null);
|
||||||
} else {
|
} else {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 673141ab586057b2d05b3921cc4d42b4f5e049ab..3f910b1712c41e91de99ad00a90e0f3081f94deb 100644
|
index b638e223c9ac1019fac9d1a8203feac90cfcc724..dac9c71d696a3fd1554408a6beb6840382bbc30c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -708,9 +708,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -700,9 +700,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
boolean flag = this.tickRateManager().runsNormally();
|
boolean flag = this.tickRateManager().runsNormally();
|
||||||
|
|
||||||
int tilesThisCycle = 0;
|
int tilesThisCycle = 0;
|
@ -12,10 +12,10 @@ improve setPosition to use raw
|
|||||||
public net.minecraft.world.entity.Entity setRot(FF)V
|
public net.minecraft.world.entity.Entity setRot(FF)V
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 72488b0d499e4e0d0ccba38622cc5a3f88a9e3fa..50ceb120d04c3149dd1cca7908a9ea862b25e5ab 100644
|
index e8377a2301e0e6c560a304ecd93dc1f90ee474eb..8f3bcb7183ed09e9c2a16e26b5b3ac125aa57d90 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -228,7 +228,7 @@ public abstract class PlayerList {
|
@@ -226,7 +226,7 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
// Spigot start - spawn location event
|
// Spigot start - spawn location event
|
||||||
Player spawnPlayer = player.getBukkitEntity();
|
Player spawnPlayer = player.getBukkitEntity();
|
||||||
@ -24,7 +24,7 @@ index 72488b0d499e4e0d0ccba38622cc5a3f88a9e3fa..50ceb120d04c3149dd1cca7908a9ea86
|
|||||||
this.cserver.getPluginManager().callEvent(ev);
|
this.cserver.getPluginManager().callEvent(ev);
|
||||||
|
|
||||||
Location loc = ev.getSpawnLocation();
|
Location loc = ev.getSpawnLocation();
|
||||||
@@ -236,7 +236,10 @@ public abstract class PlayerList {
|
@@ -234,7 +234,10 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
player.spawnIn(worldserver1);
|
player.spawnIn(worldserver1);
|
||||||
player.gameMode.setLevel((ServerLevel) player.level());
|
player.gameMode.setLevel((ServerLevel) player.level());
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Disabling Cat Chest Detection
|
|||||||
Offers a gameplay feature to stop cats from blocking chests
|
Offers a gameplay feature to stop cats from blocking chests
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
||||||
index 3d153e5c48bc80ec969de9a32113537e03fb812b..305bce4d833116cc21e64fdcdfe13f03e94ff4ba 100644
|
index e0033b6a3beafa52f18f3aa3cbc87daa0af681ad..abd33cdfcf7c8851f7191612bcdb377bcdfb922f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
|
||||||
@@ -364,6 +364,11 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
|
@@ -349,6 +349,11 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isCatSittingOnChest(LevelAccessor world, BlockPos pos) {
|
private static boolean isCatSittingOnChest(LevelAccessor world, BlockPos pos) {
|
@ -17,10 +17,10 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|||||||
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
|
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 0b09b4adefdaba43949b1a83dc8f89af147924e9..f7babb4883a45244dd07eab1e87cf5fd4df83d91 100644
|
index 4a37313ea0f2253f377ea5d0d2c2d7b66c599ffe..a944eb2b5dbc2a44c32cf9ea794c9b225de16a70 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -1930,7 +1930,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2002,7 +2002,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
}
|
}
|
||||||
OutgoingChatMessage outgoing = OutgoingChatMessage.create(original);
|
OutgoingChatMessage outgoing = OutgoingChatMessage.create(original);
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ index 0b09b4adefdaba43949b1a83dc8f89af147924e9..f7babb4883a45244dd07eab1e87cf5fd
|
|||||||
this.handleCommand(s);
|
this.handleCommand(s);
|
||||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
||||||
// Do nothing, this is coming from a plugin
|
// Do nothing, this is coming from a plugin
|
||||||
@@ -2017,7 +2017,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2089,7 +2089,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ index 0b09b4adefdaba43949b1a83dc8f89af147924e9..f7babb4883a45244dd07eab1e87cf5fd
|
|||||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 56a63adc3c0c919594c3f2646d4cf5b86b5c6f1e..5b22714d6f5eb8318275ca0bf01597be8d55f118 100644
|
index b43dae6ed6ebdd1978e35e9d43e07591f90dcb09..4a1305df41c42be65dbb0438066e148e0b22aaaf 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -897,7 +897,7 @@ public final class CraftServer implements Server {
|
@@ -897,7 +897,7 @@ public final class CraftServer implements Server {
|
||||||
@ -53,10 +53,10 @@ index 56a63adc3c0c919594c3f2646d4cf5b86b5c6f1e..5b22714d6f5eb8318275ca0bf01597be
|
|||||||
if (this.commandMap.dispatch(sender, commandLine)) {
|
if (this.commandMap.dispatch(sender, commandLine)) {
|
||||||
return true;
|
return true;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 245f58942b6a69a67fa7ed31121d461e27a98ae0..1d6176714b097d4ab74af345af319e325735c58f 100644
|
index 07bfb5014d82262b0c96fc0c8cf52bfa0f67add1..921d43307f9b8a3c0ff211cf8c20b93b8431af15 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -464,7 +464,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -543,7 +543,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
if (this.getHandle().connection == null) return;
|
if (this.getHandle().connection == null) return;
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||||
index 1405c8ba8578d65cc00d807f31b37d6ddc2d1afb..d536df2c23f8cae6bf920a5304d91f10a9902251 100644
|
index 172be1f03f77dcc6d57dd9a9316b303c6f9c7175..136ec2413b6fe4680d7f2e903d04c9984b37f4c0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||||
@@ -346,7 +346,7 @@ public class Slime extends Mob implements Enemy {
|
@@ -342,7 +342,7 @@ public class Slime extends Mob implements Enemy {
|
||||||
}
|
}
|
||||||
|
|
||||||
ChunkPos chunkcoordintpair = new ChunkPos(pos);
|
ChunkPos chunkcoordintpair = new ChunkPos(pos);
|
||||||
@ -18,7 +18,7 @@ index 1405c8ba8578d65cc00d807f31b37d6ddc2d1afb..d536df2c23f8cae6bf920a5304d91f10
|
|||||||
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
|
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
|
||||||
return checkMobSpawnRules(type, world, spawnReason, pos, random);
|
return checkMobSpawnRules(type, world, spawnReason, pos, random);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||||
index d09f0f68031135f86a864e69eb8d65ceddd7a9b1..70999e95116d50de1a7fecdd91bbad0bac2bf1d8 100644
|
index ce05946e4fcff7c8151aa1213b18365dab9060f5..1d4587a97e86251982a9df832949a7093b216862 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||||
@@ -217,7 +217,7 @@ public class CraftChunk implements Chunk {
|
@@ -217,7 +217,7 @@ public class CraftChunk implements Chunk {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 5b22714d6f5eb8318275ca0bf01597be8d55f118..6135e8c0669886260afacdaa7405bf55597b17a6 100644
|
index 4a1305df41c42be65dbb0438066e148e0b22aaaf..603ad4841151234d3b8e0e6650a44d63ca9ed921 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2124,6 +2124,7 @@ public final class CraftServer implements Server {
|
@@ -2140,6 +2140,7 @@ public final class CraftServer implements Server {
|
||||||
return this.helpMap;
|
return this.helpMap;
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 68c2825c2d43b3c949cc4b08035b0f5d277f34f2..844a97b0eb396835ec72b4d14c9362a2ea2a8709 100644
|
index 5ba556a9b6b59420abd65b17bea72c8f85a3c70a..c6b41aea86dd6c18b25754fa1ffe4d8ab1dd0f75 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -102,7 +102,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -101,7 +101,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
@Override
|
@Override
|
||||||
public void setHealth(double health) {
|
public void setHealth(double health) {
|
||||||
health = (float) health;
|
health = (float) health;
|
109
patches/server/0065-Player-Tab-List-and-Title-APIs.patch
Normal file
109
patches/server/0065-Player-Tab-List-and-Title-APIs.patch
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Techcable <Techcable@outlook.com>
|
||||||
|
Date: Thu, 3 Mar 2016 02:32:10 -0600
|
||||||
|
Subject: [PATCH] Player Tab List and Title APIs
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
|
index 921d43307f9b8a3c0ff211cf8c20b93b8431af15..808c6f9c22893eee2b297f354ea2906f22915389 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
|
@@ -383,6 +383,98 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Paper start
|
||||||
|
+ @Override
|
||||||
|
+ public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) {
|
||||||
|
+ if (header != null) {
|
||||||
|
+ String headerJson = net.md_5.bungee.chat.ComponentSerializer.toString(header);
|
||||||
|
+ playerListHeader = net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().deserialize(headerJson);
|
||||||
|
+ } else {
|
||||||
|
+ playerListHeader = null;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (footer != null) {
|
||||||
|
+ String footerJson = net.md_5.bungee.chat.ComponentSerializer.toString(footer);
|
||||||
|
+ playerListFooter = net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().deserialize(footerJson);
|
||||||
|
+ } else {
|
||||||
|
+ playerListFooter = null;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ updatePlayerListHeaderFooter();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void setPlayerListHeaderFooter(BaseComponent header, BaseComponent footer) {
|
||||||
|
+ this.setPlayerListHeaderFooter(header == null ? null : new BaseComponent[]{header},
|
||||||
|
+ footer == null ? null : new BaseComponent[]{footer});
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks) {
|
||||||
|
+ getHandle().connection.send(new ClientboundSetTitlesAnimationPacket(fadeInTicks, stayTicks, fadeOutTicks));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void setSubtitle(BaseComponent[] subtitle) {
|
||||||
|
+ final ClientboundSetSubtitleTextPacket packet = new ClientboundSetSubtitleTextPacket(org.bukkit.craftbukkit.util.CraftChatMessage.fromJSON(net.md_5.bungee.chat.ComponentSerializer.toString(subtitle)));
|
||||||
|
+ getHandle().connection.send(packet);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void setSubtitle(BaseComponent subtitle) {
|
||||||
|
+ setSubtitle(new BaseComponent[]{subtitle});
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void showTitle(BaseComponent[] title) {
|
||||||
|
+ final ClientboundSetTitleTextPacket packet = new ClientboundSetTitleTextPacket(org.bukkit.craftbukkit.util.CraftChatMessage.fromJSON(net.md_5.bungee.chat.ComponentSerializer.toString(title)));
|
||||||
|
+ getHandle().connection.send(packet);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void showTitle(BaseComponent title) {
|
||||||
|
+ showTitle(new BaseComponent[]{title});
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void showTitle(BaseComponent[] title, BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) {
|
||||||
|
+ setTitleTimes(fadeInTicks, stayTicks, fadeOutTicks);
|
||||||
|
+ setSubtitle(subtitle);
|
||||||
|
+ showTitle(title);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void showTitle(BaseComponent title, BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks) {
|
||||||
|
+ setTitleTimes(fadeInTicks, stayTicks, fadeOutTicks);
|
||||||
|
+ setSubtitle(subtitle);
|
||||||
|
+ showTitle(title);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void sendTitle(com.destroystokyo.paper.Title title) {
|
||||||
|
+ Preconditions.checkNotNull(title, "Title is null");
|
||||||
|
+ setTitleTimes(title.getFadeIn(), title.getStay(), title.getFadeOut());
|
||||||
|
+ setSubtitle(title.getSubtitle() == null ? new BaseComponent[0] : title.getSubtitle());
|
||||||
|
+ showTitle(title.getTitle());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void updateTitle(com.destroystokyo.paper.Title title) {
|
||||||
|
+ Preconditions.checkNotNull(title, "Title is null");
|
||||||
|
+ setTitleTimes(title.getFadeIn(), title.getStay(), title.getFadeOut());
|
||||||
|
+ if (title.getSubtitle() != null) {
|
||||||
|
+ setSubtitle(title.getSubtitle());
|
||||||
|
+ }
|
||||||
|
+ showTitle(title.getTitle());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void hideTitle() {
|
||||||
|
+ getHandle().connection.send(new ClientboundClearTitlesPacket(false));
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public String getDisplayName() {
|
||||||
|
if(true) return io.papermc.paper.adventure.DisplayNames.getLegacy(this); // Paper
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable portal search radius
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index c582d2f447384ca3b46c3b8159b7114d7efef52c..8444518356f32486ee4064446f8c1396276ad015 100644
|
index f4e0a10eb936ed9d43c9a2fc3ed03a785bf00901..406d69220b315b47bd3d03a0dacc39addaaf9294 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3192,7 +3192,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -3208,7 +3208,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType());
|
double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType());
|
||||||
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
|
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -24,7 +24,7 @@ index c582d2f447384ca3b46c3b8159b7114d7efef52c..8444518356f32486ee4064446f8c1396
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
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 550b7bc694d861c084769265f6c49c4d44033296..afdd4ecbff21e2172b390bcbdf74f3c1bbddafcc 100644
|
index f4c8eee7bc574d402a7897a202734047e37c7a67..03dd833d61d5152af3032f23dd1fc4c75da9bc4f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||||
@@ -43,7 +43,7 @@ public class PortalForcer {
|
@@ -43,7 +43,7 @@ public class PortalForcer {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 6135e8c0669886260afacdaa7405bf55597b17a6..2b2d0c8ed68eb86812877026a0bb5c4a6389c3d4 100644
|
index 603ad4841151234d3b8e0e6650a44d63ca9ed921..8461eb0ad3531cab7aa50226008a960937830fce 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -300,6 +300,7 @@ public final class CraftServer implements Server {
|
@@ -302,6 +302,7 @@ public final class CraftServer implements Server {
|
||||||
public boolean ignoreVanillaPermissions = false;
|
public boolean ignoreVanillaPermissions = false;
|
||||||
private final List<CraftPlayer> playerView;
|
private final List<CraftPlayer> playerView;
|
||||||
public int reloadCount;
|
public int reloadCount;
|
||||||
@ -17,7 +17,7 @@ index 6135e8c0669886260afacdaa7405bf55597b17a6..2b2d0c8ed68eb86812877026a0bb5c4a
|
|||||||
static {
|
static {
|
||||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index 85d77772b003e56382f8c3b55fc11a9ae1ec535f..1be5c322abcec8ec32b84dec02d386e53cb5e16a 100644
|
index f117d32f3606917ad3526c9140ef5e40990ede8c..3390033bbfc8fd0715458e5faa6a65477272a80b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -129,10 +129,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -129,10 +129,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
@ -62,7 +62,7 @@ index 85d77772b003e56382f8c3b55fc11a9ae1ec535f..1be5c322abcec8ec32b84dec02d386e5
|
|||||||
public double getHeight() {
|
public double getHeight() {
|
||||||
return this.getHandle().getBbHeight();
|
return this.getHandle().getBbHeight();
|
||||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
index 231b4e3552b17f7803815a433a5ece440c227cc6..4bfc2f1729e45e36307a98bd69de9c820123cb8e 100644
|
index e086765dec32241bc5a77afcf072c77a40c6d785..35c90aaee30980610d168c01cbe9abfe04331cb8 100644
|
||||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
@@ -81,6 +81,17 @@ public class WatchdogThread extends Thread
|
@@ -81,6 +81,17 @@ public class WatchdogThread extends Thread
|
@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended
|
|||||||
This only is the case if the player is teleporting between worlds.
|
This only is the case if the player is teleporting between worlds.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 5cff1571a4eb1af6c961a265051642234bf1b121..e20cba0126b844b8655a387e4977d79a67ee63df 100644
|
index 808c6f9c22893eee2b297f354ea2906f22915389..6ea9ff476b49a778a767336b7650bf3525605fc0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1158,7 +1158,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1235,7 +1235,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
entity.connection.teleport(to);
|
entity.connection.teleport(to);
|
||||||
} else {
|
} else {
|
||||||
// The respawn reason should never be used if the passed location is non null.
|
// The respawn reason should never be used if the passed location is non null.
|
@ -49,31 +49,41 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||||
index 8d06e8d286da2573e40794adab695ff77e5afd86..9143ce01650b51e7f6a677c5941ade91a506449f 100644
|
index 68551947f5b7d3471f15bd74ccd86519ab34c1c1..a0b0614ac7d2009db5c6c10ab4a5f09dd447c635 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||||
@@ -357,6 +357,7 @@ public class OldUsersConverter {
|
@@ -356,7 +356,11 @@ public class OldUsersConverter {
|
||||||
|
try {
|
||||||
root = NbtIo.readCompressed(new java.io.FileInputStream(file5), NbtAccounter.unlimitedHeap());
|
root = NbtIo.readCompressed(new java.io.FileInputStream(file5), NbtAccounter.unlimitedHeap());
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
exception.printStackTrace();
|
- io.papermc.paper.util.TraceUtil.printStackTrace(exception); // Paper
|
||||||
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
|
+ // Paper start
|
||||||
|
+ io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception);
|
||||||
|
+ exception.printStackTrace();
|
||||||
|
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception);
|
||||||
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root != null) {
|
if (root != null) {
|
||||||
@@ -370,6 +371,7 @@ public class OldUsersConverter {
|
@@ -369,7 +373,11 @@ public class OldUsersConverter {
|
||||||
|
try {
|
||||||
NbtIo.writeCompressed(root, new java.io.FileOutputStream(file2));
|
NbtIo.writeCompressed(root, new java.io.FileOutputStream(file2));
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
exception.printStackTrace();
|
- io.papermc.paper.util.TraceUtil.printStackTrace(exception); // Paper
|
||||||
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
|
+ // Paper start
|
||||||
|
+ io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception);
|
||||||
|
+ exception.printStackTrace();
|
||||||
|
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception);
|
||||||
|
+ // Paper end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java b/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java b/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
|
||||||
index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..2b5b2869589991be37a4f128faabbff50e661470 100644
|
index 8183c26b4a5ad169a53702b8c45fd05cda934e80..36dec6cd78a0990ba3c09a4a748c259ef5c0a2ff 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
|
||||||
@@ -118,6 +118,7 @@ public class VillageSiege implements CustomSpawner {
|
@@ -117,6 +117,7 @@ public class VillageSiege implements CustomSpawner {
|
||||||
entityzombie.finalizeSpawn(world, world.getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.EVENT, (SpawnGroupData) null, (CompoundTag) null);
|
entityzombie.finalizeSpawn(world, world.getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.EVENT, (SpawnGroupData) null);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
VillageSiege.LOGGER.warn("Failed to create zombie for village siege at {}", vec3d, exception);
|
VillageSiege.LOGGER.warn("Failed to create zombie for village siege at {}", vec3d, exception);
|
||||||
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
|
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper - ServerExceptionEvent
|
||||||
@ -81,10 +91,10 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..2b5b2869589991be37a4f128faabbff5
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 3f910b1712c41e91de99ad00a90e0f3081f94deb..b91df88036d3ec2579883a9c65a7b80d4c0be81b 100644
|
index dac9c71d696a3fd1554408a6beb6840382bbc30c..29fe6aaa9e344a9c373399d63dd63ff0c04cbfda 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -737,6 +737,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -729,6 +729,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
// Paper start - Prevent block entity and entity crashes
|
// Paper start - Prevent block entity and entity crashes
|
||||||
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
||||||
MinecraftServer.LOGGER.error(msg, throwable);
|
MinecraftServer.LOGGER.error(msg, throwable);
|
||||||
@ -93,10 +103,10 @@ index 3f910b1712c41e91de99ad00a90e0f3081f94deb..b91df88036d3ec2579883a9c65a7b80d
|
|||||||
// Paper end - Prevent block entity and entity crashes
|
// Paper end - Prevent block entity and entity crashes
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||||
index 5d65baba605dd83e5f74d526aeda36d8ede8c014..604766a286d00bb4b40c20482376fe80651beabe 100644
|
index 6a80479554f0c860a8dd6baa1a6506858fca83e3..6324689f52363f19501143c1649f0885684cb796 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||||
@@ -291,6 +291,7 @@ public final class NaturalSpawner {
|
@@ -274,6 +274,7 @@ public final class NaturalSpawner {
|
||||||
NaturalSpawner.LOGGER.warn("Can't spawn entity of type: {}", BuiltInRegistries.ENTITY_TYPE.getKey(type));
|
NaturalSpawner.LOGGER.warn("Can't spawn entity of type: {}", BuiltInRegistries.ENTITY_TYPE.getKey(type));
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
|
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
|
||||||
@ -104,7 +114,7 @@ index 5d65baba605dd83e5f74d526aeda36d8ede8c014..604766a286d00bb4b40c20482376fe80
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@@ -404,6 +405,7 @@ public final class NaturalSpawner {
|
@@ -362,6 +363,7 @@ public final class NaturalSpawner {
|
||||||
entity = biomesettingsmobs_c.type.create(world.getLevel());
|
entity = biomesettingsmobs_c.type.create(world.getLevel());
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
|
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
|
||||||
@ -113,7 +123,7 @@ index 5d65baba605dd83e5f74d526aeda36d8ede8c014..604766a286d00bb4b40c20482376fe80
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
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 e764eecfb2eea62d641c9444831daae6d50c687e..53c10ed58451c317e6d45f34d6eca3072155b814 100644
|
index c4ff77ed93e17ed816e0325eb5bdfcdb444be4a4..60a1828d179c29514813143e3c8e93b08afe9849 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -1,6 +1,7 @@
|
@@ -1,6 +1,7 @@
|
||||||
@ -145,7 +155,7 @@ index e764eecfb2eea62d641c9444831daae6d50c687e..53c10ed58451c317e6d45f34d6eca307
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1066,6 +1073,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -1064,6 +1071,7 @@ public class LevelChunk extends ChunkAccess {
|
||||||
// Paper start - Prevent block entity and entity crashes
|
// Paper start - Prevent block entity and entity crashes
|
||||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||||
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||||
@ -154,10 +164,10 @@ index e764eecfb2eea62d641c9444831daae6d50c687e..53c10ed58451c317e6d45f34d6eca307
|
|||||||
// Paper end - Prevent block entity and entity crashes
|
// Paper end - Prevent block entity and entity crashes
|
||||||
// Spigot start
|
// Spigot start
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
index d9daf07132c46548964a75588b69d7a74680e917..66994aa135037919219e0bbcabe7de9f6f2c9dcd 100644
|
index 15f273aa592828719de6e092d79a407dc8652dfe..b24e8255ab18eb5b2e4968aa62aa3d72ef33f0eb 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
@@ -274,6 +274,7 @@ public class RegionFile implements AutoCloseable {
|
@@ -296,6 +296,7 @@ public class RegionFile implements AutoCloseable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (IOException ioexception) {
|
} catch (IOException ioexception) {
|
||||||
@ -165,7 +175,7 @@ index d9daf07132c46548964a75588b69d7a74680e917..66994aa135037919219e0bbcabe7de9f
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -355,6 +356,7 @@ public class RegionFile implements AutoCloseable {
|
@@ -377,6 +378,7 @@ public class RegionFile implements AutoCloseable {
|
||||||
((java.nio.Buffer) buf).position(5); // CraftBukkit - decompile error
|
((java.nio.Buffer) buf).position(5); // CraftBukkit - decompile error
|
||||||
filechannel.write(buf);
|
filechannel.write(buf);
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
|
|||||||
logic which is most likely to be true.
|
logic which is most likely to be true.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 8444518356f32486ee4064446f8c1396276ad015..9fb52c98455d547bdde6d56689528e78a5ddfed5 100644
|
index 406d69220b315b47bd3d03a0dacc39addaaf9294..1cd40266418a3805f05b09c554d561e2e83822e5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2820,6 +2820,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2836,6 +2836,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public PlayerTeam getTeam() {
|
public PlayerTeam getTeam() {
|
||||||
@ -23,14 +23,14 @@ index 8444518356f32486ee4064446f8c1396276ad015..9fb52c98455d547bdde6d56689528e78
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 13e8502640abad928282e4b1596f2ad97b4db765..99e91dd930bb33a006b2be3ad678df5861eb8eeb 100644
|
index e72ca3af948aa223e6ef31bb0972dd036c8f7c2d..70ac2c957341b363246a9165804471d2668e6492 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -841,6 +841,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -873,6 +873,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
if (nbt.contains("Team", 8)) {
|
|
||||||
String s = nbt.getString("Team");
|
String s = nbt.getString("Team");
|
||||||
PlayerTeam scoreboardteam = this.level().getScoreboard().getPlayerTeam(s);
|
Scoreboard scoreboard = this.level().getScoreboard();
|
||||||
|
PlayerTeam scoreboardteam = scoreboard.getPlayerTeam(s);
|
||||||
+ if (!this.level().paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof net.minecraft.world.entity.player.Player)) { scoreboardteam = null; } // Paper - Perf: Disable Scoreboards for non players by default
|
+ if (!this.level().paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof net.minecraft.world.entity.player.Player)) { scoreboardteam = null; } // Paper - Perf: Disable Scoreboards for non players by default
|
||||||
boolean flag = scoreboardteam != null && this.level().getScoreboard().addPlayerToTeam(this.getStringUUID(), scoreboardteam);
|
boolean flag = scoreboardteam != null && scoreboard.addPlayerToTeam(this.getStringUUID(), scoreboardteam);
|
||||||
|
|
||||||
if (!flag) {
|
if (!flag) {
|
@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now
|
|||||||
deprecated
|
deprecated
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 844a97b0eb396835ec72b4d14c9362a2ea2a8709..75dccbdde0d116ef194aa2ced328ad3c3992204e 100644
|
index c6b41aea86dd6c18b25754fa1ffe4d8ab1dd0f75..4a2f49be0af5d88e0fe5dd8af00b77dd0da2f208 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -283,10 +283,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -282,10 +282,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -41,7 +41,7 @@ index 844a97b0eb396835ec72b4d14c9362a2ea2a8709..75dccbdde0d116ef194aa2ced328ad3c
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void damage(double amount) {
|
public void damage(double amount) {
|
||||||
@@ -815,4 +834,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -800,4 +819,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
this.getHandle().persistentInvisibility = invisible;
|
this.getHandle().persistentInvisibility = invisible;
|
||||||
this.getHandle().setSharedFlag(5, invisible);
|
this.getHandle().setSharedFlag(5, invisible);
|
||||||
}
|
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Chunk Save Reattempt
|
|||||||
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
|
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
index 66994aa135037919219e0bbcabe7de9f6f2c9dcd..140d6e455c1729f6e31e95facba5520b75ad838c 100644
|
index b24e8255ab18eb5b2e4968aa62aa3d72ef33f0eb..12b7d50f49a2184aaf220a4a50a137b217c57124 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
@@ -274,7 +274,7 @@ public class RegionFile implements AutoCloseable {
|
@@ -296,7 +296,7 @@ public class RegionFile implements AutoCloseable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (IOException ioexception) {
|
} catch (IOException ioexception) {
|
||||||
@ -19,10 +19,10 @@ index 66994aa135037919219e0bbcabe7de9f6f2c9dcd..140d6e455c1729f6e31e95facba5520b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
index 1988063a0cac0350ae3b3388b8f2a0c95b8b259f..50a285127ee5a247680d4486ec9d5e01453b8a8e 100644
|
index a2879ffb7ec01f7e47e912fc70d9df09527ef902..0697a34875fb807e39f4aae16788fe2455b8138f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
@@ -132,6 +132,11 @@ public class RegionFileStorage implements AutoCloseable {
|
@@ -134,6 +134,11 @@ public class RegionFileStorage implements AutoCloseable {
|
||||||
|
|
||||||
protected void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException {
|
protected void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException {
|
||||||
RegionFile regionfile = this.getRegionFile(pos, false); // CraftBukkit
|
RegionFile regionfile = this.getRegionFile(pos, false); // CraftBukkit
|
||||||
@ -34,7 +34,7 @@ index 1988063a0cac0350ae3b3388b8f2a0c95b8b259f..50a285127ee5a247680d4486ec9d5e01
|
|||||||
|
|
||||||
if (nbt == null) {
|
if (nbt == null) {
|
||||||
regionfile.clear(pos);
|
regionfile.clear(pos);
|
||||||
@@ -156,7 +161,18 @@ public class RegionFileStorage implements AutoCloseable {
|
@@ -158,7 +163,18 @@ public class RegionFileStorage implements AutoCloseable {
|
||||||
dataoutputstream.close();
|
dataoutputstream.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
index c8041492b7b2a1ff67b95d9944cfccd476b3ee1d..66497960995dc30abe60d26200979a78513ff2c6 100644
|
index 70a22e140050273ae420e8dc414eab6d08e78617..d0178fc884b57cda9090a80716685994ca1a323e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
@@ -169,7 +169,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -190,7 +190,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
callback.packEventReceived(packet.id(), net.kyori.adventure.resource.ResourcePackStatus.valueOf(packet.action().name()), this.getCraftPlayer());
|
callback.packEventReceived(packet.id(), net.kyori.adventure.resource.ResourcePackStatus.valueOf(packet.action().name()), this.getCraftPlayer());
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@ -22,10 +22,10 @@ index c8041492b7b2a1ff67b95d9944cfccd476b3ee1d..66497960995dc30abe60d26200979a78
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index e20cba0126b844b8655a387e4977d79a67ee63df..58c74ad83d17ec47e84a45d33529d88118a34599 100644
|
index 6ea9ff476b49a778a767336b7650bf3525605fc0..3d145fb11fa1598b3f31e82445cdc2bbef205dec 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -195,6 +195,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -205,6 +205,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
private double healthScale = 20;
|
private double healthScale = 20;
|
||||||
private CraftWorldBorder clientWorldBorder = null;
|
private CraftWorldBorder clientWorldBorder = null;
|
||||||
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
|
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
|
||||||
@ -33,7 +33,7 @@ index e20cba0126b844b8655a387e4977d79a67ee63df..58c74ad83d17ec47e84a45d33529d881
|
|||||||
|
|
||||||
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
@@ -2016,6 +2017,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2083,6 +2084,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
// Paper end - adventure
|
// Paper end - adventure
|
||||||
|
|
@ -16,7 +16,7 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
|
|||||||
A config option has been added for those who depend on the previous behavior, but I don't expect that.
|
A config option has been added for those who depend on the previous behavior, but I don't expect that.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 2b2d0c8ed68eb86812877026a0bb5c4a6389c3d4..1d85e64b30e872f12de7d84af26be6271e77387e 100644
|
index 8461eb0ad3531cab7aa50226008a960937830fce..c9476989d21798713c65b4f0a580bde0a4457c21 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -458,6 +458,7 @@ public final class CraftServer implements Server {
|
@@ -458,6 +458,7 @@ public final class CraftServer implements Server {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
|
|||||||
https://github.com/PaperMC/Paper/issues/49
|
https://github.com/PaperMC/Paper/issues/49
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 1d85e64b30e872f12de7d84af26be6271e77387e..f7726d16d37c64228515b0791d921b047bc887e6 100644
|
index c9476989d21798713c65b4f0a580bde0a4457c21..99e159386504ab8f3646b08adda12e18686c2641 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2728,5 +2728,23 @@ public final class CraftServer implements Server {
|
@@ -2751,5 +2751,23 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
return this.adventure$audiences;
|
return this.adventure$audiences;
|
||||||
}
|
}
|
@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive
|
|||||||
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index f7726d16d37c64228515b0791d921b047bc887e6..f69d5e8f22fa8335b19f9e777ddbd33443eb08dc 100644
|
index 99e159386504ab8f3646b08adda12e18686c2641..c625ed2039566a1a175a8100fb8a42566f1cfb1a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -964,8 +964,16 @@ public final class CraftServer implements Server {
|
@@ -964,8 +964,16 @@ public final class CraftServer implements Server {
|
@ -17,88 +17,82 @@ was added, resulting in 2 different ways to modify an items enchantments.
|
|||||||
For consistency, the old API methods now forward to use the
|
For consistency, the old API methods now forward to use the
|
||||||
ItemMeta API equivalents, and should deprecate the old API's.
|
ItemMeta API equivalents, and should deprecate the old API's.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
|
||||||
index 6291265ae4691bf7dffe196d20571c1c30e8d906..70511628eefc28163d07f50f18d9cc55dd93d68b 100644
|
index b49eb019cce58049c2b3a0e80e3d08998b16f7ea..dd6bf199f22476ef1d0f704883b748be97b0065e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
|
||||||
@@ -181,6 +181,23 @@ public final class ItemStack {
|
@@ -27,15 +27,21 @@ import net.minecraft.tags.TagKey;
|
||||||
return this.getItem().getTooltipImage(this);
|
import net.minecraft.world.item.Item;
|
||||||
}
|
import net.minecraft.world.item.TooltipFlag;
|
||||||
|
import net.minecraft.world.item.component.TooltipProvider;
|
||||||
|
+// Paper start
|
||||||
|
+import it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap;
|
||||||
|
+// Paper end
|
||||||
|
|
||||||
|
public class ItemEnchantments implements TooltipProvider {
|
||||||
|
- public static final ItemEnchantments EMPTY = new ItemEnchantments(new Object2IntOpenHashMap<>(), true);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ private static final java.util.Comparator<? super CompoundTag> enchantSorter = java.util.Comparator.comparing(o -> o.getString("id"));
|
+ private static final java.util.Comparator<Holder<Enchantment>> ENCHANTMENT_ORDER = java.util.Comparator.comparing(Holder::getRegisteredName);
|
||||||
+ private void processEnchantOrder(@Nullable CompoundTag tag) {
|
+ public static final ItemEnchantments EMPTY = new ItemEnchantments(new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), true);
|
||||||
+ if (tag == null || !tag.contains("Enchantments", net.minecraft.nbt.Tag.TAG_LIST)) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ ListTag list = tag.getList("Enchantments", net.minecraft.nbt.Tag.TAG_COMPOUND);
|
|
||||||
+ if (list.size() < 2) {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ try {
|
|
||||||
+ //noinspection unchecked
|
|
||||||
+ list.sort((java.util.Comparator<? super net.minecraft.nbt.Tag>) enchantSorter); // Paper
|
|
||||||
+ } catch (Exception ignored) {}
|
|
||||||
+ }
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
public static final int MAX_LEVEL = 255;
|
||||||
public ItemStack(ItemLike item) {
|
private static final Codec<Integer> LEVEL_CODEC = Codec.intRange(0, 255);
|
||||||
this(item, 1);
|
- private static final Codec<Object2IntOpenHashMap<Holder<Enchantment>>> LEVELS_CODEC = Codec.unboundedMap(
|
||||||
}
|
+ private static final Codec<Object2IntAVLTreeMap<Holder<Enchantment>>> LEVELS_CODEC = Codec.unboundedMap( // Paper
|
||||||
@@ -227,6 +244,7 @@ public final class ItemStack {
|
BuiltInRegistries.ENCHANTMENT.holderByNameCodec(), LEVEL_CODEC
|
||||||
this.count = nbttagcompound.getByte("Count");
|
)
|
||||||
if (nbttagcompound.contains("tag", 10)) {
|
- .xmap(Object2IntOpenHashMap::new, Function.identity());
|
||||||
this.tag = nbttagcompound.getCompound("tag").copy();
|
+ .xmap(Object2IntAVLTreeMap::new, Function.identity()); // Paper
|
||||||
+ this.processEnchantOrder(this.tag); // Paper
|
private static final Codec<ItemEnchantments> FULL_CODEC = RecordCodecBuilder.create(
|
||||||
this.getItem().verifyTagAfterLoad(this.tag);
|
instance -> instance.group(
|
||||||
|
LEVELS_CODEC.fieldOf("levels").forGetter(component -> component.enchantments),
|
||||||
|
@@ -45,16 +51,16 @@ public class ItemEnchantments implements TooltipProvider {
|
||||||
|
);
|
||||||
|
public static final Codec<ItemEnchantments> CODEC = Codec.withAlternative(FULL_CODEC, LEVELS_CODEC, map -> new ItemEnchantments(map, true));
|
||||||
|
public static final StreamCodec<RegistryFriendlyByteBuf, ItemEnchantments> STREAM_CODEC = StreamCodec.composite(
|
||||||
|
- ByteBufCodecs.map(Object2IntOpenHashMap::new, ByteBufCodecs.holderRegistry(Registries.ENCHANTMENT), ByteBufCodecs.VAR_INT),
|
||||||
|
+ ByteBufCodecs.map((v) -> new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), ByteBufCodecs.holderRegistry(Registries.ENCHANTMENT), ByteBufCodecs.VAR_INT), // Paper
|
||||||
|
component -> component.enchantments,
|
||||||
|
ByteBufCodecs.BOOL,
|
||||||
|
component -> component.showInTooltip,
|
||||||
|
ItemEnchantments::new
|
||||||
|
);
|
||||||
|
- final Object2IntOpenHashMap<Holder<Enchantment>> enchantments;
|
||||||
|
+ final Object2IntAVLTreeMap<Holder<Enchantment>> enchantments; // Paper
|
||||||
|
public final boolean showInTooltip;
|
||||||
|
|
||||||
|
- ItemEnchantments(Object2IntOpenHashMap<Holder<Enchantment>> enchantments, boolean showInTooltip) {
|
||||||
|
+ ItemEnchantments(Object2IntAVLTreeMap<Holder<Enchantment>> enchantments, boolean showInTooltip) { // Paper
|
||||||
|
this.enchantments = enchantments;
|
||||||
|
this.showInTooltip = showInTooltip;
|
||||||
|
|
||||||
|
@@ -145,7 +151,7 @@ public class ItemEnchantments implements TooltipProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -846,6 +864,7 @@ public final class ItemStack {
|
public static class Mutable {
|
||||||
|
- private final Object2IntOpenHashMap<Holder<Enchantment>> enchantments = new Object2IntOpenHashMap<>();
|
||||||
|
+ private final Object2IntAVLTreeMap<Holder<Enchantment>> enchantments = new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER); // Paper
|
||||||
|
public boolean showInTooltip;
|
||||||
|
|
||||||
public void setTag(@Nullable CompoundTag nbt) {
|
public Mutable(ItemEnchantments enchantmentsComponent) {
|
||||||
this.tag = nbt;
|
|
||||||
+ this.processEnchantOrder(this.tag); // Paper
|
|
||||||
if (this.getItem().canBeDepleted()) {
|
|
||||||
this.setDamageValue(this.getDamageValue());
|
|
||||||
}
|
|
||||||
@@ -1143,6 +1162,7 @@ public final class ItemStack {
|
|
||||||
ListTag nbttaglist = this.tag.getList("Enchantments", 10);
|
|
||||||
|
|
||||||
nbttaglist.add(EnchantmentHelper.storeEnchantment(EnchantmentHelper.getEnchantmentId(enchantment), (byte) level));
|
|
||||||
+ processEnchantOrder(this.tag); // Paper
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isEnchanted() {
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
index 0bb01e53f1c15071c8cd818cce79af8196fe790f..b59e84bbed37b002a34fe81efdce6f025617fc84 100644
|
index 1f99a9b9a0510ab19a5913588d6d677d6cada5e5..09c363f483cb12be01afd9a274c541f3bdeb992c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
@@ -192,28 +192,11 @@ public final class CraftItemStack extends ItemStack {
|
@@ -191,16 +191,11 @@ public final class CraftItemStack extends ItemStack {
|
||||||
public void addUnsafeEnchantment(Enchantment ench, int level) {
|
public void addUnsafeEnchantment(Enchantment ench, int level) {
|
||||||
Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
|
Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
|
||||||
|
|
||||||
- if (!CraftItemStack.makeTag(this.handle)) {
|
- if (!CraftItemStack.makeTag(this.handle)) {
|
||||||
- return;
|
- return;
|
||||||
- }
|
- }
|
||||||
- ListTag list = CraftItemStack.getEnchantmentList(this.handle);
|
- ItemEnchantments list = CraftItemStack.getEnchantmentList(this.handle);
|
||||||
- if (list == null) {
|
- if (list == null) {
|
||||||
- list = new ListTag();
|
- list = ItemEnchantments.EMPTY;
|
||||||
- this.handle.getTag().put(ENCHANTMENTS.NBT, list);
|
|
||||||
- }
|
- }
|
||||||
- int size = list.size();
|
- ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list);
|
||||||
-
|
- listCopy.set(CraftEnchantment.bukkitToMinecraft(ench), level);
|
||||||
- for (int i = 0; i < size; i++) {
|
- this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
|
||||||
- CompoundTag tag = (CompoundTag) list.get(i);
|
|
||||||
- String id = tag.getString(ENCHANTMENTS_ID.NBT);
|
|
||||||
- if (ench.getKey().equals(NamespacedKey.fromString(id))) {
|
|
||||||
- tag.putShort(ENCHANTMENTS_LVL.NBT, (short) level);
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- CompoundTag tag = new CompoundTag();
|
|
||||||
- tag.putString(ENCHANTMENTS_ID.NBT, ench.getKey().toString());
|
|
||||||
- tag.putShort(ENCHANTMENTS_LVL.NBT, (short) level);
|
|
||||||
- list.add(tag);
|
|
||||||
+ // Paper start - Replace whole method
|
+ // Paper start - Replace whole method
|
||||||
+ final ItemMeta itemMeta = this.getItemMeta();
|
+ final ItemMeta itemMeta = this.getItemMeta();
|
||||||
+ itemMeta.addEnchant(ench, level, true);
|
+ itemMeta.addEnchant(ench, level, true);
|
||||||
@ -107,45 +101,23 @@ index 0bb01e53f1c15071c8cd818cce79af8196fe790f..b59e84bbed37b002a34fe81efdce6f02
|
|||||||
}
|
}
|
||||||
|
|
||||||
static boolean makeTag(net.minecraft.world.item.ItemStack item) {
|
static boolean makeTag(net.minecraft.world.item.ItemStack item) {
|
||||||
@@ -246,43 +229,15 @@ public final class CraftItemStack extends ItemStack {
|
@@ -229,24 +224,15 @@ public final class CraftItemStack extends ItemStack {
|
||||||
public int removeEnchantment(Enchantment ench) {
|
public int removeEnchantment(Enchantment ench) {
|
||||||
Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
|
Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
|
||||||
|
|
||||||
- ListTag list = CraftItemStack.getEnchantmentList(this.handle), listCopy;
|
- ItemEnchantments list = CraftItemStack.getEnchantmentList(this.handle);
|
||||||
- if (list == null) {
|
- if (list == null) {
|
||||||
- return 0;
|
- return 0;
|
||||||
- }
|
- }
|
||||||
- int index = Integer.MIN_VALUE;
|
- int level = this.getEnchantmentLevel(ench);
|
||||||
- int level = Integer.MIN_VALUE;
|
- if (level <= 0) {
|
||||||
- int size = list.size();
|
|
||||||
-
|
|
||||||
- for (int i = 0; i < size; i++) {
|
|
||||||
- CompoundTag enchantment = (CompoundTag) list.get(i);
|
|
||||||
- String id = enchantment.getString(ENCHANTMENTS_ID.NBT);
|
|
||||||
- if (ench.getKey().equals(NamespacedKey.fromString(id))) {
|
|
||||||
- index = i;
|
|
||||||
- level = 0xffff & enchantment.getShort(ENCHANTMENTS_LVL.NBT);
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (index == Integer.MIN_VALUE) {
|
|
||||||
- return 0;
|
- return 0;
|
||||||
- }
|
- }
|
||||||
- if (size == 1) {
|
- int size = list.size();
|
||||||
- this.handle.getTag().remove(ENCHANTMENTS.NBT);
|
|
||||||
- if (this.handle.getTag().isEmpty()) {
|
|
||||||
- this.handle.setTag(null);
|
|
||||||
- }
|
|
||||||
- return level;
|
|
||||||
- }
|
|
||||||
-
|
-
|
||||||
- // This is workaround for not having an index removal
|
- if (size == 1) {
|
||||||
- listCopy = new ListTag();
|
- this.handle.remove(DataComponents.ENCHANTMENTS);
|
||||||
- for (int i = 0; i < size; i++) {
|
- return level;
|
||||||
- if (i != index) {
|
|
||||||
- listCopy.add(list.get(i));
|
|
||||||
- }
|
|
||||||
+ // Paper start - replace entire method
|
+ // Paper start - replace entire method
|
||||||
+ int level = getEnchantmentLevel(ench);
|
+ int level = getEnchantmentLevel(ench);
|
||||||
+ if (level > 0) {
|
+ if (level > 0) {
|
||||||
@ -154,12 +126,15 @@ index 0bb01e53f1c15071c8cd818cce79af8196fe790f..b59e84bbed37b002a34fe81efdce6f02
|
|||||||
+ itemMeta.removeEnchant(ench);
|
+ itemMeta.removeEnchant(ench);
|
||||||
+ this.setItemMeta(itemMeta);
|
+ this.setItemMeta(itemMeta);
|
||||||
}
|
}
|
||||||
- this.handle.getTag().put(ENCHANTMENTS.NBT, listCopy);
|
-
|
||||||
|
- ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list);
|
||||||
|
- listCopy.set(CraftEnchantment.bukkitToMinecraft(ench), -1); // Negative to remove
|
||||||
|
- this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
@@ -294,7 +249,7 @@ public final class CraftItemStack extends ItemStack {
|
@@ -258,7 +244,7 @@ public final class CraftItemStack extends ItemStack {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Enchantment, Integer> getEnchantments() {
|
public Map<Enchantment, Integer> getEnchantments() {
|
||||||
@ -169,7 +144,7 @@ index 0bb01e53f1c15071c8cd818cce79af8196fe790f..b59e84bbed37b002a34fe81efdce6f02
|
|||||||
|
|
||||||
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
|
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index ffdea312f93d00289364ef4d41a820cd1338f3bd..361268bcc0197c2f9f4bd065d8f7b51771d562a9 100644
|
index 04a1c602a1d94f1b84cbeaa3abf90b8fcc31e89f..54e3059f405de2e6306cea16d045fb448bb5b099 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
|
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
|
||||||
@ -180,41 +155,32 @@ index ffdea312f93d00289364ef4d41a820cd1338f3bd..361268bcc0197c2f9f4bd065d8f7b517
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Multimap;
|
import com.google.common.collect.Multimap;
|
||||||
import com.google.common.collect.SetMultimap;
|
import com.google.common.collect.SetMultimap;
|
||||||
@@ -23,6 +24,7 @@ import java.util.ArrayList;
|
@@ -22,6 +23,7 @@ import java.util.Arrays;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
+import java.util.Comparator; // Paper
|
+import java.util.Comparator; // Paper
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -33,6 +35,7 @@ import java.util.Map;
|
@@ -32,6 +34,7 @@ import java.util.Map;
|
||||||
import java.util.NoSuchElementException;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
+import java.util.TreeMap; // Paper
|
+import java.util.TreeMap; // Paper
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
@@ -277,7 +280,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -221,7 +224,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
private List<String> lore; // null and empty are two different states internally
|
private List<Component> lore; // null and empty are two different states internally
|
||||||
private Integer customModelData;
|
private Integer customModelData;
|
||||||
private CompoundTag blockData;
|
private Map<String, String> blockData;
|
||||||
- private Map<Enchantment, Integer> enchantments;
|
- private Map<Enchantment, Integer> enchantments;
|
||||||
+ private EnchantmentMap enchantments; // Paper
|
+ private EnchantmentMap enchantments; // Paper
|
||||||
private Multimap<Attribute, AttributeModifier> attributeModifiers;
|
private Multimap<Attribute, AttributeModifier> attributeModifiers;
|
||||||
private int repairCost;
|
private int repairCost;
|
||||||
private int hideFlag;
|
private int hideFlag;
|
||||||
@@ -288,7 +291,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -260,7 +263,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
|
||||||
|
|
||||||
private CompoundTag internalTag;
|
|
||||||
- final Map<String, Tag> unhandledTags = new HashMap<String, Tag>(); // Visible for testing only
|
|
||||||
+ final Map<String, Tag> unhandledTags = new TreeMap<String, Tag>(); // Visible for testing only // Paper
|
|
||||||
private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftMetaItem.DATA_TYPE_REGISTRY);
|
|
||||||
|
|
||||||
private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only
|
|
||||||
@@ -309,7 +312,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
|
||||||
this.blockData = meta.blockData;
|
this.blockData = meta.blockData;
|
||||||
|
|
||||||
if (meta.enchantments != null) {
|
if (meta.enchantments != null) {
|
||||||
@ -223,24 +189,19 @@ index ffdea312f93d00289364ef4d41a820cd1338f3bd..361268bcc0197c2f9f4bd065d8f7b517
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (meta.hasAttributeModifiers()) {
|
if (meta.hasAttributeModifiers()) {
|
||||||
@@ -392,13 +395,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -385,8 +388,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- static Map<Enchantment, Integer> buildEnchantments(CompoundTag tag, ItemMetaKey key) {
|
- static Map<Enchantment, Integer> buildEnchantments(ItemEnchantments tag) {
|
||||||
+ static EnchantmentMap buildEnchantments(CompoundTag tag, ItemMetaKey key) { // Paper
|
- Map<Enchantment, Integer> enchantments = new LinkedHashMap<Enchantment, Integer>(tag.size());
|
||||||
if (!tag.contains(key.NBT)) {
|
+ static EnchantmentMap buildEnchantments(ItemEnchantments tag) { // Paper
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
ListTag ench = tag.getList(key.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND);
|
|
||||||
- Map<Enchantment, Integer> enchantments = new LinkedHashMap<Enchantment, Integer>(ench.size());
|
|
||||||
+ EnchantmentMap enchantments = new EnchantmentMap(); // Paper
|
+ EnchantmentMap enchantments = new EnchantmentMap(); // Paper
|
||||||
|
|
||||||
for (int i = 0; i < ench.size(); i++) {
|
tag.entrySet().forEach((entry) -> {
|
||||||
String id = ((CompoundTag) ench.get(i)).getString(CraftMetaItem.ENCHANTMENTS_ID.NBT);
|
Holder<net.minecraft.world.item.enchantment.Enchantment> id = entry.getKey();
|
||||||
@@ -551,13 +554,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -640,13 +643,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
}
|
return modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
- static Map<Enchantment, Integer> buildEnchantments(Map<String, Object> map, ItemMetaKey key) {
|
- static Map<Enchantment, Integer> buildEnchantments(Map<String, Object> map, ItemMetaKey key) {
|
||||||
@ -255,7 +216,7 @@ index ffdea312f93d00289364ef4d41a820cd1338f3bd..361268bcc0197c2f9f4bd065d8f7b517
|
|||||||
for (Map.Entry<?, ?> entry : ench.entrySet()) {
|
for (Map.Entry<?, ?> entry : ench.entrySet()) {
|
||||||
// Doctor older enchants
|
// Doctor older enchants
|
||||||
String enchantKey = entry.getKey().toString();
|
String enchantKey = entry.getKey().toString();
|
||||||
@@ -845,14 +848,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -951,14 +954,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Enchantment, Integer> getEnchants() {
|
public Map<Enchantment, Integer> getEnchants() {
|
||||||
@ -272,7 +233,7 @@ index ffdea312f93d00289364ef4d41a820cd1338f3bd..361268bcc0197c2f9f4bd065d8f7b517
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
|
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
|
||||||
@@ -1269,7 +1272,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1492,7 +1495,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
clone.customModelData = this.customModelData;
|
clone.customModelData = this.customModelData;
|
||||||
clone.blockData = this.blockData;
|
clone.blockData = this.blockData;
|
||||||
if (this.enchantments != null) {
|
if (this.enchantments != null) {
|
||||||
@ -281,9 +242,9 @@ index ffdea312f93d00289364ef4d41a820cd1338f3bd..361268bcc0197c2f9f4bd065d8f7b517
|
|||||||
}
|
}
|
||||||
if (this.hasAttributeModifiers()) {
|
if (this.hasAttributeModifiers()) {
|
||||||
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
|
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
|
||||||
@@ -1516,4 +1519,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1805,4 +1808,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return CraftMetaItem.HANDLED_TAGS;
|
|
||||||
}
|
return (result != null) ? result : Optional.empty();
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Paper start
|
+ // Paper start
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate
|
|||||||
Can set a much shorter despawn rate for arrows that players can not pick up.
|
Can set a much shorter despawn rate for arrows that players can not pick up.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
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 fb68ed6db051577488b209d51f65db7267324751..c210ae3795b1bbaefbe84a6f62b9d3dd75d642a4 100644
|
index 94f6b097a2c29fd00d6a670c5bb35fb4ade23d2e..efcfbcb3dc352c9015cc9121dc8d98e8deed8bfd 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||||
@@ -320,7 +320,7 @@ public abstract class AbstractArrow extends Projectile {
|
@@ -332,7 +332,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||||
|
|
||||||
protected void tickDespawn() {
|
protected void tickDespawn() {
|
||||||
++this.life;
|
++this.life;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
|
|||||||
Methods that can be used for other patches to help improve logic.
|
Methods that can be used for other patches to help improve logic.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index b91df88036d3ec2579883a9c65a7b80d4c0be81b..2ad3c16bf36972ff55269612f02cdb4f558f35b7 100644
|
index 29fe6aaa9e344a9c373399d63dd63ff0c04cbfda..0e0ab7b2790c1b7540eeb27eb17099e39a6099d4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -347,6 +347,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -341,6 +341,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
return chunk == null ? null : chunk.getFluidState(blockposition);
|
return chunk == null ? null : chunk.getFluidState(blockposition);
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 99e91dd930bb33a006b2be3ad678df5861eb8eeb..13438b60bb3891e40bf0b5e942e0b2ba744121f9 100644
|
index 70ac2c957341b363246a9165804471d2668e6492..53da8935e076d56f0a5423e5c1bdcdddc7cbd882 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3719,10 +3719,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3802,10 +3802,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.triggerItemUseEffects(this.useItem, 16);
|
this.triggerItemUseEffects(this.useItem, 16);
|
||||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||||
ItemStack itemstack;
|
ItemStack itemstack;
|
||||||
@ -21,7 +21,7 @@ index 99e91dd930bb33a006b2be3ad678df5861eb8eeb..13438b60bb3891e40bf0b5e942e0b2ba
|
|||||||
this.level().getCraftServer().getPluginManager().callEvent(event);
|
this.level().getCraftServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
@@ -3736,6 +3737,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3819,6 +3820,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
} else {
|
} else {
|
||||||
itemstack = this.useItem.finishUsingItem(this.level(), this);
|
itemstack = this.useItem.finishUsingItem(this.level(), this);
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ index 99e91dd930bb33a006b2be3ad678df5861eb8eeb..13438b60bb3891e40bf0b5e942e0b2ba
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (itemstack != this.useItem) {
|
if (itemstack != this.useItem) {
|
||||||
@@ -3743,6 +3750,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3826,6 +3833,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.stopUsingItem();
|
this.stopUsingItem();
|
@ -5,10 +5,10 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 13438b60bb3891e40bf0b5e942e0b2ba744121f9..8447a47e1c493001ea9f54392e02f14da14cb25d 100644
|
index 53da8935e076d56f0a5423e5c1bdcdddc7cbd882..f02b12f3853bf4bf29b59a505f06cb98bddb40ff 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -802,7 +802,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -833,7 +833,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readAdditionalSaveData(CompoundTag nbt) {
|
public void readAdditionalSaveData(CompoundTag nbt) {
|
||||||
@ -23,7 +23,7 @@ index 13438b60bb3891e40bf0b5e942e0b2ba744121f9..8447a47e1c493001ea9f54392e02f14d
|
|||||||
if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) {
|
if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) {
|
||||||
this.getAttributes().load(nbt.getList("Attributes", 10));
|
this.getAttributes().load(nbt.getList("Attributes", 10));
|
||||||
}
|
}
|
||||||
@@ -1352,6 +1358,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1365,6 +1371,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHealth(float health) {
|
public void setHealth(float health) {
|
||||||
@ -34,7 +34,7 @@ index 13438b60bb3891e40bf0b5e942e0b2ba744121f9..8447a47e1c493001ea9f54392e02f14d
|
|||||||
// CraftBukkit start - Handle scaled health
|
// CraftBukkit start - Handle scaled health
|
||||||
if (this instanceof ServerPlayer) {
|
if (this instanceof ServerPlayer) {
|
||||||
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
|
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
|
||||||
@@ -3552,7 +3562,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3637,7 +3647,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setAbsorptionAmount(float absorptionAmount) {
|
public final void setAbsorptionAmount(float absorptionAmount) {
|
||||||
@ -44,10 +44,10 @@ index 13438b60bb3891e40bf0b5e942e0b2ba744121f9..8447a47e1c493001ea9f54392e02f14d
|
|||||||
|
|
||||||
protected void internalSetAbsorptionAmount(float absorptionAmount) {
|
protected void internalSetAbsorptionAmount(float absorptionAmount) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 58c74ad83d17ec47e84a45d33529d88118a34599..02cabe9b5e413ce58b82061ea0347fc7a7ce6866 100644
|
index 3d145fb11fa1598b3f31e82445cdc2bbef205dec..37bf685ee6a01a32d369f0154e7b2446c58efd4c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -2260,6 +2260,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2327,6 +2327,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRealHealth(double health) {
|
public void setRealHealth(double health) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities
|
|||||||
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 9fb52c98455d547bdde6d56689528e78a5ddfed5..52220795bf8a73c63837b4e07b1abf99c0344322 100644
|
index 1cd40266418a3805f05b09c554d561e2e83822e5..bc098b6a9c0e3b19b9154ab3727949232bddb20a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -166,6 +166,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -169,6 +169,79 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ index 9fb52c98455d547bdde6d56689528e78a5ddfed5..52220795bf8a73c63837b4e07b1abf99
|
|||||||
private CraftEntity bukkitEntity;
|
private CraftEntity bukkitEntity;
|
||||||
|
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
@@ -362,7 +435,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -364,7 +437,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
this.bb = Entity.INITIAL_AABB;
|
this.bb = Entity.INITIAL_AABB;
|
||||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||||
this.nextStep = 1.0F;
|
this.nextStep = 1.0F;
|
||||||
@ -99,10 +99,10 @@ index 9fb52c98455d547bdde6d56689528e78a5ddfed5..52220795bf8a73c63837b4e07b1abf99
|
|||||||
this.fluidHeight = new Object2DoubleArrayMap(2);
|
this.fluidHeight = new Object2DoubleArrayMap(2);
|
||||||
this.fluidOnEyes = new HashSet();
|
this.fluidOnEyes = new HashSet();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||||
index d404cd4c805442004d9a5f259a9e0907758ad915..36506dc4b99f9de19a23a99c1bccdcb4e7102e72 100644
|
index a98c7d9bf8dbaf9df51551fe66f7927798e9670f..43b4ea96c5c4a6234e5b83d41db9b85c1fe27b8f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||||
@@ -44,7 +44,7 @@ public class Squid extends WaterAnimal {
|
@@ -42,7 +42,7 @@ public class Squid extends WaterAnimal {
|
||||||
|
|
||||||
public Squid(EntityType<? extends Squid> type, Level world) {
|
public Squid(EntityType<? extends Squid> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 5a20dc552423717f91178068dc5f8a30be13ea54..ea4eacf66651798185e1c445979a465e173571d0 100644
|
index a9d03ee785ca9bc593dce35a7dd681d06f58fb70..6ccc339b8a82c25ba382f1a5609b50cf68f03021 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -614,7 +614,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -620,7 +620,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
if (this.isRainingAt(blockposition)) {
|
if (this.isRainingAt(blockposition)) {
|
||||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
@ -6,22 +6,22 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
|
|||||||
Saves on some object allocation and processing when no plugin listens to this
|
Saves on some object allocation and processing when no plugin listens to this
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 638ab8ee2a44445baee91ee7e63b96ce6c098ad0..cc48cb8c4863db3cb2eb2b4317384fe7e4180ed9 100644
|
index b5f305c7d0972438a686d9b3a022156e39b130a2..d5b5eb914278fbd85921c039a8da3492dcbd6168 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1457,6 +1457,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1520,6 +1520,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||||
+ worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
|
+ worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
|
||||||
|
|
||||||
this.profiler.push(() -> {
|
this.profiler.push(() -> {
|
||||||
return worldserver + " " + worldserver.dimension().location();
|
String s = String.valueOf(worldserver);
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index ea4eacf66651798185e1c445979a465e173571d0..1c3b12692094c1eaa086ebb2f060b22aaf9d9b39 100644
|
index 6ccc339b8a82c25ba382f1a5609b50cf68f03021..a1e187d2eef9a5dfa41657a90a95ed392c2a919c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -226,6 +226,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||||
public final UUID uuid;
|
public final UUID uuid;
|
||||||
@ -30,10 +30,10 @@ index ea4eacf66651798185e1c445979a465e173571d0..1c3b12692094c1eaa086ebb2f060b22a
|
|||||||
public LevelChunk getChunkIfLoaded(int x, int z) {
|
public LevelChunk getChunkIfLoaded(int x, int z) {
|
||||||
return this.chunkSource.getChunk(x, z, false);
|
return this.chunkSource.getChunk(x, z, false);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 2ad3c16bf36972ff55269612f02cdb4f558f35b7..424377f062c6443460a9814feb8b90e7bef71c6a 100644
|
index 0e0ab7b2790c1b7540eeb27eb17099e39a6099d4..2a7d2eea46e05d85ce3e72a69dfd26a671a882ac 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -497,7 +497,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -491,7 +491,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
|
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
|
||||||
CraftWorld world = ((ServerLevel) this).getWorld();
|
CraftWorld world = ((ServerLevel) this).getWorld();
|
||||||
@ -43,11 +43,11 @@ index 2ad3c16bf36972ff55269612f02cdb4f558f35b7..424377f062c6443460a9814feb8b90e7
|
|||||||
this.getCraftServer().getPluginManager().callEvent(event);
|
this.getCraftServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/BushBlock.java b/src/main/java/net/minecraft/world/level/block/BushBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/BushBlock.java b/src/main/java/net/minecraft/world/level/block/BushBlock.java
|
||||||
index 1d46dd41b51a449ed8e032e36e65aad8043fba56..bed3d9c781c7d3ca260027b4737970889a54689c 100644
|
index 75109c79daa724340268438725bbf6d39b955691..a7b4b5600e3c889c69ac22294899713d50b5fe5c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/BushBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/BushBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/BushBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/BushBlock.java
|
||||||
@@ -28,7 +28,7 @@ public abstract class BushBlock extends Block {
|
@@ -28,7 +28,7 @@ public abstract class BushBlock extends Block {
|
||||||
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
protected BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (!state.canSurvive(world, pos)) {
|
if (!state.canSurvive(world, pos)) {
|
||||||
- if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) {
|
- if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) {
|
||||||
@ -56,7 +56,7 @@ index 1d46dd41b51a449ed8e032e36e65aad8043fba56..bed3d9c781c7d3ca260027b473797088
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||||
index db67c85810cd42e1c9dee96e8b51d194393c1eb7..0f0750f8c790d0db72a0e6b277449a1461674890 100644
|
index cb76568cd1f97024c7a40328d9d72dd8a3e72e8b..7fdf744a2be55313cc75c1322f6534f55cf463f5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||||
@@ -102,7 +102,7 @@ public class DoublePlantBlock extends BushBlock {
|
@@ -102,7 +102,7 @@ public class DoublePlantBlock extends BushBlock {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 1c3b12692094c1eaa086ebb2f060b22aaf9d9b39..211f785adf6b8bfc6b974da7898cb2f4359626c9 100644
|
index a1e187d2eef9a5dfa41657a90a95ed392c2a919c..5fa72cda0a7f350082c6fb00cac49c94dcef59d4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2161,6 +2161,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2185,6 +2185,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
||||||
}
|
}
|
||||||
// Paper end - Entity origin API
|
// Paper end - Entity origin API
|
||||||
@ -16,7 +16,7 @@ index 1c3b12692094c1eaa086ebb2f060b22aaf9d9b39..211f785adf6b8bfc6b974da7898cb2f4
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onTrackingEnd(Entity entity) {
|
public void onTrackingEnd(Entity entity) {
|
||||||
@@ -2236,6 +2237,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2255,6 +2256,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
@ -11,10 +11,10 @@ For people who want all chunks to be treated equally, you can chose a fixed valu
|
|||||||
This allows to fine-tune vanilla gameplay.
|
This allows to fine-tune vanilla gameplay.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
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 53c10ed58451c317e6d45f34d6eca3072155b814..82b59b7c791216aaaaaaf2972f47bd21dac7a202 100644
|
index 60a1828d179c29514813143e3c8e93b08afe9849..963d86e7505e4d9c3854d35d9b59aed3369e8a57 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -270,6 +270,13 @@ public class LevelChunk extends ChunkAccess {
|
@@ -272,6 +272,13 @@ public class LevelChunk extends ChunkAccess {
|
||||||
return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks);
|
return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks);
|
||||||
}
|
}
|
||||||
|
|
@ -19,7 +19,7 @@ index d3a279a1a14f99aee8dd516552e5c60de92b4969..a3e0c5af4cc9323c02e88e768cbda9e4
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
||||||
index bd38ff5615bbf33b374283e3d461981b30035bb8..74ae984ac41bcdd2cc45f1bec461cdc5f69977c6 100644
|
index f1a63db8dac13efcfd73b59c7074f6817cc5dbde..62634bedd97c5be9ecce24ab0cff205715a68da8 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
||||||
@@ -41,7 +41,7 @@ public class GroundPathNavigation extends PathNavigation {
|
@@ -41,7 +41,7 @@ public class GroundPathNavigation extends PathNavigation {
|
||||||
@ -67,7 +67,7 @@ index bd38ff5615bbf33b374283e3d461981b30035bb8..74ae984ac41bcdd2cc45f1bec461cdc5
|
|||||||
|
|
||||||
private int getSurfaceY() {
|
private int getSurfaceY() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||||
index c3e1fa25b03c24c9127441d62142a96e5f81f18c..fa5088945adc5e41e34cc2dc21a1762d106254c8 100644
|
index 92addc1d3e7d0630c5db76e2a00d61b95b1430cc..21bbc98b26b270b3ad6a3b34d6e50dfb796c3d5a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||||
@@ -109,7 +109,13 @@ public abstract class PathNavigation {
|
@@ -109,7 +109,13 @@ public abstract class PathNavigation {
|
@ -11,10 +11,10 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
|
|||||||
The maximum size of the RegionFileCache is also made configurable.
|
The maximum size of the RegionFileCache is also made configurable.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
index 50a285127ee5a247680d4486ec9d5e01453b8a8e..b5b7b73048eaadfe58961631427da7574d42f5e8 100644
|
index 0697a34875fb807e39f4aae16788fe2455b8138f..9748b798f55ee0cbfdce1a2b2c48700623ef17a5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
@@ -37,7 +37,7 @@ public class RegionFileStorage implements AutoCloseable {
|
@@ -39,7 +39,7 @@ public class RegionFileStorage implements AutoCloseable {
|
||||||
if (regionfile != null) {
|
if (regionfile != null) {
|
||||||
return regionfile;
|
return regionfile;
|
||||||
} else {
|
} else {
|
24
patches/server/0089-Do-not-load-chunks-for-Pathfinding.patch
Normal file
24
patches/server/0089-Do-not-load-chunks-for-Pathfinding.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aikar <aikar@aikar.co>
|
||||||
|
Date: Thu, 31 Mar 2016 19:17:58 -0400
|
||||||
|
Subject: [PATCH] Do not load chunks for Pathfinding
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||||
|
index 6a8f44600a426041e3974aa52bdec0cc35e26591..881f41899075be32237d508fc2c38998e61a5a25 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||||
|
@@ -478,7 +478,12 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static PathType getPathTypeFromState(BlockGetter world, BlockPos pos) {
|
||||||
|
- BlockState blockState = world.getBlockState(pos);
|
||||||
|
+ // Paper start - Do not load chunks during pathfinding
|
||||||
|
+ BlockState blockState = world.getBlockStateIfLoaded(pos);
|
||||||
|
+ if (blockState == null) {
|
||||||
|
+ return BlockPathTypes.BLOCKED;
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
Block block = blockState.getBlock();
|
||||||
|
if (blockState.isAir()) {
|
||||||
|
return PathType.OPEN;
|
@ -9,10 +9,10 @@ virtual entities/entities that are not actually known to the server.
|
|||||||
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
|
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
|
||||||
index b1bc671490329379e0a61466c13ca88c49259721..3a377e887989f591c671fec31208255252b58a78 100644
|
index 1e9c68cd1868d083e6a790d56006dd4aa432010a..8a0ee9564fc36a2badf1357f7e6c47b5f1500f6c 100644
|
||||||
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
|
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
|
||||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
|
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
|
||||||
@@ -167,4 +167,14 @@ public class ServerboundInteractPacket implements Packet<ServerGamePacketListene
|
@@ -176,4 +176,14 @@ public class ServerboundInteractPacket implements Packet<ServerGamePacketListene
|
||||||
buf.writeEnum(this.hand);
|
buf.writeEnum(this.hand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,10 +28,10 @@ index b1bc671490329379e0a61466c13ca88c49259721..3a377e887989f591c671fec312082552
|
|||||||
+ // Paper end - PlayerUseUnknownEntityEvent
|
+ // Paper end - PlayerUseUnknownEntityEvent
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index f7babb4883a45244dd07eab1e87cf5fd4df83d91..19ff229f90d07447947afa8b4794b683feceb574 100644
|
index a944eb2b5dbc2a44c32cf9ea794c9b225de16a70..00043179d939e95734d56d221d79c0996321f875 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2404,7 +2404,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2486,7 +2486,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -59,10 +59,10 @@ index f7babb4883a45244dd07eab1e87cf5fd4df83d91..19ff229f90d07447947afa8b4794b683
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 5ee9726324591055bb5d00cf9646203fbe7cc833..8de2f4ca83017d37c63d33c6283078a71143f077 100644
|
index 387305bb835dca0cee7ab398d5630e3522c6162f..ff95b1f9935311ec156e41bf9aa16005df23eb27 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1856,4 +1856,13 @@ public class CraftEventFactory {
|
@@ -1851,4 +1851,13 @@ public class CraftEventFactory {
|
||||||
|
|
||||||
Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause));
|
Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause));
|
||||||
}
|
}
|
@ -9,12 +9,12 @@ of a variety of blocks that are random ticked.
|
|||||||
Co-authored-by: MrPowerGamerBR <git@mrpowergamerbr.com>
|
Co-authored-by: MrPowerGamerBR <git@mrpowergamerbr.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
||||||
index 3ce4bb344dbb8b50ef4041801e034e79f0b0d19d..66106b821d7a384a2eb0f27993beb9f4257e6815 100644
|
index a88aa3150552cea020589dd9fabf0535cec816bc..529f9f57249bd1ffa2698da76ffa9d4a284088db 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
|
||||||
@@ -92,6 +92,8 @@ public class FarmBlock extends Block {
|
@@ -93,6 +93,8 @@ public class FarmBlock extends Block {
|
||||||
@Override
|
@Override
|
||||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
||||||
int i = (Integer) state.getValue(FarmBlock.MOISTURE);
|
int i = (Integer) state.getValue(FarmBlock.MOISTURE);
|
||||||
+ if (i > 0 && world.paperConfig().tickRates.wetFarmland != 1 && (world.paperConfig().tickRates.wetFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.wetFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
|
+ if (i > 0 && world.paperConfig().tickRates.wetFarmland != 1 && (world.paperConfig().tickRates.wetFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.wetFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
|
||||||
+ if (i == 0 && world.paperConfig().tickRates.dryFarmland != 1 && (world.paperConfig().tickRates.dryFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.dryFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
|
+ if (i == 0 && world.paperConfig().tickRates.dryFarmland != 1 && (world.paperConfig().tickRates.dryFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.dryFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
|
||||||
@ -22,22 +22,14 @@ index 3ce4bb344dbb8b50ef4041801e034e79f0b0d19d..66106b821d7a384a2eb0f27993beb9f4
|
|||||||
if (!FarmBlock.isNearWater(world, pos) && !world.isRainingAt(pos.above())) {
|
if (!FarmBlock.isNearWater(world, pos) && !world.isRainingAt(pos.above())) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||||
index 65db2229dae0547c7a3e2847bba7b1a1795ce30f..4e2e80006bd4edae227af7be5ca8e3284b7494f6 100644
|
index 7a47a3c9a56bcd3c1e817c6a7db8db8465c484e1..5a39e8d359dc13383711e49ffb2d1294dad26192 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||||
@@ -3,6 +3,7 @@ package net.minecraft.world.level.block;
|
@@ -43,6 +43,7 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock {
|
||||||
import com.mojang.serialization.MapCodec;
|
|
||||||
import net.minecraft.core.BlockPos;
|
|
||||||
import net.minecraft.core.Direction;
|
|
||||||
+import net.minecraft.server.MinecraftServer;
|
|
||||||
import net.minecraft.server.level.ServerLevel;
|
|
||||||
import net.minecraft.tags.FluidTags;
|
|
||||||
import net.minecraft.util.RandomSource;
|
|
||||||
@@ -43,6 +44,7 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
||||||
+ if (this instanceof GrassBlock && world.paperConfig().tickRates.grassSpread != 1 && (world.paperConfig().tickRates.grassSpread < 1 || (MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.grassSpread != 0)) { return; } // Paper - Configurable random tick rates for blocks
|
+ if (this instanceof GrassBlock && world.paperConfig().tickRates.grassSpread != 1 && (world.paperConfig().tickRates.grassSpread < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.grassSpread != 0)) { return; } // Paper - Configurable random tick rates for blocks
|
||||||
if (!SpreadingSnowyDirtBlock.canBeGrass(state, world, pos)) {
|
if (!SpreadingSnowyDirtBlock.canBeGrass(state, world, pos)) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) {
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 211f785adf6b8bfc6b974da7898cb2f4359626c9..c9c711398cf90fc1990a0145196fa05894f9ffff 100644
|
index 5fa72cda0a7f350082c6fb00cac49c94dcef59d4..d23a2cfeddf7ef9d10b0b12e0425df759e1fd080 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1384,6 +1384,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1391,6 +1391,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
@ -5,23 +5,23 @@ Subject: [PATCH] Configurable Player Collision
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
|
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
|
||||||
index f767bc67fb2b63e0476771b7caabc702ce05c800..0f05f1c2a30fef68ae635f4a2476b8cd1b6a127d 100644
|
index 9a1a961eabd4362c171da78c6be82c867f3696a4..1d0c473442b5c72245c356054440323e3c5d4711 100644
|
||||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
|
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
|
||||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
|
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
|
||||||
@@ -198,7 +198,7 @@ public class ClientboundSetPlayerTeamPacket implements Packet<ClientGamePacketLi
|
@@ -200,7 +200,7 @@ public class ClientboundSetPlayerTeamPacket implements Packet<ClientGamePacketLi
|
||||||
buf.writeComponent(this.displayName);
|
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.displayName);
|
||||||
buf.writeByte(this.options);
|
buf.writeByte(this.options);
|
||||||
buf.writeUtf(this.nametagVisibility);
|
buf.writeUtf(this.nametagVisibility);
|
||||||
- buf.writeUtf(this.collisionRule);
|
- buf.writeUtf(this.collisionRule);
|
||||||
+ buf.writeUtf(!io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions ? "never" : this.collisionRule); // Paper - Configurable player collision
|
+ buf.writeUtf(!io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions ? "never" : this.collisionRule); // Paper - Configurable player collision
|
||||||
buf.writeEnum(this.color);
|
buf.writeEnum(this.color);
|
||||||
buf.writeComponent(this.playerPrefix);
|
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.playerPrefix);
|
||||||
buf.writeComponent(this.playerSuffix);
|
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.playerSuffix);
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index cc48cb8c4863db3cb2eb2b4317384fe7e4180ed9..e6f1a98d4239318944e1ed6128cf8493c795602b 100644
|
index d5b5eb914278fbd85921c039a8da3492dcbd6168..f46c8dd1ab752a88a3292f82720b27b250625982 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -622,6 +622,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -636,6 +636,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,12 +41,12 @@ index cc48cb8c4863db3cb2eb2b4317384fe7e4180ed9..e6f1a98d4239318944e1ed6128cf8493
|
|||||||
+
|
+
|
||||||
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
|
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
|
||||||
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
||||||
this.connection.acceptConnections();
|
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 50ceb120d04c3149dd1cca7908a9ea862b25e5ab..e1d9f11a9d5333811fc8cb5dd95c0ca79fd3543c 100644
|
index 8f3bcb7183ed09e9c2a16e26b5b3ac125aa57d90..fa85bf581ff2ff8de50355c3b5bf74d38ef9ffc1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -157,6 +157,7 @@ public abstract class PlayerList {
|
@@ -159,6 +159,7 @@ public abstract class PlayerList {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
private CraftServer cserver;
|
private CraftServer cserver;
|
||||||
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
|
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
|
||||||
@ -54,7 +54,7 @@ index 50ceb120d04c3149dd1cca7908a9ea862b25e5ab..e1d9f11a9d5333811fc8cb5dd95c0ca7
|
|||||||
|
|
||||||
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||||
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
||||||
@@ -399,6 +400,13 @@ public abstract class PlayerList {
|
@@ -397,6 +398,13 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
player.initInventoryMenu();
|
player.initInventoryMenu();
|
||||||
// CraftBukkit - Moved from above, added world
|
// CraftBukkit - Moved from above, added world
|
||||||
@ -68,7 +68,7 @@ index 50ceb120d04c3149dd1cca7908a9ea862b25e5ab..e1d9f11a9d5333811fc8cb5dd95c0ca7
|
|||||||
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,6 +530,16 @@ public abstract class PlayerList {
|
@@ -519,6 +527,16 @@ public abstract class PlayerList {
|
||||||
entityplayer.doTick(); // SPIGOT-924
|
entityplayer.doTick(); // SPIGOT-924
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ index 50ceb120d04c3149dd1cca7908a9ea862b25e5ab..e1d9f11a9d5333811fc8cb5dd95c0ca7
|
|||||||
this.save(entityplayer);
|
this.save(entityplayer);
|
||||||
if (entityplayer.isPassenger()) {
|
if (entityplayer.isPassenger()) {
|
||||||
Entity entity = entityplayer.getRootVehicle();
|
Entity entity = entityplayer.getRootVehicle();
|
||||||
@@ -1162,6 +1180,13 @@ public abstract class PlayerList {
|
@@ -1160,6 +1178,13 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
@ -0,0 +1,56 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: kashike <kashike@vq.lc>
|
||||||
|
Date: Wed, 13 Apr 2016 20:21:38 -0700
|
||||||
|
Subject: [PATCH] Add handshake event to allow plugins to handle client
|
||||||
|
handshaking logic themselves
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
|
index 3634740acd1ca7c13956c56508db5892fd00edc9..9214fb6b8e21ff6aee8be0691f1fe6e41c901ba3 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
|
@@ -120,9 +120,43 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||||
|
this.connection.disconnect(ichatmutablecomponent);
|
||||||
|
} else {
|
||||||
|
this.connection.setupInboundProtocol(LoginProtocols.SERVERBOUND, new ServerLoginPacketListenerImpl(this.server, this.connection, transfer));
|
||||||
|
+ // Paper start - PlayerHandshakeEvent
|
||||||
|
+ boolean proxyLogicEnabled = org.spigotmc.SpigotConfig.bungee;
|
||||||
|
+ boolean handledByEvent = false;
|
||||||
|
+ // Try and handle the handshake through the event
|
||||||
|
+ if (com.destroystokyo.paper.event.player.PlayerHandshakeEvent.getHandlerList().getRegisteredListeners().length != 0) { // Hello? Can you hear me?
|
||||||
|
+ java.net.SocketAddress socketAddress = this.connection.address;
|
||||||
|
+ String hostnameOfRemote = socketAddress instanceof java.net.InetSocketAddress ? ((java.net.InetSocketAddress) socketAddress).getHostString() : InetAddress.getLoopbackAddress().getHostAddress();
|
||||||
|
+ com.destroystokyo.paper.event.player.PlayerHandshakeEvent event = new com.destroystokyo.paper.event.player.PlayerHandshakeEvent(packet.hostName(), hostnameOfRemote, !proxyLogicEnabled);
|
||||||
|
+ if (event.callEvent()) {
|
||||||
|
+ // If we've failed somehow, let the client know so and go no further.
|
||||||
|
+ if (event.isFailed()) {
|
||||||
|
+ Component component = io.papermc.paper.adventure.PaperAdventure.asVanilla(event.failMessage());
|
||||||
|
+ this.connection.send(new ClientboundLoginDisconnectPacket(component));
|
||||||
|
+ this.connection.disconnect(component);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (event.getServerHostname() != null) {
|
||||||
|
+ // change hostname
|
||||||
|
+ packet = new ClientIntentionPacket(
|
||||||
|
+ packet.protocolVersion(),
|
||||||
|
+ event.getServerHostname(),
|
||||||
|
+ packet.port(),
|
||||||
|
+ packet.intention()
|
||||||
|
+ );
|
||||||
|
+ }
|
||||||
|
+ if (event.getSocketAddressHostname() != null) this.connection.address = new java.net.InetSocketAddress(event.getSocketAddressHostname(), socketAddress instanceof java.net.InetSocketAddress ? ((java.net.InetSocketAddress) socketAddress).getPort() : 0);
|
||||||
|
+ this.connection.spoofedUUID = event.getUniqueId();
|
||||||
|
+ this.connection.spoofedProfile = gson.fromJson(event.getPropertiesJson(), com.mojang.authlib.properties.Property[].class);
|
||||||
|
+ handledByEvent = true; // Hooray, we did it!
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
// Spigot Start
|
||||||
|
String[] split = packet.hostName().split("\00");
|
||||||
|
- if (org.spigotmc.SpigotConfig.bungee) {
|
||||||
|
+ if (!handledByEvent && proxyLogicEnabled) { // Paper
|
||||||
|
+ // if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
|
||||||
|
if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) {
|
||||||
|
this.connection.hostname = split[0];
|
||||||
|
this.connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());
|
@ -9,19 +9,19 @@ For servers with multiple IP's, ability to bind to a specific interface.
|
|||||||
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
|
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||||
index d64ac84d4c5ef3dd3054a601deee128d3069686b..90fe26a546eeebf90ccf7f899103346cdb3ae702 100644
|
index 946b9b9283ca345d711d40cc2cd04039fec5c77b..502e5386ec4306de93148266f60810ec52ae5ab2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||||
@@ -108,6 +108,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
@@ -109,6 +109,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||||
private final DedicatedServerProperties.WorldDimensionData worldDimensionData;
|
|
||||||
public final WorldOptions worldOptions;
|
public final WorldOptions worldOptions;
|
||||||
|
public boolean acceptsTransfers;
|
||||||
|
|
||||||
+ public final String rconIp; // Paper - Configurable rcon ip
|
+ public final String rconIp; // Paper - Configurable rcon ip
|
||||||
+
|
+
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public DedicatedServerProperties(Properties properties, OptionSet optionset) {
|
public DedicatedServerProperties(Properties properties, OptionSet optionset) {
|
||||||
super(properties, optionset);
|
super(properties, optionset);
|
||||||
@@ -166,6 +168,10 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
@@ -169,6 +171,10 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||||
}, WorldPresets.NORMAL.location().toString()));
|
}, WorldPresets.NORMAL.location().toString()));
|
||||||
this.serverResourcePackInfo = DedicatedServerProperties.getServerPackInfo(this.get("resource-pack-id", ""), this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.get("resource-pack-prompt", ""));
|
this.serverResourcePackInfo = DedicatedServerProperties.getServerPackInfo(this.get("resource-pack-id", ""), this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.get("resource-pack-prompt", ""));
|
||||||
this.initialDataPackConfiguration = DedicatedServerProperties.getDatapackConfig(this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())), this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled())));
|
this.initialDataPackConfiguration = DedicatedServerProperties.getDatapackConfig(this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())), this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled())));
|
@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
|
|||||||
Don't even get me started
|
Don't even get me started
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 8447a47e1c493001ea9f54392e02f14da14cb25d..eec88cb65aae7986e53cba336f6e0bf5ff3011b3 100644
|
index f02b12f3853bf4bf29b59a505f06cb98bddb40ff..399c12a2b14df4786c8e13484a54a73ad8571410 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -1331,10 +1331,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1344,10 +1344,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
|
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
|
||||||
@ -28,10 +28,10 @@ index 8447a47e1c493001ea9f54392e02f14da14cb25d..eec88cb65aae7986e53cba336f6e0bf5
|
|||||||
if (this.valid) {
|
if (this.valid) {
|
||||||
this.level().getCraftServer().getPluginManager().callEvent(event);
|
this.level().getCraftServer().getPluginManager().callEvent(event);
|
||||||
diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java
|
diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java
|
||||||
index 14b2c31909adc0e8e828d9a563ce7d33d73b2a5a..c3448707fd8a632b457cc97b35d08a9c6933d5ee 100644
|
index b03ed15e55bab7b2cd68be9f04b286436cf878d5..b89860d451d92ddda64b7e4144542b7fc5fd86f0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/food/FoodData.java
|
--- a/src/main/java/net/minecraft/world/food/FoodData.java
|
||||||
+++ b/src/main/java/net/minecraft/world/food/FoodData.java
|
+++ b/src/main/java/net/minecraft/world/food/FoodData.java
|
||||||
@@ -83,7 +83,7 @@ public class FoodData {
|
@@ -88,7 +88,7 @@ public class FoodData {
|
||||||
if (this.tickTimer >= this.saturatedRegenRate) { // CraftBukkit
|
if (this.tickTimer >= this.saturatedRegenRate) { // CraftBukkit
|
||||||
float f = Math.min(this.saturationLevel, 6.0F);
|
float f = Math.min(this.saturationLevel, 6.0F);
|
||||||
|
|
@ -5,13 +5,13 @@ Subject: [PATCH] Add ability to configure frosted_ice properties
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||||
index cabe67a97f3f9058d5671cb5a1a94ff4e9ef199b..1b61e5139d3183de8f9a375e8ef24d302861727d 100644
|
index 4d711c0c381ffdda00cbd97fc446a68e25a04c44..83904d2d5e0bd27257a775edab8c55b4a0bb804a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||||
@@ -40,6 +40,7 @@ public class FrostedIceBlock extends IceBlock {
|
@@ -40,6 +40,7 @@ public class FrostedIceBlock extends IceBlock {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
||||||
+ if (!world.paperConfig().environment.frostedIce.enabled) return; // Paper - Frosted ice options
|
+ if (!world.paperConfig().environment.frostedIce.enabled) return; // Paper - Frosted ice options
|
||||||
if ((random.nextInt(3) == 0 || this.fewerNeigboursThan(world, pos, 4))
|
if ((random.nextInt(3) == 0 || this.fewerNeigboursThan(world, pos, 4))
|
||||||
&& world.getMaxLocalRawBrightness(pos) > 11 - state.getValue(AGE) - state.getLightBlock(world, pos)
|
&& world.getMaxLocalRawBrightness(pos) > 11 - state.getValue(AGE) - state.getLightBlock(world, pos)
|
@ -6,10 +6,10 @@ Subject: [PATCH] remove null possibility for getServer singleton
|
|||||||
to stop IDE complaining about potential NPE
|
to stop IDE complaining about potential NPE
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index e6f1a98d4239318944e1ed6128cf8493c795602b..7c403b67179fafe2aeb0f622a63c010bfa742781 100644
|
index f46c8dd1ab752a88a3292f82720b27b250625982..ae4a8cb0fb3e36710fedd9a71d0e0efdf0895015 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -190,6 +190,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
@@ -194,6 +194,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||||
|
|
||||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, CommandSource, AutoCloseable {
|
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, CommandSource, AutoCloseable {
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ index e6f1a98d4239318944e1ed6128cf8493c795602b..7c403b67179fafe2aeb0f622a63c010b
|
|||||||
public static final Logger LOGGER = LogUtils.getLogger();
|
public static final Logger LOGGER = LogUtils.getLogger();
|
||||||
public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
|
public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
|
||||||
public static final String VANILLA_BRAND = "vanilla";
|
public static final String VANILLA_BRAND = "vanilla";
|
||||||
@@ -321,6 +322,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -327,6 +328,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||||
super("Server");
|
super("Server");
|
||||||
@ -25,7 +25,7 @@ index e6f1a98d4239318944e1ed6128cf8493c795602b..7c403b67179fafe2aeb0f622a63c010b
|
|||||||
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
||||||
this.profiler = this.metricsRecorder.getProfiler();
|
this.profiler = this.metricsRecorder.getProfiler();
|
||||||
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
||||||
@@ -2425,9 +2427,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2529,9 +2531,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,5 +34,5 @@ index e6f1a98d4239318944e1ed6128cf8493c795602b..7c403b67179fafe2aeb0f622a63c010b
|
|||||||
- return (Bukkit.getServer() instanceof CraftServer) ? ((CraftServer) Bukkit.getServer()).getServer() : null;
|
- return (Bukkit.getServer() instanceof CraftServer) ? ((CraftServer) Bukkit.getServer()).getServer() : null;
|
||||||
+ return SERVER; // Paper
|
+ return SERVER; // Paper
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
|
||||||
|
|
||||||
|
@Deprecated
|
@ -5,14 +5,14 @@ Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
|
diff --git a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
|
||||||
index 0b45e366b8e37d4d22061b273eec9e8c5376ef06..7eb1c28886741bdfe7985d16b6824f3e85ffae50 100644
|
index 4a01558a1c3d9cfcd043ad3998514311fe8f63d9..b679bbdfa307d3aa9f2f5e4c70c559695b2733de 100644
|
||||||
--- a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
|
--- a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
|
||||||
+++ b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
|
+++ b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
|
||||||
@@ -144,6 +144,7 @@ public class ScoreboardSaveData extends SavedData {
|
@@ -148,6 +148,7 @@ public class ScoreboardSaveData extends SavedData {
|
||||||
ListTag listTag = new ListTag();
|
ListTag listTag = new ListTag();
|
||||||
|
|
||||||
for (PlayerTeam playerTeam : this.scoreboard.getPlayerTeams()) {
|
for (PlayerTeam playerTeam : this.scoreboard.getPlayerTeams()) {
|
||||||
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().scoreboards.saveEmptyScoreboardTeams && playerTeam.getPlayers().isEmpty()) continue; // Paper - Don't save empty scoreboard teams to scoreboard.dat
|
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().scoreboards.saveEmptyScoreboardTeams && playerTeam.getPlayers().isEmpty()) continue; // Paper - Don't save empty scoreboard teams to scoreboard.dat
|
||||||
CompoundTag compoundTag = new CompoundTag();
|
CompoundTag compoundTag = new CompoundTag();
|
||||||
compoundTag.putString("Name", playerTeam.getName());
|
compoundTag.putString("Name", playerTeam.getName());
|
||||||
compoundTag.putString("DisplayName", Component.Serializer.toJson(playerTeam.getDisplayName()));
|
compoundTag.putString("DisplayName", Component.Serializer.toJson(playerTeam.getDisplayName(), registries));
|
@ -504,10 +504,10 @@ index 0000000000000000000000000000000000000000..9cfa5d36a6991067a3866e0d437749fa
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 52220795bf8a73c63837b4e07b1abf99c0344322..a6a97dca29c900278885b5ab1741229fcfaf7b36 100644
|
index bc098b6a9c0e3b19b9154ab3727949232bddb20a..10687787a5fd1a81ad5a625848db4649381eab67 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -239,6 +239,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -242,6 +242,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
}
|
}
|
||||||
// Paper end - Share random for entities to make them more random
|
// Paper end - Share random for entities to make them more random
|
||||||
|
|
||||||
@ -516,11 +516,11 @@ index 52220795bf8a73c63837b4e07b1abf99c0344322..a6a97dca29c900278885b5ab1741229f
|
|||||||
|
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||||
index c163a1219e614ab12b17ae9ba9c7cc4721cecc84..756d0434472921992c9d84597d7c9c824e93614c 100644
|
index 67840327e934b631a85cf2d64911f5cfab4402b1..2704389bc3ec6dbbf1b568a4380972f8c0d62d15 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||||
@@ -33,6 +33,20 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
@@ -35,6 +35,20 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
||||||
public ResourceLocation lootTable;
|
public ResourceKey<LootTable> lootTable;
|
||||||
public long lootTableSeed;
|
public long lootTableSeed;
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
@ -540,42 +540,42 @@ index c163a1219e614ab12b17ae9ba9c7cc4721cecc84..756d0434472921992c9d84597d7c9c82
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
||||||
private int maxStack = MAX_STACK;
|
private int maxStack = MAX_STACK;
|
||||||
@@ -142,12 +156,14 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
@@ -144,12 +158,14 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
||||||
@Override
|
@Override
|
||||||
protected void addAdditionalSaveData(CompoundTag nbt) {
|
protected void addAdditionalSaveData(CompoundTag nbt) {
|
||||||
super.addAdditionalSaveData(nbt);
|
super.addAdditionalSaveData(nbt);
|
||||||
+ this.lootableData.saveNbt(nbt); // Paper
|
+ this.lootableData.saveNbt(nbt); // Paper
|
||||||
this.addChestVehicleSaveData(nbt);
|
this.addChestVehicleSaveData(nbt, this.registryAccess());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void readAdditionalSaveData(CompoundTag nbt) {
|
protected void readAdditionalSaveData(CompoundTag nbt) {
|
||||||
super.readAdditionalSaveData(nbt);
|
super.readAdditionalSaveData(nbt);
|
||||||
+ this.lootableData.loadNbt(nbt); // Paper
|
+ this.lootableData.loadNbt(nbt); // Paper
|
||||||
this.readChestVehicleSaveData(nbt);
|
this.readChestVehicleSaveData(nbt, this.registryAccess());
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||||
index 0e68f692bb9b397cffd7352e7340465b5e3719f4..58af87b8faf4f8d6bdb111c49a429466acface68 100644
|
index 025e57993b85402c48db29d65ea3ceaf277ff27a..b04f7ce0805453f6c737fa9dc11c4129ca64e934 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||||
@@ -68,12 +68,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
@@ -70,12 +70,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||||
@Override
|
@Override
|
||||||
protected void addAdditionalSaveData(CompoundTag nbt) {
|
protected void addAdditionalSaveData(CompoundTag nbt) {
|
||||||
super.addAdditionalSaveData(nbt);
|
super.addAdditionalSaveData(nbt);
|
||||||
+ this.lootableData.saveNbt(nbt); // Paper
|
+ this.lootableData.saveNbt(nbt); // Paper
|
||||||
this.addChestVehicleSaveData(nbt);
|
this.addChestVehicleSaveData(nbt, this.registryAccess());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void readAdditionalSaveData(CompoundTag nbt) {
|
protected void readAdditionalSaveData(CompoundTag nbt) {
|
||||||
super.readAdditionalSaveData(nbt);
|
super.readAdditionalSaveData(nbt);
|
||||||
+ this.lootableData.loadNbt(nbt); // Paper
|
+ this.lootableData.loadNbt(nbt); // Paper
|
||||||
this.readChestVehicleSaveData(nbt);
|
this.readChestVehicleSaveData(nbt, this.registryAccess());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,6 +257,20 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
@@ -257,6 +259,20 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||||
this.level().gameEvent(GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player));
|
this.level().gameEvent((Holder) GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player));
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
@ -596,38 +596,38 @@ index 0e68f692bb9b397cffd7352e7340465b5e3719f4..58af87b8faf4f8d6bdb111c49a429466
|
|||||||
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
||||||
private int maxStack = MAX_STACK;
|
private int maxStack = MAX_STACK;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||||
index 23551b97bdd865c30d7402cff0e221cfe4b1d9d4..f4ad1eea5bced6997edbc3a5ed1360b12b70f68f 100644
|
index dbde2402fd46b0d06e8efeb90be6fb98d7ae7798..f33e5cf6d456e615050047e924d9b24268a2c51e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||||
@@ -59,9 +59,8 @@ public interface ContainerEntity extends Container, MenuProvider {
|
@@ -65,9 +65,8 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||||
if (this.getLootTableSeed() != 0L) {
|
if (this.getLootTableSeed() != 0L) {
|
||||||
nbt.putLong("LootTableSeed", this.getLootTableSeed());
|
nbt.putLong("LootTableSeed", this.getLootTableSeed());
|
||||||
}
|
}
|
||||||
- } else {
|
- } else {
|
||||||
- ContainerHelper.saveAllItems(nbt, this.getItemStacks());
|
- ContainerHelper.saveAllItems(nbt, this.getItemStacks(), registriesLookup);
|
||||||
}
|
}
|
||||||
+ ContainerHelper.saveAllItems(nbt, this.getItemStacks()); // Paper - always save the items, table may still remain
|
+ ContainerHelper.saveAllItems(nbt, this.getItemStacks(), registriesLookup); // Paper - always save the items, table may still remain
|
||||||
}
|
}
|
||||||
|
|
||||||
default void readChestVehicleSaveData(CompoundTag nbt) {
|
default void readChestVehicleSaveData(CompoundTag nbt, HolderLookup.Provider registriesLookup) {
|
||||||
@@ -69,9 +68,8 @@ public interface ContainerEntity extends Container, MenuProvider {
|
@@ -75,9 +74,8 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||||
if (nbt.contains("LootTable", 8)) {
|
if (nbt.contains("LootTable", 8)) {
|
||||||
this.setLootTable(new ResourceLocation(nbt.getString("LootTable")));
|
this.setLootTable(ResourceKey.create(Registries.LOOT_TABLE, new ResourceLocation(nbt.getString("LootTable"))));
|
||||||
this.setLootTableSeed(nbt.getLong("LootTableSeed"));
|
this.setLootTableSeed(nbt.getLong("LootTableSeed"));
|
||||||
- } else {
|
- } else {
|
||||||
- ContainerHelper.loadAllItems(nbt, this.getItemStacks());
|
- ContainerHelper.loadAllItems(nbt, this.getItemStacks(), registriesLookup);
|
||||||
}
|
}
|
||||||
+ ContainerHelper.loadAllItems(nbt, this.getItemStacks()); // Paper - always load the items, table may still remain
|
+ ContainerHelper.loadAllItems(nbt, this.getItemStacks(), registriesLookup); // Paper - always save the items, table may still remain
|
||||||
}
|
}
|
||||||
|
|
||||||
default void chestVehicleDestroyed(DamageSource source, Level world, Entity vehicle) {
|
default void chestVehicleDestroyed(DamageSource source, Level world, Entity vehicle) {
|
||||||
@@ -93,13 +91,13 @@ public interface ContainerEntity extends Container, MenuProvider {
|
@@ -99,13 +97,13 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||||
|
|
||||||
default void unpackChestVehicleLootTable(@Nullable Player player) {
|
default void unpackChestVehicleLootTable(@Nullable Player player) {
|
||||||
MinecraftServer minecraftServer = this.level().getServer();
|
MinecraftServer minecraftServer = this.level().getServer();
|
||||||
- if (this.getLootTable() != null && minecraftServer != null) {
|
- if (this.getLootTable() != null && minecraftServer != null) {
|
||||||
+ if (this.getLootableData().shouldReplenish(player) && minecraftServer != null) { // Paper
|
+ if (this.getLootableData().shouldReplenish(player) && minecraftServer != null) { // Paper
|
||||||
LootTable lootTable = minecraftServer.getLootData().getLootTable(this.getLootTable());
|
LootTable lootTable = minecraftServer.reloadableRegistries().getLootTable(this.getLootTable());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
CriteriaTriggers.GENERATE_LOOT.trigger((ServerPlayer)player, this.getLootTable());
|
CriteriaTriggers.GENERATE_LOOT.trigger((ServerPlayer)player, this.getLootTable());
|
||||||
}
|
}
|
||||||
@ -637,9 +637,9 @@ index 23551b97bdd865c30d7402cff0e221cfe4b1d9d4..f4ad1eea5bced6997edbc3a5ed1360b1
|
|||||||
LootParams.Builder builder = new LootParams.Builder((ServerLevel)this.level()).withParameter(LootContextParams.ORIGIN, this.position());
|
LootParams.Builder builder = new LootParams.Builder((ServerLevel)this.level()).withParameter(LootContextParams.ORIGIN, this.position());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player);
|
builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player);
|
||||||
@@ -171,4 +169,13 @@ public interface ContainerEntity extends Container, MenuProvider {
|
@@ -175,4 +173,13 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||||
default boolean isChestVehicleStillValid(Player player) {
|
default boolean isChestVehicleStillValid(Player player) {
|
||||||
return !this.isRemoved() && this.position().closerThan(player.position(), 8.0);
|
return !this.isRemoved() && player.canInteractWithEntity(this.getBoundingBox(), 4.0);
|
||||||
}
|
}
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ default Entity getEntity() {
|
+ default Entity getEntity() {
|
||||||
@ -652,18 +652,18 @@ index 23551b97bdd865c30d7402cff0e221cfe4b1d9d4..f4ad1eea5bced6997edbc3a5ed1360b1
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||||
index 1c3763d892e4e2df23ccf7a9fdb126e59b36ab65..f33c4633094002a3dd0c54353b62f7b358628be3 100644
|
index c2493c15d8fe4587d6ee2db100cc13303b66b39b..218b2b50aa6ebdf1768da21ad61be888f620565e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||||
@@ -17,6 +17,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
@@ -19,6 +19,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||||
@Nullable
|
@Nullable
|
||||||
public ResourceLocation lootTable;
|
public ResourceKey<LootTable> lootTable;
|
||||||
public long lootTableSeed;
|
public long lootTableSeed = 0L;
|
||||||
+ public final com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData = new com.destroystokyo.paper.loottable.PaperLootableInventoryData(new com.destroystokyo.paper.loottable.PaperTileEntityLootableInventory(this)); // Paper
|
+ public final com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData = new com.destroystokyo.paper.loottable.PaperLootableInventoryData(new com.destroystokyo.paper.loottable.PaperTileEntityLootableInventory(this)); // Paper
|
||||||
|
|
||||||
protected RandomizableContainerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
protected RandomizableContainerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||||
super(type, pos, state);
|
super(type, pos, state);
|
||||||
@@ -43,6 +44,52 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
@@ -45,6 +46,52 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||||
this.lootTableSeed = lootTableSeed;
|
this.lootTableSeed = lootTableSeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -717,23 +717,23 @@ index 1c3763d892e4e2df23ccf7a9fdb126e59b36ab65..f33c4633094002a3dd0c54353b62f7b3
|
|||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
this.unpackLootTable(null);
|
this.unpackLootTable(null);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
|
||||||
index 86076a9d2a3b1044c96518cbaeee66d60a8a22c6..c268513bc5719d80e1c3d73de53b85ec7f852fa9 100644
|
index 949e074a32b6593bd8b7405499e686a074e283e5..398ffe274bddee2b01350b9490def3d2fe854917 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
|
||||||
@@ -64,7 +64,7 @@ public class CraftBrushableBlock extends CraftBlockEntityState<BrushableBlockEnt
|
@@ -58,7 +58,7 @@ public class CraftBrushableBlock extends CraftBlockEntityState<BrushableBlockEnt
|
||||||
this.setLootTable(this.getLootTable(), seed);
|
this.setLootTable(this.getLootTable(), seed);
|
||||||
}
|
}
|
||||||
|
|
||||||
- private void setLootTable(LootTable table, long seed) {
|
- private void setLootTable(LootTable table, long seed) {
|
||||||
+ public void setLootTable(LootTable table, long seed) { // Paper - make public since it overrides a public method
|
+ public void setLootTable(LootTable table, long seed) { // Paper - make public since it overrides a public method
|
||||||
ResourceLocation key = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
|
this.getSnapshot().setLootTable(CraftLootTable.bukkitToMinecraft(table), seed);
|
||||||
this.getSnapshot().setLootTable(key, seed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
||||||
index 58bd3c4b328b5e792c9ed8dfcdfa0f5ddcc83092..b742d9d231bf79ed53d3fe4deaa81e64c6801c4c 100644
|
index 2b6a93a944b27290745278957a3577772b7b8212..29df470d6706a33dad4317a9aa599456d5c7f6ee 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
||||||
@@ -12,8 +12,9 @@ import org.bukkit.craftbukkit.CraftWorld;
|
@@ -13,8 +13,9 @@ import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest;
|
import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
@ -745,10 +745,10 @@ index 58bd3c4b328b5e792c9ed8dfcdfa0f5ddcc83092..b742d9d231bf79ed53d3fe4deaa81e64
|
|||||||
public CraftChest(World world, ChestBlockEntity tileEntity) {
|
public CraftChest(World world, ChestBlockEntity tileEntity) {
|
||||||
super(world, tileEntity);
|
super(world, tileEntity);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||||
index 2803e34bd29fd7a965093b507f11b5ee83bc5f09..f6942cb3ef1f9ef03708d4bc932ea9aeb1c13894 100644
|
index 74315a46f6101775321b1cf4944c124c69aed182..c3215f15b3088199dcf96f62b58d0ec7c2b4125c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||||
@@ -9,7 +9,7 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
@@ -8,7 +8,7 @@ import org.bukkit.craftbukkit.CraftLootTable;
|
||||||
import org.bukkit.loot.LootTable;
|
import org.bukkit.loot.LootTable;
|
||||||
import org.bukkit.loot.Lootable;
|
import org.bukkit.loot.Lootable;
|
||||||
|
|
||||||
@ -758,10 +758,10 @@ index 2803e34bd29fd7a965093b507f11b5ee83bc5f09..f6942cb3ef1f9ef03708d4bc932ea9ae
|
|||||||
public CraftLootable(World world, T tileEntity) {
|
public CraftLootable(World world, T tileEntity) {
|
||||||
super(world, tileEntity);
|
super(world, tileEntity);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
|
||||||
index cc3f70fafea2d5c3a878cfe3e0a2db39ae713bf6..f1844d697b91e61878ade5b922cf2a3a538365c7 100644
|
index cfde210ea9d4b62fe514d3ab0dbab2f43eda0c7a..c0f6939ed782dd3151ebd7ee9d3d7e292154e76c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
|
||||||
@@ -10,8 +10,7 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
@@ -7,8 +7,7 @@ import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.loot.LootTable;
|
import org.bukkit.loot.LootTable;
|
||||||
|
|
||||||
@ -771,15 +771,15 @@ index cc3f70fafea2d5c3a878cfe3e0a2db39ae713bf6..f1844d697b91e61878ade5b922cf2a3a
|
|||||||
private final Inventory inventory;
|
private final Inventory inventory;
|
||||||
|
|
||||||
public CraftChestBoat(CraftServer server, ChestBoat entity) {
|
public CraftChestBoat(CraftServer server, ChestBoat entity) {
|
||||||
@@ -60,7 +59,7 @@ public class CraftChestBoat extends CraftBoat implements org.bukkit.entity.Chest
|
@@ -51,7 +50,7 @@ public class CraftChestBoat extends CraftBoat implements org.bukkit.entity.Chest
|
||||||
return this.getHandle().getLootTableSeed();
|
return this.getHandle().getLootTableSeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
- private void setLootTable(LootTable table, long seed) {
|
- private void setLootTable(LootTable table, long seed) {
|
||||||
+ public void setLootTable(LootTable table, long seed) { // Paper - change visibility since it overrides a public method
|
+ public void setLootTable(LootTable table, long seed) { // Paper - change visibility since it overrides a public method
|
||||||
ResourceLocation newKey = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
|
this.getHandle().setLootTable(CraftLootTable.bukkitToMinecraft(table));
|
||||||
this.getHandle().setLootTable(newKey);
|
|
||||||
this.getHandle().setLootTableSeed(seed);
|
this.getHandle().setLootTableSeed(seed);
|
||||||
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
||||||
index fd42f0b20132d08039ca7735d31a61806a6b07dc..b1a708de6790bbe336202b13ab862ced78de084f 100644
|
index fd42f0b20132d08039ca7735d31a61806a6b07dc..b1a708de6790bbe336202b13ab862ced78de084f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
@ -5,7 +5,7 @@ Subject: [PATCH] System property for disabling watchdoge
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
index 4bfc2f1729e45e36307a98bd69de9c820123cb8e..ce17005f8c255eb3096736ef9f0d1de64b612d79 100644
|
index 35c90aaee30980610d168c01cbe9abfe04331cb8..81ccbe2533e6fc5899d6c068e421e0d7f1351d34 100644
|
||||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
@@ -61,7 +61,7 @@ public class WatchdogThread extends Thread
|
@@ -61,7 +61,7 @@ public class WatchdogThread extends Thread
|
@ -5,10 +5,10 @@ Subject: [PATCH] Async GameProfileCache saving
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 7c403b67179fafe2aeb0f622a63c010bfa742781..04cc2b69336ceb463910c081119f3188d8c426d3 100644
|
index ae4a8cb0fb3e36710fedd9a71d0e0efdf0895015..1ecd28b709e3ef47568298878a84a6aede52d6f5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -980,7 +980,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -995,7 +995,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
} catch (java.lang.InterruptedException ignored) {} // Paper
|
} catch (java.lang.InterruptedException ignored) {} // Paper
|
||||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||||
MinecraftServer.LOGGER.info("Saving usercache.json");
|
MinecraftServer.LOGGER.info("Saving usercache.json");
|
||||||
@ -18,10 +18,10 @@ index 7c403b67179fafe2aeb0f622a63c010bfa742781..04cc2b69336ceb463910c081119f3188
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 88d45e52bc1105c4351ec5be39e3829ecfa8c1b6..590da3a7acef406589e665652ccc46e01cc28e1b 100644
|
index a6126515e497cb0769bdc96881389026196bbbae..2caebd76cd533cf6874b6461b496e76e8ec85d61 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -242,7 +242,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -266,7 +266,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.convertOldUsers()) {
|
if (this.convertOldUsers()) {
|
||||||
@ -31,7 +31,7 @@ index 88d45e52bc1105c4351ec5be39e3829ecfa8c1b6..590da3a7acef406589e665652ccc46e0
|
|||||||
|
|
||||||
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
|
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
index f5ac34923eb29a4d8df59d35f3381cdf08f74cf6..370cf30a6411577ec8ed7a32e473217e2f64782b 100644
|
index f6e290bf4480da51512f8a166459687dad1f6a07..5b219b5eee0c5958b80093c9223feeed0dec830b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
@@ -117,7 +117,7 @@ public class GameProfileCache {
|
@@ -117,7 +117,7 @@ public class GameProfileCache {
|
||||||
@ -53,7 +53,7 @@ index f5ac34923eb29a4d8df59d35f3381cdf08f74cf6..370cf30a6411577ec8ed7a32e473217e
|
|||||||
|
|
||||||
return optional;
|
return optional;
|
||||||
@@ -262,7 +262,7 @@ public class GameProfileCache {
|
@@ -262,7 +262,7 @@ public class GameProfileCache {
|
||||||
return arraylist;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
- public void save() {
|
- public void save() {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Optional TNT doesn't move in water
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index f068b57167b183e68db897c70036cdc366a83c98..16f9d38687c0fdda18468b5bfb61b09b98254968 100644
|
index f127cac376cf4d0e585d12cd5976a3aee567403a..4772e7978858263702312669f400d3da9c486730 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -107,6 +107,27 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -107,6 +107,27 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
@ -36,7 +36,7 @@ index f068b57167b183e68db897c70036cdc366a83c98..16f9d38687c0fdda18468b5bfb61b09b
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void explode() {
|
private void explode() {
|
||||||
@@ -172,4 +193,11 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -165,4 +186,11 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
public BlockState getBlockState() {
|
public BlockState getBlockState() {
|
||||||
return (BlockState) this.entityData.get(PrimedTnt.DATA_BLOCK_STATE_ID);
|
return (BlockState) this.entityData.get(PrimedTnt.DATA_BLOCK_STATE_ID);
|
||||||
}
|
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Faster redstone torch rapid clock removal
|
|||||||
Only resize the the redstone torch list once, since resizing arrays / lists is costly
|
Only resize the the redstone torch list once, since resizing arrays / lists is costly
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 424377f062c6443460a9814feb8b90e7bef71c6a..0137f61a572800ea7bb013185835a1ad4cd0462c 100644
|
index 2a7d2eea46e05d85ce3e72a69dfd26a671a882ac..afb1c203f6299b90179244b4b0d0c6332f961e35 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -171,6 +171,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
private org.spigotmc.TickLimiter tileLimiter;
|
private org.spigotmc.TickLimiter tileLimiter;
|
||||||
private int tileTickPosition;
|
private int tileTickPosition;
|
||||||
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
|
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
|
||||||
@ -18,7 +18,7 @@ index 424377f062c6443460a9814feb8b90e7bef71c6a..0137f61a572800ea7bb013185835a1ad
|
|||||||
public CraftWorld getWorld() {
|
public CraftWorld getWorld() {
|
||||||
return this.world;
|
return this.world;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java
|
||||||
index 68da47c3ec59518a4bbeb03c196ef0e7c6b5d049..1dbfda52a4423fb031eecad24e5766f49ecf6050 100644
|
index 20d20db2639030c103e9d1b3c8da0f51344b81c2..ceba9617748a8b4f3a9bd459475952c9c6c9ed7c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java
|
||||||
@@ -24,7 +24,7 @@ public class RedstoneTorchBlock extends BaseTorchBlock {
|
@@ -24,7 +24,7 @@ public class RedstoneTorchBlock extends BaseTorchBlock {
|
||||||
@ -32,9 +32,9 @@ index 68da47c3ec59518a4bbeb03c196ef0e7c6b5d049..1dbfda52a4423fb031eecad24e5766f4
|
|||||||
public static final int RESTART_DELAY = 160;
|
public static final int RESTART_DELAY = 160;
|
||||||
@@ -80,11 +80,15 @@ public class RedstoneTorchBlock extends BaseTorchBlock {
|
@@ -80,11 +80,15 @@ public class RedstoneTorchBlock extends BaseTorchBlock {
|
||||||
@Override
|
@Override
|
||||||
public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
||||||
boolean flag = this.hasNeighborSignal(world, pos, state);
|
boolean flag = this.hasNeighborSignal(world, pos, state);
|
||||||
- List list = (List) RedstoneTorchBlock.RECENT_TOGGLES.get(world);
|
- List<RedstoneTorchBlock.Toggle> list = (List) RedstoneTorchBlock.RECENT_TOGGLES.get(world);
|
||||||
-
|
-
|
||||||
- while (list != null && !list.isEmpty() && world.getGameTime() - ((RedstoneTorchBlock.Toggle) list.get(0)).when > 60L) {
|
- while (list != null && !list.isEmpty() && world.getGameTime() - ((RedstoneTorchBlock.Toggle) list.get(0)).when > 60L) {
|
||||||
- list.remove(0);
|
- list.remove(0);
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index bdff750f44cabdbc7e329a0feaa77709e2103635..db36453ff46afded45268b3701488e23305aa2eb 100644
|
index 3c4a593cfbc111084abc971bc7532898d094bd9a..dc93fd6f89694d9ae3c05de9a9d427ecce564fc9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -167,6 +167,14 @@ public class Main {
|
@@ -167,6 +167,14 @@ public class Main {
|
@ -11,10 +11,10 @@ Co-authored-by: lexikiq <noellekiq@gmail.com>
|
|||||||
Co-authored-by: Aikar <aikar@aikar.co>
|
Co-authored-by: Aikar <aikar@aikar.co>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index c9c711398cf90fc1990a0145196fa05894f9ffff..76246fdacf70309918ce413f494bdb4d8683241d 100644
|
index d23a2cfeddf7ef9d10b0b12e0425df759e1fd080..66b21ba4b3206fb52570eb67faeb1161bd043545 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1318,7 +1318,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1324,7 +1324,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void levelEvent(@Nullable Player player, int eventId, BlockPos pos, int data) {
|
public void levelEvent(@Nullable Player player, int eventId, BlockPos pos, int data) {
|
||||||
@ -24,10 +24,10 @@ index c9c711398cf90fc1990a0145196fa05894f9ffff..76246fdacf70309918ce413f494bdb4d
|
|||||||
|
|
||||||
public int getLogicalHeight() {
|
public int getLogicalHeight() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
index 99f390e64477e92939bf0552878ed11d0db0137f..0df9780c1689532d0d9f236077400b298d8e9f68 100644
|
index 53ff70fff0d12a151d13481a3226f72af57cce3e..993ccde9e6ee769ce51cdfa4ff06cfe1bd27bbb0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
@@ -681,11 +681,12 @@ public class EnderDragon extends Mob implements Enemy {
|
@@ -679,11 +679,12 @@ public class EnderDragon extends Mob implements Enemy {
|
||||||
// CraftBukkit start - Use relative location for far away sounds
|
// CraftBukkit start - Use relative location for far away sounds
|
||||||
// this.level().globalLevelEvent(1028, this.blockPosition(), 0);
|
// this.level().globalLevelEvent(1028, this.blockPosition(), 0);
|
||||||
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;
|
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;
|
||||||
@ -43,10 +43,10 @@ index 99f390e64477e92939bf0552878ed11d0db0137f..0df9780c1689532d0d9f236077400b29
|
|||||||
double deltaLength = Math.sqrt(distanceSquared);
|
double deltaLength = Math.sqrt(distanceSquared);
|
||||||
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
|
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||||
index c098ce5ab4b01d352e5e351f81773134128ce90b..e3da459190625a037e5542aa6ba3365f05f9f532 100644
|
index ff04f392163c2f7b1015ce379706d19a5f655f5c..b0ac85dc3c67d2e4d70dfb09d4e8fc349aba14d2 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||||
@@ -272,11 +272,12 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
@@ -278,11 +278,12 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||||
// CraftBukkit start - Use relative location for far away sounds
|
// CraftBukkit start - Use relative location for far away sounds
|
||||||
// this.level().globalLevelEvent(1023, new BlockPosition(this), 0);
|
// this.level().globalLevelEvent(1023, new BlockPosition(this), 0);
|
||||||
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;
|
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;
|
||||||
@ -62,10 +62,10 @@ index c098ce5ab4b01d352e5e351f81773134128ce90b..e3da459190625a037e5542aa6ba3365f
|
|||||||
double deltaLength = Math.sqrt(distanceSquared);
|
double deltaLength = Math.sqrt(distanceSquared);
|
||||||
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
|
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/EnderEyeItem.java b/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
diff --git a/src/main/java/net/minecraft/world/item/EnderEyeItem.java b/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
||||||
index 5bc68514a1e8a212e2681f06b918548c0ec565b6..1977e702f6af39ebf100c1f2f2edc2d1c4d003b0 100644
|
index 6df874ac5091896be5edddd362c11958c0ad815b..37cfb9694dc06f693b7b54f20bc31dfd9f95c76c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
--- a/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
+++ b/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
||||||
@@ -64,11 +64,12 @@ public class EnderEyeItem extends Item {
|
@@ -65,11 +65,12 @@ public class EnderEyeItem extends Item {
|
||||||
// world.b(1038, blockposition1.c(1, 0, 1), 0);
|
// world.b(1038, blockposition1.c(1, 0, 1), 0);
|
||||||
int viewDistance = world.getCraftServer().getViewDistance() * 16;
|
int viewDistance = world.getCraftServer().getViewDistance() * 16;
|
||||||
BlockPos soundPos = blockposition1.offset(1, 0, 1);
|
BlockPos soundPos = blockposition1.offset(1, 0, 1);
|
||||||
@ -81,10 +81,10 @@ index 5bc68514a1e8a212e2681f06b918548c0ec565b6..1977e702f6af39ebf100c1f2f2edc2d1
|
|||||||
double deltaLength = Math.sqrt(distanceSquared);
|
double deltaLength = Math.sqrt(distanceSquared);
|
||||||
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
|
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 0137f61a572800ea7bb013185835a1ad4cd0462c..1ecde4f1dff5bfa67c526a699061f1952da59fae 100644
|
index afb1c203f6299b90179244b4b0d0c6332f961e35..57856f334370da394e9119fb1f8c7fb9c4916aa3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -1269,4 +1269,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -1263,4 +1263,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|
||||||
private ExplosionInteraction() {}
|
private ExplosionInteraction() {}
|
||||||
}
|
}
|
@ -6,7 +6,7 @@ Subject: [PATCH] Avoid blocking on Network Manager creation
|
|||||||
Per Paper issue 294
|
Per Paper issue 294
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||||
index dbbca784fe45b7099f683745b36f5c195ca4c2af..187b2cf175ba5cea94158d29b53993dc5a7c5b94 100644
|
index 2cf3e79ec5e8706b71d27ebad4668773f0b91195..64119f2188f8958b8a5913fec82ac5bba1b74b2a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||||
@@ -61,6 +61,15 @@ public class ServerConnectionListener {
|
@@ -61,6 +61,15 @@ public class ServerConnectionListener {
|
||||||
@ -25,7 +25,7 @@ index dbbca784fe45b7099f683745b36f5c195ca4c2af..187b2cf175ba5cea94158d29b53993dc
|
|||||||
|
|
||||||
public ServerConnectionListener(MinecraftServer server) {
|
public ServerConnectionListener(MinecraftServer server) {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
@@ -100,7 +109,8 @@ public class ServerConnectionListener {
|
@@ -102,7 +111,8 @@ public class ServerConnectionListener {
|
||||||
int j = ServerConnectionListener.this.server.getRateLimitPacketsPerSecond();
|
int j = ServerConnectionListener.this.server.getRateLimitPacketsPerSecond();
|
||||||
Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error
|
Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ index dbbca784fe45b7099f683745b36f5c195ca4c2af..187b2cf175ba5cea94158d29b53993dc
|
|||||||
((Connection) object).configurePacketHandler(channelpipeline);
|
((Connection) object).configurePacketHandler(channelpipeline);
|
||||||
((Connection) object).setListenerForServerboundHandshake(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object));
|
((Connection) object).setListenerForServerboundHandshake(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object));
|
||||||
}
|
}
|
||||||
@@ -163,6 +173,7 @@ public class ServerConnectionListener {
|
@@ -164,6 +174,7 @@ public class ServerConnectionListener {
|
||||||
|
|
||||||
synchronized (this.connections) {
|
synchronized (this.connections) {
|
||||||
// Spigot Start
|
// Spigot Start
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
index 370cf30a6411577ec8ed7a32e473217e2f64782b..3c9c6a697143c7e980add58576ad288b8f51ae35 100644
|
index 5b219b5eee0c5958b80093c9223feeed0dec830b..bc7143ad915f001726e8558c8ca4160f3f9ace68 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
@@ -89,6 +89,7 @@ public class GameProfileCache {
|
@@ -89,6 +89,7 @@ public class GameProfileCache {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add setting for proxy online mode status
|
|||||||
TODO: Add isProxyOnlineMode check to Metrics
|
TODO: Add isProxyOnlineMode check to Metrics
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 590da3a7acef406589e665652ccc46e01cc28e1b..c8163a8645248765c0fa6c15bc8c37facdc70dc7 100644
|
index 2caebd76cd533cf6874b6461b496e76e8ec85d61..0ffa25a6e41cc56e78c79e0cee45e3b811794129 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -557,7 +557,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -589,7 +589,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
public boolean enforceSecureProfile() {
|
public boolean enforceSecureProfile() {
|
||||||
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ index 590da3a7acef406589e665652ccc46e01cc28e1b..c8163a8645248765c0fa6c15bc8c37fa
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
index 3c9c6a697143c7e980add58576ad288b8f51ae35..92c22dc10e385f1942f2ec375bbce9faf257462b 100644
|
index bc7143ad915f001726e8558c8ca4160f3f9ace68..aeb0c7ce9b6f93dadd407dbdefba053568f2e2fe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
@@ -89,7 +89,8 @@ public class GameProfileCache {
|
@@ -89,7 +89,8 @@ public class GameProfileCache {
|
||||||
@ -46,7 +46,7 @@ index 3c9c6a697143c7e980add58576ad288b8f51ae35..92c22dc10e385f1942f2ec375bbce9fa
|
|||||||
|
|
||||||
public void add(GameProfile profile) {
|
public void add(GameProfile profile) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||||
index 9143ce01650b51e7f6a677c5941ade91a506449f..86c88e81e275d52576122a5083b419e64cb011fc 100644
|
index a0b0614ac7d2009db5c6c10ab4a5f09dd447c635..653856d0b8dcf2baf4cc77a276f17c8cc1fa717e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||||
@@ -65,7 +65,8 @@ public class OldUsersConverter {
|
@@ -65,7 +65,8 @@ public class OldUsersConverter {
|
||||||
@ -60,10 +60,10 @@ index 9143ce01650b51e7f6a677c5941ade91a506449f..86c88e81e275d52576122a5083b419e6
|
|||||||
} else {
|
} else {
|
||||||
String[] astring1 = astring;
|
String[] astring1 = astring;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index f69d5e8f22fa8335b19f9e777ddbd33443eb08dc..1bb70e2363b8d046090c8f5853de590fa6777e7d 100644
|
index c625ed2039566a1a175a8100fb8a42566f1cfb1a..8624a530d534e45f5ff6f834d595137daa4ae453 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1833,7 +1833,7 @@ public final class CraftServer implements Server {
|
@@ -1849,7 +1849,7 @@ public final class CraftServer implements Server {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
GameProfile profile = null;
|
GameProfile profile = null;
|
||||||
// Only fetch an online UUID in online mode
|
// Only fetch an online UUID in online mode
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 19ff229f90d07447947afa8b4794b683feceb574..6a0e6697331732555f9e4e63e95dce0a2bfc1a85 100644
|
index 00043179d939e95734d56d221d79c0996321f875..053c1299d657dba38308b9d0fddd7416c357364d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -1529,13 +1529,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -1528,13 +1528,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
// Spigot start - limit place/interactions
|
// Spigot start - limit place/interactions
|
||||||
private int limitedPackets;
|
private int limitedPackets;
|
||||||
private long lastLimitedPacket = -1;
|
private long lastLimitedPacket = -1;
|
@ -5,21 +5,21 @@ Subject: [PATCH] Configurable flying kick messages
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 6a0e6697331732555f9e4e63e95dce0a2bfc1a85..76d3ecbe62775b09aca1306b1adab56a5c730162 100644
|
index 053c1299d657dba38308b9d0fddd7416c357364d..19b4e2a2c01a10642ced9bdffc0acb661b270741 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -338,7 +338,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -352,7 +352,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
|
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
|
||||||
if (++this.aboveGroundTickCount > 80) {
|
if (++this.aboveGroundTickCount > this.getMaximumFlyingTicks(this.player)) {
|
||||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
|
||||||
- this.disconnect(Component.translatable("multiplayer.disconnect.flying"));
|
- this.disconnect(Component.translatable("multiplayer.disconnect.flying"));
|
||||||
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingPlayer); // Paper - use configurable kick message
|
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingPlayer); // Paper - use configurable kick message
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -357,7 +357,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -371,7 +371,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) {
|
if (this.clientVehicleIsFloating && this.lastVehicle.getControllingPassenger() == this.player) {
|
||||||
if (++this.aboveGroundVehicleTickCount > 80) {
|
if (++this.aboveGroundVehicleTickCount > this.getMaximumFlyingTicks(this.lastVehicle)) {
|
||||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());
|
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());
|
||||||
- this.disconnect(Component.translatable("multiplayer.disconnect.flying"));
|
- this.disconnect(Component.translatable("multiplayer.disconnect.flying"));
|
||||||
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingVehicle); // Paper - use configurable kick message
|
+ this.disconnect(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.flyingVehicle); // Paper - use configurable kick message
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityZapEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
index e1311841cdf79fa2769cfa6817985007ace2e4d8..e7db715d45d27cbc9b3ed7cad1d907273b225c7f 100644
|
index 7d1386f2f4d4b5dcf63b6b4e678568b6744a99b5..0da329781f0afd4ec4a731889b892afe7e399d21 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
@@ -852,10 +852,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
@@ -844,10 +844,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
@Override
|
@Override
|
||||||
public void thunderHit(ServerLevel world, LightningBolt lightning) {
|
public void thunderHit(ServerLevel world, LightningBolt lightning) {
|
||||||
if (world.getDifficulty() != Difficulty.PEACEFUL) {
|
if (world.getDifficulty() != Difficulty.PEACEFUL) {
|
||||||
@ -25,13 +25,13 @@ index e1311841cdf79fa2769cfa6817985007ace2e4d8..e7db715d45d27cbc9b3ed7cad1d90727
|
|||||||
+ // Paper end - Add EntityZapEvent
|
+ // Paper end - Add EntityZapEvent
|
||||||
+
|
+
|
||||||
entitywitch.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
entitywitch.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
||||||
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
|
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null);
|
||||||
entitywitch.setNoAi(this.isNoAi());
|
entitywitch.setNoAi(this.isNoAi());
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 8de2f4ca83017d37c63d33c6283078a71143f077..5e566d08346084880d88b406c6ce80328e26a180 100644
|
index ff95b1f9935311ec156e41bf9aa16005df23eb27..168f19c754e413286c69ae9cbcbfb3788f05d8ff 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1198,6 +1198,14 @@ public class CraftEventFactory {
|
@@ -1193,6 +1193,14 @@ public class CraftEventFactory {
|
||||||
return !event.isCancelled();
|
return !event.isCancelled();
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Filter bad block entity nbt data from falling blocks
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
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 9136b0c907d331e100d47e1a800ae2e2c2ec6dad..c0477f913867c67809978a4f240303151d81e6ea 100644
|
index 37dfd08621d402a339f36bb70f1b39de010e8669..cc00bf81de902cfc587bcf6f18e861fd4339c91e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -333,7 +333,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -335,7 +335,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
this.dropItem = nbt.getBoolean("DropItem");
|
this.dropItem = nbt.getBoolean("DropItem");
|
||||||
}
|
}
|
||||||
|
|
@ -5,19 +5,19 @@ Subject: [PATCH] Cache user authenticator threads
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index 55c15d942ddd230dec073039b7c5f95a14ff937c..c5b451a706240dbd6719e001825c6859fc1b2a49 100644
|
index eb69b213a75df72dd7b37f41d86564f7fc692e32..b03d4f12e89b8a5fe6ad2282f8cc2909b87795a9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -49,6 +49,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -69,6 +69,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
|
// CraftBukkit end
|
||||||
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
|
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
|
||||||
static final Logger LOGGER = LogUtils.getLogger();
|
static final Logger LOGGER = LogUtils.getLogger();
|
||||||
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
|
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
|
||||||
private static final int MAX_TICKS_BEFORE_LOGIN = 600;
|
private static final int MAX_TICKS_BEFORE_LOGIN = 600;
|
||||||
private static final Component DISCONNECT_UNEXPECTED_QUERY = Component.translatable("multiplayer.disconnect.unexpected_query_response");
|
|
||||||
private final byte[] challenge;
|
private final byte[] challenge;
|
||||||
@@ -140,7 +141,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
final MinecraftServer server;
|
||||||
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge));
|
@@ -167,7 +168,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
|
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge, true));
|
||||||
} else {
|
} else {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
- Thread thread = new Thread("User Authenticator #" + ServerLoginPacketListenerImpl.UNIQUE_THREAD_ID.incrementAndGet()) {
|
- Thread thread = new Thread("User Authenticator #" + ServerLoginPacketListenerImpl.UNIQUE_THREAD_ID.incrementAndGet()) {
|
||||||
@ -26,7 +26,7 @@ index 55c15d942ddd230dec073039b7c5f95a14ff937c..c5b451a706240dbd6719e001825c6859
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -155,10 +157,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -182,10 +184,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
ServerLoginPacketListenerImpl.this.server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex);
|
ServerLoginPacketListenerImpl.this.server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ index 55c15d942ddd230dec073039b7c5f95a14ff937c..c5b451a706240dbd6719e001825c6859
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -264,7 +264,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
throw new IllegalStateException("Protocol error", cryptographyexception);
|
throw new IllegalStateException("Protocol error", cryptographyexception);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ index 55c15d942ddd230dec073039b7c5f95a14ff937c..c5b451a706240dbd6719e001825c6859
|
|||||||
public void run() {
|
public void run() {
|
||||||
String s1 = (String) Objects.requireNonNull(ServerLoginPacketListenerImpl.this.requestedUsername, "Player name not initialized");
|
String s1 = (String) Objects.requireNonNull(ServerLoginPacketListenerImpl.this.requestedUsername, "Player name not initialized");
|
||||||
|
|
||||||
@@ -273,10 +274,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -312,10 +313,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
|
|
||||||
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
|
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
|
||||||
}
|
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
|||||||
Reload the aliases stored in commands.yml
|
Reload the aliases stored in commands.yml
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 1bb70e2363b8d046090c8f5853de590fa6777e7d..9978f3ffb3803b7f9278d49a688bc2d4bf740cf3 100644
|
index 8624a530d534e45f5ff6f834d595137daa4ae453..c49dfa14a95b495a615fcf2d400a1630f7a698dd 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2754,5 +2754,24 @@ public final class CraftServer implements Server {
|
@@ -2777,5 +2777,24 @@ public final class CraftServer implements Server {
|
||||||
DefaultPermissions.registerCorePermissions();
|
DefaultPermissions.registerCorePermissions();
|
||||||
CraftDefaultPermissions.registerCorePermissions();
|
CraftDefaultPermissions.registerCorePermissions();
|
||||||
}
|
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
index dfa16aa79e94d85a49c9c28229b29a972ec6e216..7ce46bd254e0f14b1bbafe37e0eb97a468a07083 100644
|
index 4d1001666204b2a2c2bf26231bb1b19f9a1bd8ed..1f29ed95ef3d1904a014715028d9d591fe39231f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
@@ -255,7 +255,7 @@ public class ExperienceOrb extends Entity {
|
@@ -261,7 +261,7 @@ public class ExperienceOrb extends Entity {
|
||||||
int i = this.repairPlayerItems(player, this.value);
|
int i = this.repairPlayerItems(player, this.value);
|
||||||
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@ -18,10 +18,10 @@ index dfa16aa79e94d85a49c9c28229b29a972ec6e216..7ce46bd254e0f14b1bbafe37e0eb97a4
|
|||||||
|
|
||||||
--this.count;
|
--this.count;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 5e566d08346084880d88b406c6ce80328e26a180..81927bb6579b9a2119e377026d4e778daddb7f12 100644
|
index 168f19c754e413286c69ae9cbcbfb3788f05d8ff..3683cf6765741f6422f478fd09ce1ba6a75d6b99 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1151,6 +1151,17 @@ public class CraftEventFactory {
|
@@ -1146,6 +1146,17 @@ public class CraftEventFactory {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add ProjectileCollideEvent
|
|||||||
Deprecated now and replaced with ProjectileHitEvent
|
Deprecated now and replaced with ProjectileHitEvent
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 81927bb6579b9a2119e377026d4e778daddb7f12..2bcac771a37b3e5d3b7173e24dad7823fb29757c 100644
|
index 3683cf6765741f6422f478fd09ce1ba6a75d6b99..f7c848aa883c1ad408e7e16e605f375ab75f8cfd 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1295,6 +1295,17 @@ public class CraftEventFactory {
|
@@ -1290,6 +1290,17 @@ public class CraftEventFactory {
|
||||||
return CraftItemStack.asNMSCopy(bitem);
|
return CraftItemStack.asNMSCopy(bitem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ index 81927bb6579b9a2119e377026d4e778daddb7f12..2bcac771a37b3e5d3b7173e24dad7823
|
|||||||
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
|
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
|
||||||
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
|
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
|
||||||
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
|
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
|
||||||
@@ -1319,8 +1330,15 @@ public class CraftEventFactory {
|
@@ -1314,8 +1325,15 @@ public class CraftEventFactory {
|
||||||
if (position.getType() == HitResult.Type.ENTITY) {
|
if (position.getType() == HitResult.Type.ENTITY) {
|
||||||
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
|
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
|
||||||
}
|
}
|
@ -13,7 +13,7 @@ by adding code to all overrides in:
|
|||||||
to return BLOCKED if it is outside the world border.
|
to return BLOCKED if it is outside the world border.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||||
index fa5088945adc5e41e34cc2dc21a1762d106254c8..25a9f1fd69fbafab5129740e26e9741e35885ce0 100644
|
index 21bbc98b26b270b3ad6a3b34d6e50dfb796c3d5a..188904c9f0f81db1d63eec953d6746f2dc23dc81 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||||
@@ -158,7 +158,7 @@ public abstract class PathNavigation {
|
@@ -158,7 +158,7 @@ public abstract class PathNavigation {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize Level.hasChunkAt(BlockPosition)Z
|
|||||||
Reduce method invocations for World.isLoaded(BlockPosition)Z
|
Reduce method invocations for World.isLoaded(BlockPosition)Z
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 1ecde4f1dff5bfa67c526a699061f1952da59fae..926e4f9760e07ab66405132de2e96306211e5b9c 100644
|
index 57856f334370da394e9119fb1f8c7fb9c4916aa3..b2b0dea688df220a06abd458ac47aae3d67a7797 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -348,6 +348,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -342,6 +342,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
return chunk == null ? null : chunk.getFluidState(blockposition);
|
return chunk == null ? null : chunk.getFluidState(blockposition);
|
||||||
}
|
}
|
||||||
|
|
@ -11,7 +11,7 @@ that is outside happens to be closer, but unreachable, yet another reachable
|
|||||||
one is in border that would of been missed.
|
one is in border that would of been missed.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/border/WorldBorder.java b/src/main/java/net/minecraft/world/level/border/WorldBorder.java
|
diff --git a/src/main/java/net/minecraft/world/level/border/WorldBorder.java b/src/main/java/net/minecraft/world/level/border/WorldBorder.java
|
||||||
index 52325a99ea38530ad69a39ac0215233139f35268..bf5ac907507bf3b5bfcef45b566c0bc12626e2c0 100644
|
index c34873ec974eeffbc4f66dab4584c696cbe10967..580eb275942570da9e68287ca75da886ba1248c0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/border/WorldBorder.java
|
--- a/src/main/java/net/minecraft/world/level/border/WorldBorder.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/border/WorldBorder.java
|
+++ b/src/main/java/net/minecraft/world/level/border/WorldBorder.java
|
||||||
@@ -37,6 +37,18 @@ public class WorldBorder {
|
@@ -37,6 +37,18 @@ public class WorldBorder {
|
||||||
@ -34,10 +34,10 @@ index 52325a99ea38530ad69a39ac0215233139f35268..bf5ac907507bf3b5bfcef45b566c0bc1
|
|||||||
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
|
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
index b2f9429e0d437cf70bf56410e163e957b80ebdf1..4a731b9170222a5a2b0089ef5e9527dbd46a9ad5 100644
|
index 28bc3447ff5ddc066a9a743d5bfa7ca69598cd51..7cdb59cd2f2ffe1195d21519ef97dae0e430285b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
@@ -217,6 +217,7 @@ public abstract class ChunkGenerator {
|
@@ -223,6 +223,7 @@ public abstract class ChunkGenerator {
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ChunkPos chunkcoordintpair = (ChunkPos) iterator.next();
|
ChunkPos chunkcoordintpair = (ChunkPos) iterator.next();
|
@ -9,10 +9,10 @@ Also allow turning off treasure maps all together as they can eat up Map ID's
|
|||||||
which are limited in quantity.
|
which are limited in quantity.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||||
index 22dd4d2a53cc99bcc863f7ef75e2e7b711ceb2b6..9b9afc01c287528b911e13cabd95f41c0d822a48 100644
|
index 672301d47037f96f32c52fa400ed28694f3b138b..96240f8ed0675ebfd403fcef144657885c4bb9a9 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||||
@@ -1641,7 +1641,8 @@ public class VillagerTrades {
|
@@ -1667,7 +1667,8 @@ public class VillagerTrades {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
ServerLevel serverLevel = (ServerLevel)entity.level();
|
ServerLevel serverLevel = (ServerLevel)entity.level();
|
||||||
@ -23,10 +23,10 @@ index 22dd4d2a53cc99bcc863f7ef75e2e7b711ceb2b6..9b9afc01c287528b911e13cabd95f41c
|
|||||||
ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), (byte)2, true, true);
|
ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), (byte)2, true, true);
|
||||||
MapItem.renderBiomePreviewMap(serverLevel, itemStack);
|
MapItem.renderBiomePreviewMap(serverLevel, itemStack);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||||
index 59fa50fb8614d1492e31362feccc100701b56b8e..0bf1291fa4abf7f17381a48651a846379cedb3e1 100644
|
index e7f2cc799e7c50a9525845347a3f235f7bfefe41..709bc6838d20c420c5a4b3a994a041e594bd6210 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
--- a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
+++ b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
|
||||||
@@ -83,8 +83,17 @@ public class ExplorationMapFunction extends LootItemConditionalFunction {
|
@@ -84,8 +84,17 @@ public class ExplorationMapFunction extends LootItemConditionalFunction {
|
||||||
Vec3 vec3 = context.getParamOrNull(LootContextParams.ORIGIN);
|
Vec3 vec3 = context.getParamOrNull(LootContextParams.ORIGIN);
|
||||||
if (vec3 != null) {
|
if (vec3 != null) {
|
||||||
ServerLevel serverLevel = context.getLevel();
|
ServerLevel serverLevel = context.getLevel();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add API methods to control if armor stands can move
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||||
index 7e105760198c3b6ce782c14d71cd915e3b071684..1353bb583ec576345b7bfea5134c4b0d59811a07 100644
|
index 4caa354922110c8662549bae271f1f7cf1a2168f..d33c49c4a4b87a5203f9b4592deff9389e6e870d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||||
@@ -93,6 +93,7 @@ public class ArmorStand extends LivingEntity {
|
@@ -96,6 +96,7 @@ public class ArmorStand extends LivingEntity {
|
||||||
public Rotations rightArmPose;
|
public Rotations rightArmPose;
|
||||||
public Rotations leftLegPose;
|
public Rotations leftLegPose;
|
||||||
public Rotations rightLegPose;
|
public Rotations rightLegPose;
|
||||||
@ -16,7 +16,7 @@ index 7e105760198c3b6ce782c14d71cd915e3b071684..1353bb583ec576345b7bfea5134c4b0d
|
|||||||
|
|
||||||
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
|
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
@@ -938,4 +939,13 @@ public class ArmorStand extends LivingEntity {
|
@@ -936,4 +937,13 @@ public class ArmorStand extends LivingEntity {
|
||||||
public boolean canBeSeenByAnyone() {
|
public boolean canBeSeenByAnyone() {
|
||||||
return !this.isInvisible() && !this.isMarker();
|
return !this.isInvisible() && !this.isMarker();
|
||||||
}
|
}
|
39
patches/server/0126-String-based-Action-Bar-API.patch
Normal file
39
patches/server/0126-String-based-Action-Bar-API.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aikar <aikar@aikar.co>
|
||||||
|
Date: Tue, 27 Dec 2016 15:02:42 -0500
|
||||||
|
Subject: [PATCH] String based Action Bar API
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
|
index 37bf685ee6a01a32d369f0154e7b2446c58efd4c..880fb42eb3bf43638b5a6a544aacd8b6a93d4cd9 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
|
@@ -385,6 +385,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
+ @Override
|
||||||
|
+ @Deprecated
|
||||||
|
+ public void sendActionBar(BaseComponent[] message) {
|
||||||
|
+ if (getHandle().connection == null) return;
|
||||||
|
+ net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket packet = new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket(org.bukkit.craftbukkit.util.CraftChatMessage.fromJSON(net.md_5.bungee.chat.ComponentSerializer.toString(message)));
|
||||||
|
+ getHandle().connection.send(packet);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ @Deprecated
|
||||||
|
+ public void sendActionBar(String message) {
|
||||||
|
+ if (getHandle().connection == null || message == null || message.isEmpty()) return;
|
||||||
|
+ getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket(CraftChatMessage.fromStringOrNull(message)));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ @Deprecated
|
||||||
|
+ public void sendActionBar(char alternateChar, String message) {
|
||||||
|
+ if (message == null || message.isEmpty()) return;
|
||||||
|
+ sendActionBar(org.bukkit.ChatColor.translateAlternateColorCodes(alternateChar, message));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) {
|
||||||
|
if (header != null) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
|
|||||||
Credit to prplz for figuring out the real issue
|
Credit to prplz for figuring out the real issue
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 50264a1da70f120f9adf1619dd72d834ba14e499..54f343a1979794781757b221514f70aa0f7a5dec 100644
|
index 532282ba4432f55596337f7a0898ecc3d5dc2148..82498ec7f0de4c1b82c7882824587ed3ba7fd5d6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -2451,7 +2451,7 @@ public class ServerPlayer extends Player {
|
@@ -2549,7 +2549,7 @@ public class ServerPlayer extends Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isImmobile() {
|
public boolean isImmobile() {
|
||||||
@ -19,10 +19,10 @@ index 50264a1da70f120f9adf1619dd72d834ba14e499..54f343a1979794781757b221514f70aa
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
index 66497960995dc30abe60d26200979a78513ff2c6..4ff58939269f420fab18fea8fc3887e86297b99e 100644
|
index d0178fc884b57cda9090a80716685994ca1a323e..d9a22808381bd8b1be691cf879f5be8cc3add81c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
@@ -146,7 +146,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -167,7 +167,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isDisconnected() {
|
public final boolean isDisconnected() {
|
@ -7,10 +7,10 @@ Subject: [PATCH] Firework API's
|
|||||||
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
|
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
index 9d637e005205a32fa5406ba47de7cd2b22ead9cf..813c4a52c8ddd70e252125ebfd3654346c71f13c 100644
|
index f180488e3613277ed91a5e83963187f33f26b2ea..3df4005b6ddc075e5922c1e96e4ceb21d8b8ea43 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
@@ -40,6 +40,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
@@ -42,6 +42,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||||
public int lifetime;
|
public int lifetime;
|
||||||
@Nullable
|
@Nullable
|
||||||
public LivingEntity attachedToEntity;
|
public LivingEntity attachedToEntity;
|
||||||
@ -18,9 +18,9 @@ index 9d637e005205a32fa5406ba47de7cd2b22ead9cf..813c4a52c8ddd70e252125ebfd365434
|
|||||||
|
|
||||||
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
|
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
@@ -315,6 +316,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
@@ -299,6 +300,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||||
}
|
nbt.putInt("LifeTime", this.lifetime);
|
||||||
|
nbt.put("FireworksItem", this.getItem().save(this.registryAccess()));
|
||||||
nbt.putBoolean("ShotAtAngle", (Boolean) this.entityData.get(FireworkRocketEntity.DATA_SHOT_AT_ANGLE));
|
nbt.putBoolean("ShotAtAngle", (Boolean) this.entityData.get(FireworkRocketEntity.DATA_SHOT_AT_ANGLE));
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ if (this.spawningEntity != null) {
|
+ if (this.spawningEntity != null) {
|
||||||
@ -30,7 +30,7 @@ index 9d637e005205a32fa5406ba47de7cd2b22ead9cf..813c4a52c8ddd70e252125ebfd365434
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -331,7 +337,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
@@ -315,7 +321,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||||
if (nbt.contains("ShotAtAngle")) {
|
if (nbt.contains("ShotAtAngle")) {
|
||||||
this.entityData.set(FireworkRocketEntity.DATA_SHOT_AT_ANGLE, nbt.getBoolean("ShotAtAngle"));
|
this.entityData.set(FireworkRocketEntity.DATA_SHOT_AT_ANGLE, nbt.getBoolean("ShotAtAngle"));
|
||||||
}
|
}
|
||||||
@ -42,24 +42,29 @@ index 9d637e005205a32fa5406ba47de7cd2b22ead9cf..813c4a52c8ddd70e252125ebfd365434
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private List<FireworkExplosion> getExplosions() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||||
index ac7371882d15746e9353865635d0bb716f890c53..ba570f1c9654e1004e068a1efe2118f36c954505 100644
|
index c797fc980577d77e18cd5ea660e4c42ca0f21747..65f23bfb2de91be7560800ff87eab7ad88cb1849 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||||
@@ -217,6 +217,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {
|
@@ -147,7 +147,11 @@ public class CrossbowItem extends ProjectileWeaponItem {
|
||||||
|
@Override
|
||||||
if (flag1) {
|
protected Projectile createProjectile(Level world, LivingEntity shooter, ItemStack weaponStack, ItemStack projectileStack, boolean critical) {
|
||||||
object = new FireworkRocketEntity(world, projectile, shooter, shooter.getX(), shooter.getEyeY() - 0.15000000596046448D, shooter.getZ(), true);
|
if (projectileStack.is(Items.FIREWORK_ROCKET)) {
|
||||||
+ ((FireworkRocketEntity) object).spawningEntity = shooter.getUUID(); // Paper
|
- return new FireworkRocketEntity(world, projectileStack, shooter, shooter.getX(), shooter.getEyeY() - 0.15F, shooter.getZ(), true);
|
||||||
|
+ // Paper start
|
||||||
|
+ FireworkRocketEntity entity = new FireworkRocketEntity(world, projectileStack, shooter, shooter.getX(), shooter.getEyeY() - 0.15F, shooter.getZ(), true);
|
||||||
|
+ entity.spawningEntity = shooter.getUUID(); // Paper
|
||||||
|
+ return entity;
|
||||||
|
+ // Paper end
|
||||||
} else {
|
} else {
|
||||||
object = CrossbowItem.getArrow(world, shooter, crossbow, projectile);
|
Projectile projectile = super.createProjectile(world, shooter, weaponStack, projectileStack, critical);
|
||||||
if (creative || simulated != 0.0F) {
|
if (projectile instanceof AbstractArrow abstractArrow) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||||
index b342d23692ffd38b6eec66838162e9012f29ac09..3749cfca8f007973d1a2206d8f2ba15283a550e1 100644
|
index da89ccaf91e2baa7caa15681c113bc283f40cd21..38b33eb92d21d0099285a304c6e064bbf56db4eb 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
|
||||||
@@ -53,6 +53,7 @@ public class FireworkRocketItem extends Item {
|
@@ -42,6 +42,7 @@ public class FireworkRocketItem extends Item implements ProjectileItem {
|
||||||
vec3.z + (double)direction.getStepZ() * 0.15,
|
vec3.z + (double)direction.getStepZ() * 0.15,
|
||||||
itemStack
|
itemStack
|
||||||
);
|
);
|
||||||
@ -67,14 +72,14 @@ index b342d23692ffd38b6eec66838162e9012f29ac09..3749cfca8f007973d1a2206d8f2ba152
|
|||||||
level.addFreshEntity(fireworkRocketEntity);
|
level.addFreshEntity(fireworkRocketEntity);
|
||||||
itemStack.shrink(1);
|
itemStack.shrink(1);
|
||||||
}
|
}
|
||||||
@@ -66,6 +67,7 @@ public class FireworkRocketItem extends Item {
|
@@ -55,6 +56,7 @@ public class FireworkRocketItem extends Item implements ProjectileItem {
|
||||||
ItemStack itemStack = user.getItemInHand(hand);
|
ItemStack itemStack = user.getItemInHand(hand);
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(world, itemStack, user);
|
FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(world, itemStack, user);
|
||||||
+ fireworkRocketEntity.spawningEntity = user.getUUID(); // Paper
|
+ fireworkRocketEntity.spawningEntity = user.getUUID(); // Paper
|
||||||
world.addFreshEntity(fireworkRocketEntity);
|
world.addFreshEntity(fireworkRocketEntity);
|
||||||
if (!user.getAbilities().instabuild) {
|
itemStack.consume(1, user);
|
||||||
itemStack.shrink(1);
|
user.awardStat(Stats.ITEM_USED.get(this));
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||||
index 5ae87c370e47c545cef27a36e40da137e1ec656b..c9e15a9d82dee935293b2e7e233f5b9b2d822448 100644
|
index 5ae87c370e47c545cef27a36e40da137e1ec656b..c9e15a9d82dee935293b2e7e233f5b9b2d822448 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
@ -7,10 +7,10 @@ Allows you to access the Gateway being used in a teleport event
|
|||||||
Fix the offset used for player teleportation
|
Fix the offset used for player teleportation
|
||||||
|
|
||||||
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
|
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 9e0da9a5ca64c67da5c07989f9c1872fbc2a5d26..1606c8c0dd5e27b42d0fd9da0db8a02e50efc5f9 100644
|
index 45aca9747557a94ac3e60ee9f23c30abb2367bff..9690416c2ffa7d1b7607d21ae0a990dcbcbcddae 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
@@ -208,11 +208,11 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
@@ -202,11 +202,11 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||||
// CraftBukkit start - Fire PlayerTeleportEvent/EntityTeleportEvent
|
// CraftBukkit start - Fire PlayerTeleportEvent/EntityTeleportEvent
|
||||||
if (entity1 instanceof ServerPlayer) {
|
if (entity1 instanceof ServerPlayer) {
|
||||||
org.bukkit.craftbukkit.entity.CraftPlayer player = (CraftPlayer) entity1.getBukkitEntity();
|
org.bukkit.craftbukkit.entity.CraftPlayer player = (CraftPlayer) entity1.getBukkitEntity();
|
@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
|||||||
which creates copy of the collections.
|
which creates copy of the collections.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 926e4f9760e07ab66405132de2e96306211e5b9c..7800276dea6176ed489809d589b850252fc9333b 100644
|
index b2b0dea688df220a06abd458ac47aae3d67a7797..e78f39ce95e587b84afccae0e4635171370b7323 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -114,7 +114,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -113,7 +113,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public static final int TICKS_PER_DAY = 24000;
|
public static final int TICKS_PER_DAY = 24000;
|
||||||
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
|
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
|
||||||
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
||||||
@ -20,7 +20,7 @@ index 926e4f9760e07ab66405132de2e96306211e5b9c..7800276dea6176ed489809d589b85025
|
|||||||
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
||||||
private boolean tickingBlockEntities;
|
private boolean tickingBlockEntities;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 95b3bcd4cfcedc358096831bc59a7effd186a063..aac9eee069b16ab70b7553c6c324149011c94f8e 100644
|
index c793bae3d7c6da5014862c98b08fc3fa2374866d..b42d482defda5a91f4e625308d5fec8c8369e5fb 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -164,6 +164,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -164,6 +164,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
|
|||||||
the same way we handle async chunk loads.
|
the same way we handle async chunk loads.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index e1d9f11a9d5333811fc8cb5dd95c0ca79fd3543c..e45568112220b246adf3efdc43d26258336efbf9 100644
|
index fa85bf581ff2ff8de50355c3b5bf74d38ef9ffc1..2b8824242b0e6e0224d6eac8f661ae1435c58d66 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1062,11 +1062,13 @@ public abstract class PlayerList {
|
@@ -1060,11 +1060,13 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveAll() {
|
public void saveAll() {
|
@ -8,10 +8,10 @@ Adds lots of information about why this orb exists.
|
|||||||
Replaces isFromBottle() with logic that persists entity reloads too.
|
Replaces isFromBottle() with logic that persists entity reloads too.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
index 4f3c82f1b5ae24d5f70318fa96fae2a58ce7fd9f..45236a077d798d6a257a2e982b58901167ecd06e 100644
|
index 344d22ae4067bccd6d42b444f6b057c9d1ea6e82..f4bf927477af23365a2d4618a1634195bd2054c8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
@@ -427,7 +427,7 @@ public class ServerPlayerGameMode {
|
@@ -430,7 +430,7 @@ public class ServerPlayerGameMode {
|
||||||
|
|
||||||
// Drop event experience
|
// Drop event experience
|
||||||
if (flag && event != null) {
|
if (flag && event != null) {
|
||||||
@ -21,10 +21,10 @@ index 4f3c82f1b5ae24d5f70318fa96fae2a58ce7fd9f..45236a077d798d6a257a2e982b589011
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
index 7ce46bd254e0f14b1bbafe37e0eb97a468a07083..00b46fd0b4a718756f8b21f203fd5679bc2a79d8 100644
|
index 1f29ed95ef3d1904a014715028d9d591fe39231f..1a829f79e6f9e03ead745e13ece4d1b57195dbb4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||||
@@ -40,9 +40,63 @@ public class ExperienceOrb extends Entity {
|
@@ -41,9 +41,63 @@ public class ExperienceOrb extends Entity {
|
||||||
public int value;
|
public int value;
|
||||||
private int count;
|
private int count;
|
||||||
private Player followingPlayer;
|
private Player followingPlayer;
|
||||||
@ -88,7 +88,7 @@ index 7ce46bd254e0f14b1bbafe37e0eb97a468a07083..00b46fd0b4a718756f8b21f203fd5679
|
|||||||
this.setPos(x, y, z);
|
this.setPos(x, y, z);
|
||||||
this.setYRot((float) (this.random.nextDouble() * 360.0D));
|
this.setYRot((float) (this.random.nextDouble() * 360.0D));
|
||||||
this.setDeltaMovement((this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D, this.random.nextDouble() * 0.2D * 2.0D, (this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D);
|
this.setDeltaMovement((this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D, this.random.nextDouble() * 0.2D * 2.0D, (this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D);
|
||||||
@@ -161,12 +215,20 @@ public class ExperienceOrb extends Entity {
|
@@ -167,12 +221,20 @@ public class ExperienceOrb extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void award(ServerLevel world, Vec3 pos, int amount) {
|
public static void award(ServerLevel world, Vec3 pos, int amount) {
|
||||||
@ -110,7 +110,7 @@ index 7ce46bd254e0f14b1bbafe37e0eb97a468a07083..00b46fd0b4a718756f8b21f203fd5679
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,6 +298,7 @@ public class ExperienceOrb extends Entity {
|
@@ -242,6 +304,7 @@ public class ExperienceOrb extends Entity {
|
||||||
nbt.putShort("Age", (short) this.age);
|
nbt.putShort("Age", (short) this.age);
|
||||||
nbt.putShort("Value", (short) this.value);
|
nbt.putShort("Value", (short) this.value);
|
||||||
nbt.putInt("Count", this.count);
|
nbt.putInt("Count", this.count);
|
||||||
@ -118,7 +118,7 @@ index 7ce46bd254e0f14b1bbafe37e0eb97a468a07083..00b46fd0b4a718756f8b21f203fd5679
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -244,6 +307,7 @@ public class ExperienceOrb extends Entity {
|
@@ -250,6 +313,7 @@ public class ExperienceOrb extends Entity {
|
||||||
this.age = nbt.getShort("Age");
|
this.age = nbt.getShort("Age");
|
||||||
this.value = nbt.getShort("Value");
|
this.value = nbt.getShort("Value");
|
||||||
this.count = Math.max(nbt.getInt("Count"), 1);
|
this.count = Math.max(nbt.getInt("Count"), 1);
|
||||||
@ -127,10 +127,10 @@ index 7ce46bd254e0f14b1bbafe37e0eb97a468a07083..00b46fd0b4a718756f8b21f203fd5679
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index eec88cb65aae7986e53cba336f6e0bf5ff3011b3..a49d20bab5c49721fb41e2429c7fb721ef3c2f98 100644
|
index 399c12a2b14df4786c8e13484a54a73ad8571410..b51f4172b7135689fcd99b380f1a78bf8e723cfa 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -1795,7 +1795,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1813,7 +1813,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
protected void dropExperience() {
|
protected void dropExperience() {
|
||||||
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
|
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
|
||||||
if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
|
if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
|
||||||
@ -141,10 +141,10 @@ index eec88cb65aae7986e53cba336f6e0bf5ff3011b3..a49d20bab5c49721fb41e2429c7fb721
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||||
index f307f9077917f426a90523708c572b95cc7b6778..907ed82fea71254d6624eda878e2668cd26422a7 100644
|
index ec112d626a189aafb148455d097919e88af7ef28..3bd13c9b8c7573726ae7defdc3c0f32876d1cf1f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||||
@@ -258,12 +258,14 @@ public abstract class Animal extends AgeableMob {
|
@@ -250,12 +250,14 @@ public abstract class Animal extends AgeableMob {
|
||||||
|
|
||||||
public void finalizeSpawnChildFromBreeding(ServerLevel worldserver, Animal entityanimal, @Nullable AgeableMob entityageable, int experience) {
|
public void finalizeSpawnChildFromBreeding(ServerLevel worldserver, Animal entityanimal, @Nullable AgeableMob entityageable, int experience) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -163,7 +163,7 @@ index f307f9077917f426a90523708c572b95cc7b6778..907ed82fea71254d6624eda878e2668c
|
|||||||
this.setAge(6000);
|
this.setAge(6000);
|
||||||
entityanimal.setAge(6000);
|
entityanimal.setAge(6000);
|
||||||
this.resetLove();
|
this.resetLove();
|
||||||
@@ -272,7 +274,7 @@ public abstract class Animal extends AgeableMob {
|
@@ -264,7 +266,7 @@ public abstract class Animal extends AgeableMob {
|
||||||
if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||||
// CraftBukkit start - use event experience
|
// CraftBukkit start - use event experience
|
||||||
if (experience > 0) {
|
if (experience > 0) {
|
||||||
@ -173,10 +173,10 @@ index f307f9077917f426a90523708c572b95cc7b6778..907ed82fea71254d6624eda878e2668c
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||||
index d2d89a47ceae2431969502cb81ae93391a2ee16c..6376908df89af1eff3a948ca1faef5d4925f0c3b 100644
|
index 40ea9af580f841c3aba61db7c34efb88d542a547..d2dfccd1e31b2f050c9f480220cf17df71c687c3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||||
@@ -913,7 +913,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
@@ -897,7 +897,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||||
// CraftBukkit start - use event experience
|
// CraftBukkit start - use event experience
|
||||||
if (experience > 0) {
|
if (experience > 0) {
|
||||||
@ -186,10 +186,10 @@ index d2d89a47ceae2431969502cb81ae93391a2ee16c..6376908df89af1eff3a948ca1faef5d4
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
index 5385f0a1d0c5522a94e2a5ded779d68826537883..11322066522a3268063bad7267ef4dd4f06d983e 100644
|
index 1f6703a089df0c53d022321618a303edefcf0f77..e6bc782683ea5d69840ca7b89b20cfdc1adac5fd 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
@@ -457,7 +457,7 @@ public class Turtle extends Animal {
|
@@ -455,7 +455,7 @@ public class Turtle extends Animal {
|
||||||
RandomSource randomsource = this.animal.getRandom();
|
RandomSource randomsource = this.animal.getRandom();
|
||||||
|
|
||||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||||
@ -199,10 +199,10 @@ index 5385f0a1d0c5522a94e2a5ded779d68826537883..11322066522a3268063bad7267ef4dd4
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
index 0df9780c1689532d0d9f236077400b298d8e9f68..9ab60fb1b7f9c8a342d9116e99f7f0a1e463a626 100644
|
index 993ccde9e6ee769ce51cdfa4ff06cfe1bd27bbb0..963fdb4132001aa781eda45b75cb4df97d782ddc 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||||
@@ -674,7 +674,7 @@ public class EnderDragon extends Mob implements Enemy {
|
@@ -672,7 +672,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||||
|
|
||||||
if (this.level() instanceof ServerLevel) {
|
if (this.level() instanceof ServerLevel) {
|
||||||
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
||||||
@ -211,7 +211,7 @@ index 0df9780c1689532d0d9f236077400b298d8e9f68..9ab60fb1b7f9c8a342d9116e99f7f0a1
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.dragonDeathTime == 1 && !this.isSilent()) {
|
if (this.dragonDeathTime == 1 && !this.isSilent()) {
|
||||||
@@ -703,7 +703,7 @@ public class EnderDragon extends Mob implements Enemy {
|
@@ -701,7 +701,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||||
this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D));
|
this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D));
|
||||||
if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) {
|
if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) {
|
||||||
if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
||||||
@ -221,10 +221,10 @@ index 0df9780c1689532d0d9f236077400b298d8e9f68..9ab60fb1b7f9c8a342d9116e99f7f0a1
|
|||||||
|
|
||||||
if (this.dragonFight != null) {
|
if (this.dragonFight != null) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
index e7db715d45d27cbc9b3ed7cad1d907273b225c7f..0b34003058205f26a89d18dad06b2067dbe897d7 100644
|
index 0da329781f0afd4ec4a731889b892afe7e399d21..d1c3f5d076a3d560d02553d6a33e5890d0c2bfc7 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
@@ -639,7 +639,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
@@ -632,7 +632,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
if (offer.shouldRewardExp()) {
|
if (offer.shouldRewardExp()) {
|
||||||
@ -234,10 +234,10 @@ index e7db715d45d27cbc9b3ed7cad1d907273b225c7f..0b34003058205f26a89d18dad06b2067
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||||
index 09448ca61b7d1faf3b2f83d7c9f8a14afee39b7b..6b8d6ae203b7f7f2b591c35586baa4e8951a3677 100644
|
index c493c324a2606a40a3a04a55cb77790614d2707b..057eca881d279c610e933ebff5fb654625b036be 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||||
@@ -208,7 +208,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
@@ -207,7 +207,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||||
if (offer.shouldRewardExp()) {
|
if (offer.shouldRewardExp()) {
|
||||||
int i = 3 + this.random.nextInt(4);
|
int i = 3 + this.random.nextInt(4);
|
||||||
|
|
||||||
@ -247,10 +247,10 @@ index 09448ca61b7d1faf3b2f83d7c9f8a14afee39b7b..6b8d6ae203b7f7f2b591c35586baa4e8
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
index 9bf5b67922f3368e1ee4d76f6297ebe425f3ceab..d7548eb7cd6986dcea6fbf4efb76b647cc350642 100644
|
index 6b3cf71d7ced6405308b41ac316040bcc03f654d..453da998a98eabe5a55a968277b71bd9998f3221 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
@@ -523,7 +523,7 @@ public class FishingHook extends Projectile {
|
@@ -524,7 +524,7 @@ public class FishingHook extends Projectile {
|
||||||
this.level().addFreshEntity(entityitem);
|
this.level().addFreshEntity(entityitem);
|
||||||
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
|
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
|
||||||
if (playerFishEvent.getExpToDrop() > 0) {
|
if (playerFishEvent.getExpToDrop() > 0) {
|
||||||
@ -260,7 +260,7 @@ index 9bf5b67922f3368e1ee4d76f6297ebe425f3ceab..d7548eb7cd6986dcea6fbf4efb76b647
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (itemstack1.is(ItemTags.FISHES)) {
|
if (itemstack1.is(ItemTags.FISHES)) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
|
||||||
index fdab4a51ec7068047e899771aad1b9949a0113cb..7e46b1958f1139b3a97a5f11e06c6f85172d6192 100644
|
index 9963db38420b91ae817a18ff084311cb45c0edee..70ceef96c6305324aef3b006f6603817ef187e9f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
|
||||||
@@ -54,7 +54,7 @@ public class ThrownExperienceBottle extends ThrowableItemProjectile {
|
@@ -54,7 +54,7 @@ public class ThrownExperienceBottle extends ThrowableItemProjectile {
|
||||||
@ -273,7 +273,7 @@ index fdab4a51ec7068047e899771aad1b9949a0113cb..7e46b1958f1139b3a97a5f11e06c6f85
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||||
index 8d09c134058e55a23df4e23d965a7a783aed701e..45242f0ed5a0f98953df5f27fb76874d2d9e3473 100644
|
index 4e3c70f7cff0235dd58414e258567ef07661f53f..d41197db6bbf9e17b67bb1faa5d370eea0212bd3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||||
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||||
@@ -97,7 +97,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
@@ -97,7 +97,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||||
@ -286,10 +286,10 @@ index 8d09c134058e55a23df4e23d965a7a783aed701e..45242f0ed5a0f98953df5f27fb76874d
|
|||||||
|
|
||||||
world.levelEvent(1042, blockposition, 0);
|
world.levelEvent(1042, blockposition, 0);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
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 756a8ae14ffc46d6ebe0a858a03fb2e89b8e118a..89a62fbeeb78c864938a1cea84178478c6dc1b34 100644
|
index 946001c57c326f2d2f0677bca954e8558f1c851b..ed336112581ac77196ed3e60dc8aaf50312c078b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
@@ -369,8 +369,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
@@ -361,8 +361,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void popExperience(ServerLevel world, BlockPos pos, int size) {
|
public void popExperience(ServerLevel world, BlockPos pos, int size) {
|
||||||
@ -305,10 +305,10 @@ index 756a8ae14ffc46d6ebe0a858a03fb2e89b8e118a..89a62fbeeb78c864938a1cea84178478
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||||
index 65e7dcace8607c4d15938c697c882761c067f08e..7a13042631bea761952490cfd14dc20147405161 100644
|
index 8bda1a42907132b1f3289f860530ded0a4e61f93..70e068c3d0f72f31df749add2c57450f793524ae 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||||
@@ -651,7 +651,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
@@ -630,7 +630,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||||
j = event.getExpToDrop();
|
j = event.getExpToDrop();
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -318,10 +318,10 @@ index 65e7dcace8607c4d15938c697c882761c067f08e..7a13042631bea761952490cfd14dc201
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||||
index c5547988e8e4ec5f1d090d264e14556f490d4e31..c3a55347b630c57aa36f9c761e1937dc95027bb7 100644
|
index 52d4eaf7c92b9b4252e0cae25128b5ae7b0092cc..3bbd314d94de3736e039b4b2d836afa8cc892511 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||||
@@ -363,7 +363,7 @@ public final class CraftEntityTypes {
|
@@ -371,7 +371,7 @@ public final class CraftEntityTypes {
|
||||||
return item;
|
return item;
|
||||||
}));
|
}));
|
||||||
register(new EntityTypeData<>(EntityType.EXPERIENCE_ORB, ExperienceOrb.class, CraftExperienceOrb::new,
|
register(new EntityTypeData<>(EntityType.EXPERIENCE_ORB, ExperienceOrb.class, CraftExperienceOrb::new,
|
@ -12,10 +12,10 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
|||||||
You can set this to 0 to disable collisions.
|
You can set this to 0 to disable collisions.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index a6a97dca29c900278885b5ab1741229fcfaf7b36..6d31ced629fabef4de2ef9a26586cea0cffa155c 100644
|
index 10687787a5fd1a81ad5a625848db4649381eab67..9f906e51f236e84f6cee8eba4b7587edee7ce796 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -394,6 +394,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -396,6 +396,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
public long activatedTick = Integer.MIN_VALUE;
|
public long activatedTick = Integer.MIN_VALUE;
|
||||||
public void inactiveTick() { }
|
public void inactiveTick() { }
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -24,10 +24,10 @@ index a6a97dca29c900278885b5ab1741229fcfaf7b36..6d31ced629fabef4de2ef9a26586cea0
|
|||||||
@javax.annotation.Nullable
|
@javax.annotation.Nullable
|
||||||
private org.bukkit.util.Vector origin;
|
private org.bukkit.util.Vector origin;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index a49d20bab5c49721fb41e2429c7fb721ef3c2f98..589fba7264d8041e6f766779fe8e3d5071398fed 100644
|
index b51f4172b7135689fcd99b380f1a78bf8e723cfa..177ad43b62c6e1efc0ae6298e464debdf66b1055 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3369,10 +3369,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3454,10 +3454,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator iterator1 = list.iterator();
|
Iterator iterator1 = list.iterator();
|
@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
|
|||||||
in corruption/dataloss.
|
in corruption/dataloss.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 04cc2b69336ceb463910c081119f3188d8c426d3..fa1a6c2f1c11506243cfc61b519bef578e5627fc 100644
|
index 1ecd28b709e3ef47568298878a84a6aede52d6f5..9cbe8415699a79344b3c4245cc4f9424b7df3b2a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -236,6 +236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -239,6 +239,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
private Map<ResourceKey<Level>, ServerLevel> levels;
|
private Map<ResourceKey<Level>, ServerLevel> levels;
|
||||||
private PlayerList playerList;
|
private PlayerList playerList;
|
||||||
private volatile boolean running;
|
private volatile boolean running;
|
||||||
@ -41,7 +41,7 @@ index 04cc2b69336ceb463910c081119f3188d8c426d3..fa1a6c2f1c11506243cfc61b519bef57
|
|||||||
private boolean stopped;
|
private boolean stopped;
|
||||||
private int tickCount;
|
private int tickCount;
|
||||||
private int ticksUntilAutosave;
|
private int ticksUntilAutosave;
|
||||||
@@ -919,7 +920,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -934,7 +935,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
if (this.playerList != null) {
|
if (this.playerList != null) {
|
||||||
MinecraftServer.LOGGER.info("Saving players");
|
MinecraftServer.LOGGER.info("Saving players");
|
||||||
this.playerList.saveAll();
|
this.playerList.saveAll();
|
||||||
@ -50,7 +50,7 @@ index 04cc2b69336ceb463910c081119f3188d8c426d3..fa1a6c2f1c11506243cfc61b519bef57
|
|||||||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -999,6 +1000,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1014,6 +1015,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
public void halt(boolean waitForShutdown) {
|
public void halt(boolean waitForShutdown) {
|
||||||
@ -64,10 +64,10 @@ index 04cc2b69336ceb463910c081119f3188d8c426d3..fa1a6c2f1c11506243cfc61b519bef57
|
|||||||
if (waitForShutdown) {
|
if (waitForShutdown) {
|
||||||
try {
|
try {
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index e45568112220b246adf3efdc43d26258336efbf9..1c313dbfc501ce5782fb2d7500b9af35f0855c46 100644
|
index 2b8824242b0e6e0224d6eac8f661ae1435c58d66..d42795278a54552410cd72d5cca636040a692971 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1176,8 +1176,15 @@ public abstract class PlayerList {
|
@@ -1174,8 +1174,15 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeAll() {
|
public void removeAll() {
|
@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
|
|||||||
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 76d3ecbe62775b09aca1306b1adab56a5c730162..6162bc5d905505be2a3570cd52c7497c6136136a 100644
|
index 19b4e2a2c01a10642ced9bdffc0acb661b270741..03384eea3601869651a7539fc09a0a2d396137d2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2177,6 +2177,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2248,6 +2248,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
switch (packet.getAction()) {
|
switch (packet.getAction()) {
|
||||||
case PRESS_SHIFT_KEY:
|
case PRESS_SHIFT_KEY:
|
||||||
this.player.setShiftKeyDown(true);
|
this.player.setShiftKeyDown(true);
|
||||||
@ -32,10 +32,10 @@ index 76d3ecbe62775b09aca1306b1adab56a5c730162..6162bc5d905505be2a3570cd52c7497c
|
|||||||
case RELEASE_SHIFT_KEY:
|
case RELEASE_SHIFT_KEY:
|
||||||
this.player.setShiftKeyDown(false);
|
this.player.setShiftKeyDown(false);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index 0cd534ddc28758f7fa6203c66505f167ecbdd3de..7429df8c6f29f7216e33cde3226424936de97cf9 100644
|
index 81db0e4e4bced556d35978a10c9d9789ec527830..4ac2d47df8e805b4f895951e839a0af8df7127cc 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -589,6 +589,7 @@ public abstract class Player extends LivingEntity {
|
@@ -588,6 +588,7 @@ public abstract class Player extends LivingEntity {
|
||||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
||||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
||||||
if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 9978f3ffb3803b7f9278d49a688bc2d4bf740cf3..827579f59d34b61912a67b40624f0f41524185fd 100644
|
index c49dfa14a95b495a615fcf2d400a1630f7a698dd..f6012feafe1dbbf9c52ac38965d9475896766657 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2773,5 +2773,10 @@ public final class CraftServer implements Server {
|
@@ -2796,5 +2796,10 @@ public final class CraftServer implements Server {
|
||||||
commandMap.registerServerAliases();
|
commandMap.registerServerAliases();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||||
index 2c2dbe18e7c3c7fa9c98aaa619637f399e83f72e..79614aaa4832c969443d6393e7d5bb8a622a5d98 100644
|
index 3b496eaac4eaadadb3f366f4121ce899aa212532..01938fc75158c13c4b040fa623934ec841cbf719 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||||
@@ -288,7 +288,7 @@ public class Creeper extends Monster implements PowerableMob {
|
@@ -286,7 +286,7 @@ public class Creeper extends Monster implements PowerableMob {
|
||||||
private void spawnLingeringCloud() {
|
private void spawnLingeringCloud() {
|
||||||
Collection<MobEffectInstance> collection = this.getActiveEffects();
|
Collection<MobEffectInstance> collection = this.getActiveEffects();
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index 2de1ad28d42d4beec69901bf985ac0be582f00b9..655dfa9113ca82dc56bc8f4b083ea049ee5b4bee 100644
|
index 14d1222286c7387eca828a9380053f14e4539b3c..b740d931ad7ad81bf94afa62a9ae44a2fe9549d4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -671,6 +671,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
@@ -712,6 +712,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
||||||
ItemEntity entityitem = (ItemEntity) iterator.next();
|
ItemEntity entityitem = (ItemEntity) iterator.next();
|
||||||
|
|
||||||
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
|
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
|
||||||
@ -21,10 +21,10 @@ index 2de1ad28d42d4beec69901bf985ac0be582f00b9..655dfa9113ca82dc56bc8f4b083ea049
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index 270ae75863ff6e97e80641e94ce2ade07f683c5a..d1bd8b5e5b0873a526ae449986593867b10eec12 100644
|
index 16e3bdf6a2789a0828fc9d879b441fa4bd12d428..707fe72003a254a84ceef8a0572fff52997a4129 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -55,6 +55,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -59,6 +59,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
public UUID target;
|
public UUID target;
|
||||||
public final float bobOffs;
|
public final float bobOffs;
|
||||||
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index d1bd8b5e5b0873a526ae449986593867b10eec12..a66abc5e759ee0f170b5aadd2640613b98ef6942 100644
|
index 707fe72003a254a84ceef8a0572fff52997a4129..f63d1145be7b6fb76373a4ec1423fd7cedf73b63 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -424,6 +424,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -435,6 +435,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
// CraftBukkit start - fire PlayerPickupItemEvent
|
// CraftBukkit start - fire PlayerPickupItemEvent
|
||||||
int canHold = player.getInventory().canHold(itemstack);
|
int canHold = player.getInventory().canHold(itemstack);
|
||||||
int remaining = i - canHold;
|
int remaining = i - canHold;
|
||||||
@ -16,7 +16,7 @@ index d1bd8b5e5b0873a526ae449986593867b10eec12..a66abc5e759ee0f170b5aadd2640613b
|
|||||||
|
|
||||||
if (this.pickupDelay <= 0 && canHold > 0) {
|
if (this.pickupDelay <= 0 && canHold > 0) {
|
||||||
itemstack.setCount(canHold);
|
itemstack.setCount(canHold);
|
||||||
@@ -431,8 +432,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -442,8 +443,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
|
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
|
||||||
playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
|
playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
|
||||||
this.level().getCraftServer().getPluginManager().callEvent(playerEvent);
|
this.level().getCraftServer().getPluginManager().callEvent(playerEvent);
|
||||||
@ -31,7 +31,7 @@ index d1bd8b5e5b0873a526ae449986593867b10eec12..a66abc5e759ee0f170b5aadd2640613b
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,6 +469,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -473,6 +480,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) {
|
if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index a66abc5e759ee0f170b5aadd2640613b98ef6942..d568726f80308e29bcfa3714728096d7d0aa822c 100644
|
index f63d1145be7b6fb76373a4ec1423fd7cedf73b63..d97e12a2dca072ae102b029fb67472dacc2c5b40 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -37,6 +37,7 @@ import org.bukkit.event.entity.EntityPickupItemEvent;
|
@@ -39,6 +39,7 @@ import org.bukkit.event.entity.EntityPickupItemEvent;
|
||||||
import org.bukkit.event.entity.EntityRemoveEvent;
|
import org.bukkit.event.entity.EntityRemoveEvent;
|
||||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -16,7 +16,7 @@ index a66abc5e759ee0f170b5aadd2640613b98ef6942..d568726f80308e29bcfa3714728096d7
|
|||||||
|
|
||||||
public class ItemEntity extends Entity implements TraceableEntity {
|
public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
|
|
||||||
@@ -426,6 +427,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -437,6 +438,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
int remaining = i - canHold;
|
int remaining = i - canHold;
|
||||||
boolean flyAtPlayer = false; // Paper
|
boolean flyAtPlayer = false; // Paper
|
||||||
|
|
@ -10,10 +10,10 @@ out due to a sync load, as the worldgen threads will be
|
|||||||
stalling on profile lookups.
|
stalling on profile lookups.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index bf17c2005aa71a627c93b3bbaa773a5902b897c1..3db6962b9f6f5da09694d57b7323c39f314b1327 100644
|
index 9d91e7890d8cba72f0aa2ca9661f6de7ae8a0dcd..cf54e2c8e8aadb9e7343382a5ba59c657234c9b9 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -91,6 +91,22 @@ public class Util {
|
@@ -93,6 +93,22 @@ public class Util {
|
||||||
private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main");
|
private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main");
|
||||||
private static final ExecutorService IO_POOL = makeIoExecutor("IO-Worker-", false);
|
private static final ExecutorService IO_POOL = makeIoExecutor("IO-Worker-", false);
|
||||||
private static final ExecutorService DOWNLOAD_POOL = makeIoExecutor("Download-", true);
|
private static final ExecutorService DOWNLOAD_POOL = makeIoExecutor("Download-", true);
|
||||||
@ -34,10 +34,10 @@ index bf17c2005aa71a627c93b3bbaa773a5902b897c1..3db6962b9f6f5da09694d57b7323c39f
|
|||||||
+ });
|
+ });
|
||||||
+ // Paper end - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
+ // Paper end - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
||||||
private static final DateTimeFormatter FILENAME_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss", Locale.ROOT);
|
private static final DateTimeFormatter FILENAME_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss", Locale.ROOT);
|
||||||
private static final int LINEAR_LOOKUP_THRESHOLD = 8;
|
public static final int LINEAR_LOOKUP_THRESHOLD = 8;
|
||||||
public static final long NANOS_PER_MILLI = 1000000L;
|
public static final long NANOS_PER_MILLI = 1000000L;
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
index 92c22dc10e385f1942f2ec375bbce9faf257462b..adb472c175cc6f6ced7075a37423d6c898fd5ccb 100644
|
index aeb0c7ce9b6f93dadd407dbdefba053568f2e2fe..416b26c2ab62b29d640169166980e398d5824b14 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
@@ -169,7 +169,7 @@ public class GameProfileCache {
|
@@ -169,7 +169,7 @@ public class GameProfileCache {
|
||||||
@ -50,18 +50,18 @@ index 92c22dc10e385f1942f2ec375bbce9faf257462b..adb472c175cc6f6ced7075a37423d6c8
|
|||||||
}, this.executor);
|
}, this.executor);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||||
index bffc770105800ba78c6d9bfb56ad9ad425f19910..d0b3a836de9830a4da534bedd9f94a16a82ef9c6 100644
|
index 6097e0ab387cfa4c2c9ab0389fc5bb6cd899ecc3..ebba6bc5b337d19e32be5a78294501ed8300f2bd 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||||
@@ -80,7 +80,7 @@ public class SkullBlockEntity extends BlockEntity {
|
@@ -105,7 +105,7 @@ public class SkullBlockEntity extends BlockEntity {
|
||||||
} else {
|
ProfileResult profileResult = apiServices.sessionService().fetchProfile(uuid, true);
|
||||||
return Optional.empty();
|
return Optional.ofNullable(profileResult).map(ProfileResult::profile);
|
||||||
}
|
}
|
||||||
- }, Util.backgroundExecutor());
|
- }, Util.backgroundExecutor());
|
||||||
+ }, Util.PROFILE_EXECUTOR); // Paper - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
+ }, Util.PROFILE_EXECUTOR); // Paper - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public static void clear() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
||||||
index 358af0121ce3d87a9f51da2bae0699034c1560b4..edd340c66ea8cec1c76ba29f1deab14c4784a7e5 100644
|
index 358af0121ce3d87a9f51da2bae0699034c1560b4..edd340c66ea8cec1c76ba29f1deab14c4784a7e5 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
|
@ -580,10 +580,10 @@ index 722dcae9ab65bcacb9fb89dfaa63715d87816476..c57e8b6458800fe9bb27050eecc42bd3
|
|||||||
* Calculates distance between 2 entities
|
* Calculates distance between 2 entities
|
||||||
* @param e1
|
* @param e1
|
||||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||||
index a40755f2e4d36a3ef34e187727065da4b918a5e8..d46b7bff34b9b43e895f713d2e73071bc62de443 100644
|
index 6afede80c10503a261d0f735c351d943597be9ff..993296f9c2457809bd6b844c309895f417eb42a5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Main.java
|
--- a/src/main/java/net/minecraft/server/Main.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||||
@@ -165,7 +165,7 @@ public class Main {
|
@@ -168,7 +168,7 @@ public class Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
File file = (File) optionset.valueOf("universe"); // CraftBukkit
|
File file = (File) optionset.valueOf("universe"); // CraftBukkit
|
||||||
@ -593,7 +593,7 @@ index a40755f2e4d36a3ef34e187727065da4b918a5e8..d46b7bff34b9b43e895f713d2e73071b
|
|||||||
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
||||||
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
|
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
index adb472c175cc6f6ced7075a37423d6c898fd5ccb..1ec0f3a7148c2f412421772f6e1dff0bb92a51bc 100644
|
index 416b26c2ab62b29d640169166980e398d5824b14..774d81c702edb76a2f6184d4dc53687de6734a79 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
@@ -126,6 +126,17 @@ public class GameProfileCache {
|
@@ -126,6 +126,17 @@ public class GameProfileCache {
|
||||||
@ -615,10 +615,10 @@ index adb472c175cc6f6ced7075a37423d6c898fd5ccb..1ec0f3a7148c2f412421772f6e1dff0b
|
|||||||
String s1 = name.toLowerCase(Locale.ROOT);
|
String s1 = name.toLowerCase(Locale.ROOT);
|
||||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index f7d937c6a11e24afe767411428210f3c042a6f78..eb3bb76cf141991acd6a384bf461719de8392754 100644
|
index f6012feafe1dbbf9c52ac38965d9475896766657..a7554f2028f93867360c27a51c9580a8b49f5b57 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -262,6 +262,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
@@ -264,6 +264,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||||
|
|
||||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||||
|
|
||||||
@ -628,15 +628,15 @@ index f7d937c6a11e24afe767411428210f3c042a6f78..eb3bb76cf141991acd6a384bf461719d
|
|||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
private final String serverName = "Paper"; // Paper
|
private final String serverName = "Paper"; // Paper
|
||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
@@ -305,6 +308,7 @@ public final class CraftServer implements Server {
|
@@ -307,6 +310,7 @@ public final class CraftServer implements Server {
|
||||||
static {
|
static {
|
||||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||||
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
|
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
|
||||||
+ ConfigurationSerialization.registerClass(com.destroystokyo.paper.profile.CraftPlayerProfile.class); // Paper
|
+ ConfigurationSerialization.registerClass(com.destroystokyo.paper.profile.CraftPlayerProfile.class); // Paper
|
||||||
CraftItemFactory.instance();
|
CraftItemFactory.instance();
|
||||||
|
CraftEntityFactory.instance();
|
||||||
}
|
}
|
||||||
|
@@ -2801,5 +2805,42 @@ public final class CraftServer implements Server {
|
||||||
@@ -2782,5 +2786,42 @@ public final class CraftServer implements Server {
|
|
||||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||||
}
|
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add UnknownCommandEvent
|
|||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||||
index f6938c35ac6f6116084d3e7ec9cdc918f20b6f61..edf49f2d9921b4517fb98929d842f7a62c5549df 100644
|
index ec34e402104d7a696ea95e0b11ee70189b678ab9..d9fc3c25bef251df6a53ee47ec224b07240a931c 100644
|
||||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||||
@@ -334,8 +334,13 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
@@ -330,8 +330,13 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendFailure(Component message) {
|
public void sendFailure(Component message) {
|
||||||
@ -25,10 +25,10 @@ index f6938c35ac6f6116084d3e7ec9cdc918f20b6f61..edf49f2d9921b4517fb98929d842f7a6
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
index 495a7b713a7ab9c19aad34512b76523bad43b89d..15a5059994371da4850adcf726034a715b80efba 100644
|
index b81a4204a85e5b431cd6137fd8b80e43779c97b7..03966f447354fb16a01442ff6c6257fa19461bcd 100644
|
||||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
@@ -152,6 +152,7 @@ public class Commands {
|
@@ -154,6 +154,7 @@ public class Commands {
|
||||||
public static final int LEVEL_ADMINS = 3;
|
public static final int LEVEL_ADMINS = 3;
|
||||||
public static final int LEVEL_OWNERS = 4;
|
public static final int LEVEL_OWNERS = 4;
|
||||||
private final com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher = new com.mojang.brigadier.CommandDispatcher();
|
private final com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher = new com.mojang.brigadier.CommandDispatcher();
|
||||||
@ -36,7 +36,7 @@ index 495a7b713a7ab9c19aad34512b76523bad43b89d..15a5059994371da4850adcf726034a71
|
|||||||
|
|
||||||
public Commands(Commands.CommandSelection environment, CommandBuildContext commandRegistryAccess) {
|
public Commands(Commands.CommandSelection environment, CommandBuildContext commandRegistryAccess) {
|
||||||
this(); // CraftBukkit
|
this(); // CraftBukkit
|
||||||
@@ -254,6 +255,7 @@ public class Commands {
|
@@ -257,6 +258,7 @@ public class Commands {
|
||||||
if (environment.includeIntegrated) {
|
if (environment.includeIntegrated) {
|
||||||
PublishCommand.register(this.dispatcher);
|
PublishCommand.register(this.dispatcher);
|
||||||
}
|
}
|
||||||
@ -44,16 +44,16 @@ index 495a7b713a7ab9c19aad34512b76523bad43b89d..15a5059994371da4850adcf726034a71
|
|||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
}
|
}
|
||||||
@@ -328,7 +330,7 @@ public class Commands {
|
@@ -331,7 +333,7 @@ public class Commands {
|
||||||
commandlistenerwrapper.getServer().getProfiler().push(() -> {
|
commandlistenerwrapper.getServer().getProfiler().push(() -> {
|
||||||
return "/" + s;
|
return "/" + s;
|
||||||
});
|
});
|
||||||
- ContextChain contextchain = Commands.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit
|
- ContextChain<CommandSourceStack> contextchain = Commands.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit
|
||||||
+ ContextChain contextchain = this.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit // Paper - Add UnknownCommandEvent
|
+ ContextChain contextchain = this.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit // Paper - Add UnknownCommandEvent
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (contextchain != null) {
|
if (contextchain != null) {
|
||||||
@@ -362,14 +364,23 @@ public class Commands {
|
@@ -365,14 +367,23 @@ public class Commands {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@ -79,7 +79,7 @@ index 495a7b713a7ab9c19aad34512b76523bad43b89d..15a5059994371da4850adcf726034a71
|
|||||||
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||||
int i = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
int i = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
||||||
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
|
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
|
||||||
@@ -388,7 +399,18 @@ public class Commands {
|
@@ -391,7 +402,18 @@ public class Commands {
|
||||||
}
|
}
|
||||||
|
|
||||||
ichatmutablecomponent.append((Component) Component.translatable("command.context.here").withStyle(ChatFormatting.RED, ChatFormatting.ITALIC));
|
ichatmutablecomponent.append((Component) Component.translatable("command.context.here").withStyle(ChatFormatting.RED, ChatFormatting.ITALIC));
|
||||||
@ -100,7 +100,7 @@ index 495a7b713a7ab9c19aad34512b76523bad43b89d..15a5059994371da4850adcf726034a71
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index eb3bb76cf141991acd6a384bf461719de8392754..b6e6b4213e893fac64855cc4b4e6eeb4246050d1 100644
|
index a7554f2028f93867360c27a51c9580a8b49f5b57..f351667cec83f39c28073e262b6c9b51873fb327 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -529,6 +529,7 @@ public final class CraftServer implements Server {
|
@@ -529,6 +529,7 @@ public final class CraftServer implements Server {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index 7429df8c6f29f7216e33cde3226424936de97cf9..4bbf8bb418e3585be2efce5d9a8785faafe7cdde 100644
|
index 4ac2d47df8e805b4f895951e839a0af8df7127cc..e292c1ab45d2618c4e852875107ec1819dba85c4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -1956,20 +1956,45 @@ public abstract class Player extends LivingEntity {
|
@@ -1982,20 +1982,45 @@ public abstract class Player extends LivingEntity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,10 +59,10 @@ index 7429df8c6f29f7216e33cde3226424936de97cf9..4bbf8bb418e3585be2efce5d9a8785fa
|
|||||||
@Override
|
@Override
|
||||||
public abstract boolean isSpectator();
|
public abstract boolean isSpectator();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
index 4d92ca5b580e66e78b592bc0de1078dc10a85f39..2cb3c0b96b769c395f7fecbeebba0ff2a33b692d 100644
|
index 1010ac55d91559bcb6ebadeea447f32c6aa89226..47350439f579ef2ab408bda0fc4b8976df3a5b92 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||||
@@ -513,6 +513,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
@@ -511,6 +511,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||||
this.getHandle().getCooldowns().addCooldown(CraftItemType.bukkitToMinecraft(material), ticks);
|
this.getHandle().getCooldowns().addCooldown(CraftItemType.bukkitToMinecraft(material), ticks);
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Block player logins during server shutdown
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index c5b451a706240dbd6719e001825c6859fc1b2a49..33bd60b5ef7383061acf2da24cfee35b495ebfc7 100644
|
index b03d4f12e89b8a5fe6ad2282f8cc2909b87795a9..93df138ffdf45303ce28ef6bff462b1b14e27f61 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -74,6 +74,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -95,6 +95,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 6d31ced629fabef4de2ef9a26586cea0cffa155c..0cc82ffdcebbdd92fa953e7c52a20911f46a503c 100644
|
index 9f906e51f236e84f6cee8eba4b7587edee7ce796..e612921a7fb68dd74d8fd4084a8beccc299ff6ea 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -395,6 +395,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -397,6 +397,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
public void inactiveTick() { }
|
public void inactiveTick() { }
|
||||||
// Spigot end
|
// Spigot end
|
||||||
protected int numCollisions = 0; // Paper - Cap entity collisions
|
protected int numCollisions = 0; // Paper - Cap entity collisions
|
||||||
@ -16,7 +16,7 @@ index 6d31ced629fabef4de2ef9a26586cea0cffa155c..0cc82ffdcebbdd92fa953e7c52a20911
|
|||||||
// Paper start - Entity origin API
|
// Paper start - Entity origin API
|
||||||
@javax.annotation.Nullable
|
@javax.annotation.Nullable
|
||||||
private org.bukkit.util.Vector origin;
|
private org.bukkit.util.Vector origin;
|
||||||
@@ -2162,6 +2163,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2190,6 +2191,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
}
|
}
|
||||||
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ index 6d31ced629fabef4de2ef9a26586cea0cffa155c..0cc82ffdcebbdd92fa953e7c52a20911
|
|||||||
// Paper end
|
// Paper end
|
||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
@@ -2302,6 +2307,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2330,6 +2335,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
this.originWorld = originWorld;
|
this.originWorld = originWorld;
|
||||||
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||||
}
|
}
|
||||||
@ -37,10 +37,10 @@ index 6d31ced629fabef4de2ef9a26586cea0cffa155c..0cc82ffdcebbdd92fa953e7c52a20911
|
|||||||
|
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||||
index a46293dafeb73f9206b92a2850df18a6a5f688b4..487e4211d6486d2b3052c931c27cee9729e7841b 100644
|
index aa54237205989f619ac6a3faa2e4285427b9e31d..43d399e1a0ba2fb0541f851a28032fa60fc01b33 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||||
@@ -167,6 +167,7 @@ public abstract class BaseSpawner {
|
@@ -176,6 +176,7 @@ public abstract class BaseSpawner {
|
||||||
// Spigot End
|
// Spigot End
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,10 +49,10 @@ index a46293dafeb73f9206b92a2850df18a6a5f688b4..487e4211d6486d2b3052c931c27cee97
|
|||||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||||
continue;
|
continue;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index 1be5c322abcec8ec32b84dec02d386e53cb5e16a..4808c62d3d951b201061659c91d1001e4b9b49ef 100644
|
index 3390033bbfc8fd0715458e5faa6a65477272a80b..88e0ac38214c537ea8be5d23a17ac5a58acd3682 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -983,4 +983,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -993,4 +993,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
return originVector.toLocation(world);
|
return originVector.toLocation(world);
|
||||||
}
|
}
|
||||||
// Paper end - entity origin API
|
// Paper end - entity origin API
|
@ -7,7 +7,7 @@ Not all horses with Saddles have armor. This lets us break up the horses with sa
|
|||||||
and access their saddle state separately from an interface shared with Armor.
|
and access their saddle state separately from an interface shared with Armor.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||||||
index 8093e2bebd17d7a02d6df8882bc1ac000ca8b21c..81c34b5245133cdd119f36c6bc084fb8d99f97f8 100644
|
index 3b7a355945adbc671b1c3b6381e6fbbcb9fe7294..5192fa2aeba7833fca456bded0deedde7de03506 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||||||
@@ -5,6 +5,7 @@ import java.util.UUID;
|
@@ -5,6 +5,7 @@ import java.util.UUID;
|
25
patches/server/0150-ensureServerConversions-API.patch
Normal file
25
patches/server/0150-ensureServerConversions-API.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aikar <aikar@aikar.co>
|
||||||
|
Date: Wed, 4 May 2016 22:43:12 -0400
|
||||||
|
Subject: [PATCH] ensureServerConversions API
|
||||||
|
|
||||||
|
This will take a Bukkit ItemStack and run it through any conversions a server process would perform on it,
|
||||||
|
to ensure it meets latest minecraft expectations.
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
|
index e5ee4a2e5cca2fd3a74ac58335ccf589ab87c9c5..74c8f8540340be6d7d26bbecfe07c6ce3ed019ad 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
|
@@ -514,4 +514,12 @@ public final class CraftItemFactory implements ItemFactory {
|
||||||
|
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
|
||||||
|
}
|
||||||
|
// Paper end - Adventure
|
||||||
|
+
|
||||||
|
+ // Paper start - ensure server conversions API
|
||||||
|
+ // TODO: DO WE NEED THIS?
|
||||||
|
+ @Override
|
||||||
|
+ public ItemStack ensureServerConversions(ItemStack item) {
|
||||||
|
+ return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
|
||||||
|
+ }
|
||||||
|
+ // Paper end - ensure server conversions API
|
||||||
|
}
|
@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
|
|||||||
You must replace the language file embedded in the server jar.
|
You must replace the language file embedded in the server jar.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
index 89bc6cb62123bc17d579b578c4d1d2e5f8c40837..71db89105c70cb70726fb6a732b899297aeee82a 100644
|
index 74c8f8540340be6d7d26bbecfe07c6ce3ed019ad..fc51a93785ffc464d2719b440f49022f24b3983a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
@@ -512,4 +512,19 @@ public final class CraftItemFactory implements ItemFactory {
|
@@ -522,4 +522,19 @@ public final class CraftItemFactory implements ItemFactory {
|
||||||
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
|
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
|
||||||
}
|
}
|
||||||
// Paper end - ensure server conversions API
|
// Paper end - ensure server conversions API
|
@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index e35e202d49f01c0c97b8c3e41a14254cbd4f2c49..d2002567e10883bcf61a2036cea1b598aacc00da 100644
|
index d42795278a54552410cd72d5cca636040a692971..96c9b8e3f26054ca0e285dc188cd79d121e29afd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -632,9 +632,9 @@ public abstract class PlayerList {
|
@@ -631,9 +631,9 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
// return chatmessage;
|
// return chatmessage;
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
|
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
|
||||||
@ -21,7 +21,7 @@ index e35e202d49f01c0c97b8c3e41a14254cbd4f2c49..d2002567e10883bcf61a2036cea1b598
|
|||||||
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
||||||
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
||||||
|
|
||||||
@@ -1025,7 +1025,23 @@ public abstract class PlayerList {
|
@@ -1024,7 +1024,23 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWhiteListed(GameProfile profile) {
|
public boolean isWhiteListed(GameProfile profile) {
|
@ -9,10 +9,10 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa
|
|||||||
and to provide some level of hint without being disruptive.
|
and to provide some level of hint without being disruptive.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java
|
diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java
|
||||||
index 8ff786c366332588a2df053438f23cc9fb7e2b84..c887d34171f89c731d76c4ca92c70be2b1edc1e6 100644
|
index d0d95d729853fc296c4931a2f73a3fc5f94302c9..05f4be8dfff37ab6804a2d990b1f8c430d42dc7c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Bootstrap.java
|
--- a/src/main/java/net/minecraft/server/Bootstrap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
|
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
|
||||||
@@ -45,7 +45,7 @@ public class Bootstrap {
|
@@ -44,7 +44,7 @@ public class Bootstrap {
|
||||||
public static void bootStrap() {
|
public static void bootStrap() {
|
||||||
if (!Bootstrap.isBootstrapped) {
|
if (!Bootstrap.isBootstrapped) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -21,7 +21,7 @@ index 8ff786c366332588a2df053438f23cc9fb7e2b84..c887d34171f89c731d76c4ca92c70be2
|
|||||||
switch (name) {
|
switch (name) {
|
||||||
case "DispenserRegistry":
|
case "DispenserRegistry":
|
||||||
break;
|
break;
|
||||||
@@ -59,7 +59,7 @@ public class Bootstrap {
|
@@ -58,7 +58,7 @@ public class Bootstrap {
|
||||||
System.err.println("*** WARNING: This server jar is unsupported, use at your own risk. ***");
|
System.err.println("*** WARNING: This server jar is unsupported, use at your own risk. ***");
|
||||||
System.err.println("**********************************************************************");
|
System.err.println("**********************************************************************");
|
||||||
break;
|
break;
|
||||||
@ -31,12 +31,12 @@ index 8ff786c366332588a2df053438f23cc9fb7e2b84..c887d34171f89c731d76c4ca92c70be2
|
|||||||
Bootstrap.isBootstrapped = true;
|
Bootstrap.isBootstrapped = true;
|
||||||
Instant instant = Instant.now();
|
Instant instant = Instant.now();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index e5df5469f20ccffcbe9cd227df6f5c60e82206bf..d8a7287849407c4756d4ebe4b55c358970320ce3 100644
|
index dc93fd6f89694d9ae3c05de9a9d427ecce564fc9..caa7fefab037a24713e9f7f15a541d47bc7655ee 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -258,10 +258,12 @@ public class Main {
|
@@ -259,10 +259,12 @@ public class Main {
|
||||||
Calendar deadline = Calendar.getInstance();
|
Calendar deadline = Calendar.getInstance();
|
||||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||||
if (buildDate.before(deadline.getTime())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
- System.err.println("*** Error, this build is outdated ***");
|
- System.err.println("*** Error, this build is outdated ***");
|
||||||
+ // Paper start - This is some stupid bullshit
|
+ // Paper start - This is some stupid bullshit
|
@ -7,10 +7,10 @@ Subject: [PATCH] LivingEntity#setKiller
|
|||||||
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
|
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 75dccbdde0d116ef194aa2ced328ad3c3992204e..19f8cfe1146374169208f26632763a882291431c 100644
|
index 4a2f49be0af5d88e0fe5dd8af00b77dd0da2f208..d77c31a8b41df69d11c1ce4b77975e9a38e317b3 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
@@ -406,6 +406,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -405,6 +405,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
|
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||||
index 68679cd5857240ec4bc2951fa42a0dbbd4c13ee0..4300fab61765dd224fab084d118aae7294fc9de6 100644
|
index af9f6696f52b0f44f3b4f897a5dbd174034682c3..2c7491edbb60e7ec6a208ea7292cd28a3f8f9e31 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||||
@@ -135,7 +135,7 @@ public class Ocelot extends Animal {
|
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean removeWhenFarAway(double distanceSquared) {
|
public boolean removeWhenFarAway(double distanceSquared) {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user