mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-21 00:17:56 +01:00
117
This commit is contained in:
parent
8a37f93925
commit
2055809b1e
@ -91,10 +91,10 @@ index 8183c26b4a5ad169a53702b8c45fd05cda934e80..36dec6cd78a0990ba3c09a4a748c259e
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 03fec2504579acb0a8ba835939e0067f3649ab6a..2eb2fbe57a33701770baefea5dc727684f2779ec 100644
|
index 68436413645e0e33f22cdee0ea101ca01b343d75..4f5ff6849e0ea7a4f2491e0dbede7699554239dc 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
|
||||||
@@ -728,6 +728,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -733,6 +733,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);
|
||||||
@ -123,39 +123,26 @@ index 6a80479554f0c860a8dd6baa1a6506858fca83e3..6324689f52363f19501143c1649f0885
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 c4ff77ed93e17ed816e0325eb5bdfcdb444be4a4..60a1828d179c29514813143e3c8e93b08afe9849 100644
|
index 329f2210b73a75fc91a5ba06a1ed7f66c5aa2680..791b7d3a606fddfe21b51258e9732b14381200f5 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 @@
|
@@ -565,8 +565,13 @@ public class LevelChunk extends ChunkAccess {
|
||||||
package net.minecraft.world.level.chunk;
|
BlockState iblockdata = this.getBlockState(blockposition);
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
if (!iblockdata.hasBlockEntity()) {
|
||||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
- LevelChunk.LOGGER.warn("Trying to set block entity {} at position {}, but state {} does not allow it", new Object[]{blockEntity, blockposition, iblockdata});
|
||||||
import com.google.common.collect.Maps;
|
- new Exception().printStackTrace(); // CraftBukkit
|
||||||
import com.google.common.collect.UnmodifiableIterator;
|
|
||||||
import com.mojang.logging.LogUtils;
|
|
||||||
@@ -574,10 +575,16 @@ public class LevelChunk extends ChunkAccess {
|
|
||||||
|
|
||||||
// CraftBukkit start
|
|
||||||
} else {
|
|
||||||
- System.out.println("Attempted to place a tile entity (" + blockEntity + ") at " + blockEntity.getBlockPos().getX() + "," + blockEntity.getBlockPos().getY() + "," + blockEntity.getBlockPos().getZ()
|
|
||||||
- + " (" + this.getBlockState(blockposition) + ") where there was no entity tile!");
|
|
||||||
- System.out.println("Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16));
|
|
||||||
- new Exception().printStackTrace();
|
|
||||||
+ // Paper start - ServerExceptionEvent
|
+ // Paper start - ServerExceptionEvent
|
||||||
+ ServerInternalException e = new ServerInternalException(
|
+ com.destroystokyo.paper.exception.ServerInternalException e = new com.destroystokyo.paper.exception.ServerInternalException(
|
||||||
+ "Attempted to place a tile entity (" + blockEntity + ") at " + blockEntity.getBlockPos().getX() + ","
|
+ "Trying to set block entity %s at position %s, but state %s does not allow it".formatted(blockEntity, blockposition, iblockdata)
|
||||||
+ + blockEntity.getBlockPos().getY() + "," + blockEntity.getBlockPos().getZ()
|
+ );
|
||||||
+ + " (" + getBlockState(blockposition) + ") where there was no entity tile!\n" +
|
|
||||||
+ "Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16) +
|
|
||||||
+ "\nWorld: " + level.getLevel().dimension().location());
|
|
||||||
+ e.printStackTrace();
|
+ e.printStackTrace();
|
||||||
+ ServerInternalException.reportInternalException(e);
|
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(e);
|
||||||
+ // Paper end - ServerExceptionEvent
|
+ // Paper end - ServerExceptionEvent
|
||||||
// CraftBukkit end
|
} else {
|
||||||
}
|
BlockState iblockdata1 = blockEntity.getBlockState();
|
||||||
}
|
|
||||||
@@ -1064,6 +1071,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -1076,6 +1081,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);
|
@ -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 fb3f9082b16f5ec420ddc1f5a0e81b8130a71e4f..66ba606ccbff3a578a090d5170f3ff866ecf99af 100644
|
index fafccc1c98cbc630dc71db623184a62f08618b03..b5c03b3495f5eb5ac6b054d4ca986a6a597c713c 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
|
||||||
@@ -2836,6 +2836,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -2934,6 +2934,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public PlayerTeam getTeam() {
|
public PlayerTeam getTeam() {
|
||||||
@ -23,10 +23,10 @@ index fb3f9082b16f5ec420ddc1f5a0e81b8130a71e4f..66ba606ccbff3a578a090d5170f3ff86
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 ddf4a7bc19ba358364ea4517ce941e63ec4d26a0..878a8b7e1b0551d7b749cacce7ae63bc5349b5f3 100644
|
index fe52b8c57f652fcd49a2282f7a8f1041909b35cf..f8b771a10b9bf123b55b8f3097bb8c6da607c413 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
|
||||||
@@ -873,6 +873,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -847,6 +847,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
String s = nbt.getString("Team");
|
String s = nbt.getString("Team");
|
||||||
Scoreboard scoreboard = this.level().getScoreboard();
|
Scoreboard scoreboard = this.level().getScoreboard();
|
||||||
PlayerTeam scoreboardteam = scoreboard.getPlayerTeam(s);
|
PlayerTeam scoreboardteam = scoreboard.getPlayerTeam(s);
|
@ -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 c6b41aea86dd6c18b25754fa1ffe4d8ab1dd0f75..4a2f49be0af5d88e0fe5dd8af00b77dd0da2f208 100644
|
index e6c68fd9a5fcd374cd7feca081189c9ba9225743..c36e4c1802e304853320576e0521dbc53cd25425 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
|
||||||
@@ -282,10 +282,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -283,10 +283,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -41,7 +41,7 @@ index c6b41aea86dd6c18b25754fa1ffe4d8ab1dd0f75..4a2f49be0af5d88e0fe5dd8af00b77dd
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void damage(double amount) {
|
public void damage(double amount) {
|
||||||
@@ -800,4 +819,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -802,4 +821,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);
|
||||||
}
|
}
|
@ -19,7 +19,7 @@ index b24e8255ab18eb5b2e4968aa62aa3d72ef33f0eb..12b7d50f49a2184aaf220a4a50a137b2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
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 a2879ffb7ec01f7e47e912fc70d9df09527ef902..0697a34875fb807e39f4aae16788fe2455b8138f 100644
|
index 4091d4d68b58bdefb2fdac1815e351d4f7c8a523..b7d0a48f38f0d8ae586012bb4e9a9faec21103c2 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
|
||||||
@@ -134,6 +134,11 @@ public class RegionFileStorage implements AutoCloseable {
|
@@ -134,6 +134,11 @@ public class RegionFileStorage implements AutoCloseable {
|
@ -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 26b8a69a528db8a836b138a2a223c385508ce2c4..5f5d8ae29ff702eacc72341fae074a05d977e7cd 100644
|
index 94008b8a1f2dafdb9efa1fec6096d3eb632b9a5e..d2061ea6f670edd33be2460eef0b489e88857690 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
|
||||||
@@ -201,7 +201,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@@ -202,7 +202,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 26b8a69a528db8a836b138a2a223c385508ce2c4..5f5d8ae29ff702eacc72341fae074a05
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 f4b4e115a1f39524c2bd307c0e1aaf3c140df7c6..d6fafe977809a549e7076254d2dc6a4870af8530 100644
|
index ecb17cffbec7d2630602b265660f7b9b3f317906..409607c68a1205094ae82e5384e8c13654e492da 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
|
||||||
@@ -206,6 +206,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -208,6 +208,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 f4b4e115a1f39524c2bd307c0e1aaf3c140df7c6..d6fafe977809a549e7076254d2dc6a48
|
|||||||
|
|
||||||
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
@@ -2080,6 +2081,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2093,6 +2094,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
// Paper end - adventure
|
// Paper end - adventure
|
||||||
|
|
@ -16,10 +16,10 @@ 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 65502d719c5e87dc6e24662fcc8ba1d0bde0b78d..df0b643e9665d967d1fcd4556a3a23135b4c577f 100644
|
index fd31d0e76d1a953b128e777b1bc27e24b1e03ed7..bce780f491ee12dcd23a4ea5dd3ce6e8f92e6267 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
|
||||||
@@ -476,6 +476,7 @@ public final class CraftServer implements Server {
|
@@ -479,6 +479,7 @@ public final class CraftServer implements Server {
|
||||||
if (type == PluginLoadOrder.STARTUP) {
|
if (type == PluginLoadOrder.STARTUP) {
|
||||||
this.helpMap.clear();
|
this.helpMap.clear();
|
||||||
this.helpMap.initializeGeneralTopics();
|
this.helpMap.initializeGeneralTopics();
|
||||||
@ -27,7 +27,7 @@ index 65502d719c5e87dc6e24662fcc8ba1d0bde0b78d..df0b643e9665d967d1fcd4556a3a2313
|
|||||||
}
|
}
|
||||||
|
|
||||||
Plugin[] plugins = this.pluginManager.getPlugins();
|
Plugin[] plugins = this.pluginManager.getPlugins();
|
||||||
@@ -495,7 +496,7 @@ public final class CraftServer implements Server {
|
@@ -498,7 +499,7 @@ public final class CraftServer implements Server {
|
||||||
this.commandMap.registerServerAliases();
|
this.commandMap.registerServerAliases();
|
||||||
DefaultPermissions.registerCorePermissions();
|
DefaultPermissions.registerCorePermissions();
|
||||||
CraftDefaultPermissions.registerCorePermissions();
|
CraftDefaultPermissions.registerCorePermissions();
|
@ -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 df0b643e9665d967d1fcd4556a3a23135b4c577f..f8818be7a36cfd0066f6ffebf493ff8ccab4112e 100644
|
index bce780f491ee12dcd23a4ea5dd3ce6e8f92e6267..f8d2850c35e1b41c1844773c4b0452c17bd72f19 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
|
||||||
@@ -2777,5 +2777,23 @@ public final class CraftServer implements Server {
|
@@ -2785,5 +2785,23 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
return this.adventure$audiences;
|
return this.adventure$audiences;
|
||||||
}
|
}
|
@ -7,10 +7,10 @@ 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 f8818be7a36cfd0066f6ffebf493ff8ccab4112e..3683d2e692a092afba12b12e6e70f6b104aa89f0 100644
|
index f8d2850c35e1b41c1844773c4b0452c17bd72f19..502e7f4e168b7f9c6a0f68695f36b8d44cce218e 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
|
||||||
@@ -990,8 +990,16 @@ public final class CraftServer implements Server {
|
@@ -993,8 +993,16 @@ public final class CraftServer implements Server {
|
||||||
world.spigotConfig.init(); // Spigot
|
world.spigotConfig.init(); // Spigot
|
||||||
}
|
}
|
||||||
|
|
@ -18,10 +18,10 @@ 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/enchantment/ItemEnchantments.java b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.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 b49eb019cce58049c2b3a0e80e3d08998b16f7ea..af18de11dd55938b6091f5ab183bd3fe4e8df152 100644
|
index a4f8cb2c9dc464e94483f5574cddab85ef407048..8ac485d82c2d2b32f4d54e02c18c2cb2c3df4fa4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
|
--- a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
|
+++ b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
|
||||||
@@ -27,15 +27,27 @@ import net.minecraft.tags.TagKey;
|
@@ -26,12 +26,25 @@ import net.minecraft.tags.TagKey;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.TooltipFlag;
|
import net.minecraft.world.item.TooltipFlag;
|
||||||
import net.minecraft.world.item.component.TooltipProvider;
|
import net.minecraft.world.item.component.TooltipProvider;
|
||||||
@ -35,29 +35,27 @@ index b49eb019cce58049c2b3a0e80e3d08998b16f7ea..af18de11dd55938b6091f5ab183bd3fe
|
|||||||
+ private static final java.util.Comparator<Holder<Enchantment>> ENCHANTMENT_ORDER = java.util.Comparator.comparing(Holder::getRegisteredName);
|
+ private static final java.util.Comparator<Holder<Enchantment>> ENCHANTMENT_ORDER = java.util.Comparator.comparing(Holder::getRegisteredName);
|
||||||
+ public static final ItemEnchantments EMPTY = new ItemEnchantments(new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), true);
|
+ public static final ItemEnchantments EMPTY = new ItemEnchantments(new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), true);
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
public static final int MAX_LEVEL = 255;
|
|
||||||
private static final Codec<Integer> LEVEL_CODEC = Codec.intRange(0, 255);
|
private static final Codec<Integer> LEVEL_CODEC = Codec.intRange(0, 255);
|
||||||
- private static final Codec<Object2IntOpenHashMap<Holder<Enchantment>>> LEVELS_CODEC = Codec.unboundedMap(
|
- private static final Codec<Object2IntOpenHashMap<Holder<Enchantment>>> LEVELS_CODEC = Codec.unboundedMap(Enchantment.CODEC, LEVEL_CODEC)
|
||||||
+ private static final Codec<Object2IntAVLTreeMap<Holder<Enchantment>>> LEVELS_CODEC = Codec.unboundedMap( // Paper
|
|
||||||
BuiltInRegistries.ENCHANTMENT.holderByNameCodec(), LEVEL_CODEC
|
|
||||||
)
|
|
||||||
- .xmap(Object2IntOpenHashMap::new, Function.identity());
|
- .xmap(Object2IntOpenHashMap::new, Function.identity());
|
||||||
+ // Paper start - sort enchantments
|
+ private static final Codec<Object2IntAVLTreeMap<Holder<Enchantment>>> LEVELS_CODEC = Codec.unboundedMap(
|
||||||
|
+ Enchantment.CODEC, LEVEL_CODEC
|
||||||
|
+ )// Paper start - sort enchantments
|
||||||
+ .xmap(m -> {
|
+ .xmap(m -> {
|
||||||
+ final Object2IntAVLTreeMap<Holder<Enchantment>> map = new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER);
|
+ final Object2IntAVLTreeMap<Holder<Enchantment>> map = new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER);
|
||||||
+ map.putAll(m);
|
+ map.putAll(m);
|
||||||
+ return map;
|
+ return map;
|
||||||
+ }, Function.identity());
|
+ }, Function.identity());
|
||||||
+ // Paper end - sort enchantments
|
+ // Paper end - sort enchantments
|
||||||
private static final Codec<ItemEnchantments> FULL_CODEC = RecordCodecBuilder.create(
|
private static final Codec<ItemEnchantments> FULL_CODEC = RecordCodecBuilder.create(
|
||||||
instance -> instance.group(
|
instance -> instance.group(
|
||||||
LEVELS_CODEC.fieldOf("levels").forGetter(component -> component.enchantments),
|
LEVELS_CODEC.fieldOf("levels").forGetter(component -> component.enchantments),
|
||||||
@@ -45,16 +57,16 @@ public class ItemEnchantments implements TooltipProvider {
|
@@ -41,16 +54,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 Codec<ItemEnchantments> CODEC = Codec.withAlternative(FULL_CODEC, LEVELS_CODEC, map -> new ItemEnchantments(map, true));
|
||||||
public static final StreamCodec<RegistryFriendlyByteBuf, ItemEnchantments> STREAM_CODEC = StreamCodec.composite(
|
public static final StreamCodec<RegistryFriendlyByteBuf, ItemEnchantments> STREAM_CODEC = StreamCodec.composite(
|
||||||
- ByteBufCodecs.map(Object2IntOpenHashMap::new, ByteBufCodecs.holderRegistry(Registries.ENCHANTMENT), ByteBufCodecs.VAR_INT),
|
- ByteBufCodecs.map(Object2IntOpenHashMap::new, Enchantment.STREAM_CODEC, ByteBufCodecs.VAR_INT),
|
||||||
+ ByteBufCodecs.map((v) -> new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), ByteBufCodecs.holderRegistry(Registries.ENCHANTMENT), ByteBufCodecs.VAR_INT), // Paper
|
+ ByteBufCodecs.map((v) -> new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), Enchantment.STREAM_CODEC, ByteBufCodecs.VAR_INT),
|
||||||
component -> component.enchantments,
|
component -> component.enchantments,
|
||||||
ByteBufCodecs.BOOL,
|
ByteBufCodecs.BOOL,
|
||||||
component -> component.showInTooltip,
|
component -> component.showInTooltip,
|
||||||
@ -72,7 +70,7 @@ index b49eb019cce58049c2b3a0e80e3d08998b16f7ea..af18de11dd55938b6091f5ab183bd3fe
|
|||||||
this.enchantments = enchantments;
|
this.enchantments = enchantments;
|
||||||
this.showInTooltip = showInTooltip;
|
this.showInTooltip = showInTooltip;
|
||||||
|
|
||||||
@@ -145,7 +157,7 @@ public class ItemEnchantments implements TooltipProvider {
|
@@ -141,7 +154,7 @@ public class ItemEnchantments implements TooltipProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Mutable {
|
public static class Mutable {
|
||||||
@ -82,7 +80,7 @@ index b49eb019cce58049c2b3a0e80e3d08998b16f7ea..af18de11dd55938b6091f5ab183bd3fe
|
|||||||
|
|
||||||
public Mutable(ItemEnchantments enchantmentsComponent) {
|
public Mutable(ItemEnchantments enchantmentsComponent) {
|
||||||
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 f44502a51c9fb393746e866e1a93ae9cedc2b656..dac1ff1387462b0125140a37d134d51c5e023bf5 100644
|
index c557a54f15943e07d272c3ad41ca4f90c4dc82ac..f3f567bf61e655862fbeea4be87241d6f7f15785 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
|
||||||
@@ -191,16 +191,13 @@ public final class CraftItemStack extends ItemStack {
|
@@ -191,16 +191,13 @@ public final class CraftItemStack extends ItemStack {
|
||||||
@ -102,7 +100,7 @@ index f44502a51c9fb393746e866e1a93ae9cedc2b656..dac1ff1387462b0125140a37d134d51c
|
|||||||
+ this.setItemMeta(itemMeta);
|
+ this.setItemMeta(itemMeta);
|
||||||
}
|
}
|
||||||
- ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list);
|
- ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list);
|
||||||
- listCopy.set(CraftEnchantment.bukkitToMinecraft(ench), level);
|
- listCopy.set(CraftEnchantment.bukkitToMinecraftHolder(ench), level);
|
||||||
- this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
|
- this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
@ -135,7 +133,7 @@ index f44502a51c9fb393746e866e1a93ae9cedc2b656..dac1ff1387462b0125140a37d134d51c
|
|||||||
}
|
}
|
||||||
-
|
-
|
||||||
- ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list);
|
- ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list);
|
||||||
- listCopy.set(CraftEnchantment.bukkitToMinecraft(ench), -1); // Negative to remove
|
- listCopy.set(CraftEnchantment.bukkitToMinecraftHolder(ench), -1); // Negative to remove
|
||||||
- this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
|
- this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
@ -151,7 +149,7 @@ index f44502a51c9fb393746e866e1a93ae9cedc2b656..dac1ff1387462b0125140a37d134d51c
|
|||||||
|
|
||||||
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 c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d02419f4a00e8 100644
|
index 7381f0dac6dd0ec716e3b3475bbf8f5aae049e28..d04af9ea23c2fd62febce4b8d4b3fd49df542095 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;
|
||||||
@ -170,7 +168,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -241,7 +243,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -248,7 +250,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
private List<Component> 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 Map<String, String> blockData;
|
private Map<String, String> blockData;
|
||||||
@ -179,7 +177,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241
|
|||||||
private Multimap<Attribute, AttributeModifier> attributeModifiers;
|
private Multimap<Attribute, AttributeModifier> attributeModifiers;
|
||||||
private int repairCost;
|
private int repairCost;
|
||||||
private int hideFlag;
|
private int hideFlag;
|
||||||
@@ -281,7 +283,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -289,7 +291,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
this.blockData = meta.blockData;
|
this.blockData = meta.blockData;
|
||||||
|
|
||||||
if (meta.enchantments != null) {
|
if (meta.enchantments != null) {
|
||||||
@ -188,7 +186,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (meta.hasAttributeModifiers()) {
|
if (meta.hasAttributeModifiers()) {
|
||||||
@@ -418,8 +420,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -432,8 +434,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,7 +197,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241
|
|||||||
|
|
||||||
tag.entrySet().forEach((entry) -> {
|
tag.entrySet().forEach((entry) -> {
|
||||||
Holder<net.minecraft.world.item.enchantment.Enchantment> id = entry.getKey();
|
Holder<net.minecraft.world.item.enchantment.Enchantment> id = entry.getKey();
|
||||||
@@ -678,13 +680,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -697,13 +699,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return modifiers;
|
return modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,7 +213,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241
|
|||||||
for (Map.Entry<?, ?> entry : ench.entrySet()) {
|
for (Map.Entry<?, ?> entry : ench.entrySet()) {
|
||||||
Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString());
|
Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString());
|
||||||
if ((enchantment != null) && (entry.getValue() instanceof Integer)) {
|
if ((enchantment != null) && (entry.getValue() instanceof Integer)) {
|
||||||
@@ -1003,14 +1005,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1026,14 +1028,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Enchantment, Integer> getEnchants() {
|
public Map<Enchantment, Integer> getEnchants() {
|
||||||
@ -232,7 +230,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
|
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
|
||||||
@@ -1591,7 +1593,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1631,7 +1633,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) {
|
||||||
@ -241,7 +239,7 @@ index c7eed6b642c69fb08bc6e50d4890ea61666cde01..f5689a447bb990d5e2acbb35ce3d0241
|
|||||||
}
|
}
|
||||||
if (this.hasAttributeModifiers()) {
|
if (this.hasAttributeModifiers()) {
|
||||||
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
|
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
|
||||||
@@ -1918,4 +1920,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1966,4 +1968,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
|
|
||||||
return (result != null) ? result : Optional.empty();
|
return (result != null) ? result : Optional.empty();
|
||||||
}
|
}
|
@ -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 94f6b097a2c29fd00d6a670c5bb35fb4ade23d2e..efcfbcb3dc352c9015cc9121dc8d98e8deed8bfd 100644
|
index 65ad1166d3cc85bfe65170c55fd0b4300efcb9a3..686237a21eccb43ee9f0b659915c141d6ad49f28 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
|
||||||
@@ -332,7 +332,7 @@ public abstract class AbstractArrow extends Projectile {
|
@@ -349,7 +349,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 2eb2fbe57a33701770baefea5dc727684f2779ec..8ba4395670304647d62987952c6339d394140af6 100644
|
index 4f5ff6849e0ea7a4f2491e0dbede7699554239dc..eae1d6eedeed09b3f49913c2bb205b80442bbfe3 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
|
||||||
@@ -340,6 +340,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 878a8b7e1b0551d7b749cacce7ae63bc5349b5f3..1a8316cb8cfb5efe19b68eb93fef317c6774325d 100644
|
index f8b771a10b9bf123b55b8f3097bb8c6da607c413..d63d72d5cafdcdf3e8d8f5e837bf7aeb0ce18c74 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
|
||||||
@@ -3802,10 +3802,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3830,10 +3830,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 878a8b7e1b0551d7b749cacce7ae63bc5349b5f3..1a8316cb8cfb5efe19b68eb93fef317c
|
|||||||
this.level().getCraftServer().getPluginManager().callEvent(event);
|
this.level().getCraftServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
@@ -3819,6 +3820,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3847,6 +3848,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 878a8b7e1b0551d7b749cacce7ae63bc5349b5f3..1a8316cb8cfb5efe19b68eb93fef317c
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (itemstack != this.useItem) {
|
if (itemstack != this.useItem) {
|
||||||
@@ -3826,6 +3833,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3854,6 +3861,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 1a8316cb8cfb5efe19b68eb93fef317c6774325d..b59f48771aaad9429bd7078c6ecddf4f46d08cef 100644
|
index d63d72d5cafdcdf3e8d8f5e837bf7aeb0ce18c74..ac0d3cc8c8a13921576a12fd7fb444980ce5b085 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
|
||||||
@@ -833,7 +833,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -807,7 +807,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readAdditionalSaveData(CompoundTag nbt) {
|
public void readAdditionalSaveData(CompoundTag nbt) {
|
||||||
@ -20,10 +20,10 @@ index 1a8316cb8cfb5efe19b68eb93fef317c6774325d..b59f48771aaad9429bd7078c6ecddf4f
|
|||||||
+ }
|
+ }
|
||||||
+ this.internalSetAbsorptionAmount(absorptionAmount);
|
+ this.internalSetAbsorptionAmount(absorptionAmount);
|
||||||
+ // Paper end - Check for NaN
|
+ // Paper end - Check for NaN
|
||||||
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));
|
||||||
}
|
}
|
||||||
@@ -1365,6 +1371,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1341,6 +1347,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHealth(float health) {
|
public void setHealth(float health) {
|
||||||
@ -34,7 +34,7 @@ index 1a8316cb8cfb5efe19b68eb93fef317c6774325d..b59f48771aaad9429bd7078c6ecddf4f
|
|||||||
// 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();
|
||||||
@@ -3637,7 +3647,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3660,7 +3670,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 1a8316cb8cfb5efe19b68eb93fef317c6774325d..b59f48771aaad9429bd7078c6ecddf4f
|
|||||||
|
|
||||||
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 d6fafe977809a549e7076254d2dc6a4870af8530..93e537aa401bc17f2a34da4f0119026ee34e2c1f 100644
|
index 409607c68a1205094ae82e5384e8c13654e492da..b6c5636f21bfbade1dc9d048579e513f43642eb6 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
|
||||||
@@ -2324,6 +2324,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2337,6 +2337,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 66ba606ccbff3a578a090d5170f3ff866ecf99af..2fcdd61e9669904756aa33b1ff8ab7160ea5e371 100644
|
index b5c03b3495f5eb5ac6b054d4ca986a6a597c713c..ea25e9ab6c1d54e834a05951d2369d6e2e3a3fb3 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
|
||||||
@@ -169,6 +169,79 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -175,6 +175,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 66ba606ccbff3a578a090d5170f3ff866ecf99af..2fcdd61e9669904756aa33b1ff8ab716
|
|||||||
private CraftEntity bukkitEntity;
|
private CraftEntity bukkitEntity;
|
||||||
|
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
@@ -364,7 +437,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -370,7 +443,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 66ba606ccbff3a578a090d5170f3ff866ecf99af..2fcdd61e9669904756aa33b1ff8ab716
|
|||||||
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 a98c7d9bf8dbaf9df51551fe66f7927798e9670f..43b4ea96c5c4a6234e5b83d41db9b85c1fe27b8f 100644
|
index 97d5bc9bab95c21afb3b95d2a7eb7df0b64698ed..42f4e544fe7fbc342f15eacb5e38d40849e3c419 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
|
||||||
@@ -42,7 +42,7 @@ public class Squid extends WaterAnimal {
|
@@ -41,7 +41,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 53e69115a2186c0124d3d8c83f6ca0aecc68c324..001cbed05de94cadd4862c38c414b5e039bff818 100644
|
index d0788c4223891117c042aa4243e6804b4ed33aea..df60bfc7555326f079082199b940b0c4b4248cfc 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
|
||||||
@@ -620,7 +620,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -621,7 +621,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,10 +6,10 @@ 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 0b2588dc70b295026fc2050797a1d7ef9e5b8dca..c572182a0d3553a85e974c23db5b1e9873a53bc3 100644
|
index 5c82bf57575bbe8bea8d39bead51c6860ac86e37..4fd88b63ae6e6aa3265f72f4f0ae1b1895b70be9 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
|
||||||
@@ -1517,6 +1517,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1545,6 +1545,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||||
@ -18,10 +18,10 @@ index 0b2588dc70b295026fc2050797a1d7ef9e5b8dca..c572182a0d3553a85e974c23db5b1e98
|
|||||||
this.profiler.push(() -> {
|
this.profiler.push(() -> {
|
||||||
String s = String.valueOf(worldserver);
|
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 001cbed05de94cadd4862c38c414b5e039bff818..5b44a9e0b6d87e7caba54cb4e972099c1602393b 100644
|
index df60bfc7555326f079082199b940b0c4b4248cfc..35bcdbfd7f17c4e2260c199e9848c4d361b61944 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
|
||||||
@@ -226,6 +226,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -227,6 +227,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 001cbed05de94cadd4862c38c414b5e039bff818..5b44a9e0b6d87e7caba54cb4e972099c
|
|||||||
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 8ba4395670304647d62987952c6339d394140af6..33c9001970fe01bedd72f6ba4388b43ed9707fc8 100644
|
index eae1d6eedeed09b3f49913c2bb205b80442bbfe3..622ecc1aeb9140d5c0d181fa472d123c42e5c5f4 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
|
||||||
@@ -490,7 +490,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();
|
@ -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 5b44a9e0b6d87e7caba54cb4e972099c1602393b..2e4567e34369e6a9138aa064adf64b9895e21277 100644
|
index 35bcdbfd7f17c4e2260c199e9848c4d361b61944..43dbcfb5900b301950be68db48487af2a95748a3 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
|
||||||
@@ -2185,6 +2185,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2153,6 +2153,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 5b44a9e0b6d87e7caba54cb4e972099c1602393b..2e4567e34369e6a9138aa064adf64b98
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onTrackingEnd(Entity entity) {
|
public void onTrackingEnd(Entity entity) {
|
||||||
@@ -2255,6 +2256,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2223,6 +2224,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 60a1828d179c29514813143e3c8e93b08afe9849..963d86e7505e4d9c3854d35d9b59aed3369e8a57 100644
|
index 791b7d3a606fddfe21b51258e9732b14381200f5..00f6ef5ffe33d6d45b5356e215324cbe0eadfda4 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
|
||||||
@@ -272,6 +272,13 @@ public class LevelChunk extends ChunkAccess {
|
@@ -271,6 +271,13 @@ public class LevelChunk extends ChunkAccess {
|
||||||
return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks);
|
return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks);
|
||||||
}
|
}
|
||||||
|
|
@ -11,7 +11,7 @@ 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 0697a34875fb807e39f4aae16788fe2455b8138f..9748b798f55ee0cbfdce1a2b2c48700623ef17a5 100644
|
index b7d0a48f38f0d8ae586012bb4e9a9faec21103c2..7d4aa3d375bde32e0d2606346202929d481acad0 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
|
||||||
@@ -39,7 +39,7 @@ public class RegionFileStorage implements AutoCloseable {
|
@@ -39,7 +39,7 @@ public class RegionFileStorage implements AutoCloseable {
|
@ -28,10 +28,10 @@ index 1e9c68cd1868d083e6a790d56006dd4aa432010a..8a0ee9564fc36a2badf1357f7e6c47b5
|
|||||||
+ // 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 ad598e57feb2d9db1b71cb3a432df22212aab9b3..555623fa4176c9ac4534cc7c5174d45f7c321ba1 100644
|
index f9050a1d255780d5131200e8b31bd91154907af6..fc196fc89502b8006dba0f15380d866882f934ce 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
|
||||||
@@ -2476,7 +2476,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -2493,7 +2493,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -59,10 +59,10 @@ index ad598e57feb2d9db1b71cb3a432df22212aab9b3..555623fa4176c9ac4534cc7c5174d45f
|
|||||||
|
|
||||||
@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 4c59520355a21249d2a3132dbaae97fd4e17c86b..76be4e52f7e140cf1951ae8be8a468e2bb7df20e 100644
|
index 968c5588659990d1e29252413881cf6dd867b984..09b6cfd22673d338c5d16162bafeac2ae0b3074a 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
|
||||||
@@ -1853,4 +1853,13 @@ public class CraftEventFactory {
|
@@ -1859,4 +1859,13 @@ public class CraftEventFactory {
|
||||||
|
|
||||||
Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause));
|
Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause));
|
||||||
}
|
}
|
@ -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 2e4567e34369e6a9138aa064adf64b9895e21277..57c13407fd20bcdd17642b0e6078f10082aea87b 100644
|
index 43dbcfb5900b301950be68db48487af2a95748a3..2d27b92b02611d883a84a694280364d3a7ddcb09 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
|
||||||
@@ -1391,6 +1391,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1389,6 +1389,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
@ -18,10 +18,10 @@ index 9a1a961eabd4362c171da78c6be82c867f3696a4..1d0c473442b5c72245c356054440323e
|
|||||||
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.playerPrefix);
|
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.playerPrefix);
|
||||||
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, 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 c572182a0d3553a85e974c23db5b1e9873a53bc3..17c1175d8a937b085d475095e3d48f30ee89dcc0 100644
|
index 4fd88b63ae6e6aa3265f72f4f0ae1b1895b70be9..8f0a0384d12b738553a6bec02e3b9438671715a9 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
|
||||||
@@ -633,6 +633,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -640,6 +640,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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ index c572182a0d3553a85e974c23db5b1e9873a53bc3..17c1175d8a937b085d475095e3d48f30
|
|||||||
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
|
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
|
||||||
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
||||||
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 abb769cbbed17a82ee86a6c99e61a375045d9937..3fb300026e627313c65ea23b9c0a9f57a97fa310 100644
|
index a3e695c321b9164822506e787bb5c54813aad7c2..aaae646588a3a09c96a4bc481f15a44a96efbb8e 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
|
||||||
@@ -159,6 +159,7 @@ public abstract class PlayerList {
|
@@ -159,6 +159,7 @@ public abstract class PlayerList {
|
||||||
@ -54,7 +54,7 @@ index abb769cbbed17a82ee86a6c99e61a375045d9937..3fb300026e627313c65ea23b9c0a9f57
|
|||||||
|
|
||||||
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);
|
||||||
@@ -397,6 +398,13 @@ public abstract class PlayerList {
|
@@ -390,6 +391,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 abb769cbbed17a82ee86a6c99e61a375045d9937..3fb300026e627313c65ea23b9c0a9f57
|
|||||||
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,6 +527,16 @@ public abstract class PlayerList {
|
@@ -512,6 +520,16 @@ public abstract class PlayerList {
|
||||||
entityplayer.doTick(); // SPIGOT-924
|
entityplayer.doTick(); // SPIGOT-924
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ index abb769cbbed17a82ee86a6c99e61a375045d9937..3fb300026e627313c65ea23b9c0a9f57
|
|||||||
this.save(entityplayer);
|
this.save(entityplayer);
|
||||||
if (entityplayer.isPassenger()) {
|
if (entityplayer.isPassenger()) {
|
||||||
Entity entity = entityplayer.getRootVehicle();
|
Entity entity = entityplayer.getRootVehicle();
|
||||||
@@ -1160,6 +1178,13 @@ public abstract class PlayerList {
|
@@ -1129,6 +1147,13 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
@ -6,11 +6,11 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
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
|
index 64e3d3626a30d4dfe15ed1f7cb3f0480ece5edce..7ae4279768b70a4fdc8f4438898871a17c8fe402 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
+++ b/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
|
@@ -121,9 +121,43 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||||
this.connection.disconnect(ichatmutablecomponent);
|
this.connection.disconnect((Component) ichatmutablecomponent);
|
||||||
} else {
|
} else {
|
||||||
this.connection.setupInboundProtocol(LoginProtocols.SERVERBOUND, new ServerLoginPacketListenerImpl(this.server, this.connection, transfer));
|
this.connection.setupInboundProtocol(LoginProtocols.SERVERBOUND, new ServerLoginPacketListenerImpl(this.server, this.connection, transfer));
|
||||||
+ // Paper start - PlayerHandshakeEvent
|
+ // Paper start - PlayerHandshakeEvent
|
@ -9,10 +9,10 @@ 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 946b9b9283ca345d711d40cc2cd04039fec5c77b..502e5386ec4306de93148266f60810ec52ae5ab2 100644
|
index 36a0a8b5f85edad4dcfcdc75c4db2aa69261eae6..eb27ef574445e1311b763d84aa1b37128baa75f7 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
|
||||||
@@ -109,6 +109,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
@@ -110,6 +110,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||||
public final WorldOptions worldOptions;
|
public final WorldOptions worldOptions;
|
||||||
public boolean acceptsTransfers;
|
public boolean acceptsTransfers;
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ index 946b9b9283ca345d711d40cc2cd04039fec5c77b..502e5386ec4306de93148266f60810ec
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public DedicatedServerProperties(Properties properties, OptionSet optionset) {
|
public DedicatedServerProperties(Properties properties, OptionSet optionset) {
|
||||||
super(properties, optionset);
|
super(properties, optionset);
|
||||||
@@ -169,6 +171,10 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
@@ -170,6 +172,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 b59f48771aaad9429bd7078c6ecddf4f46d08cef..51f6b7be6b8e65dbd8700ba2d7a40760b229f512 100644
|
index ac0d3cc8c8a13921576a12fd7fb444980ce5b085..258e99365fd3c51c60b8adba46645f04111d96c2 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
|
||||||
@@ -1344,10 +1344,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1320,10 +1320,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,7 +28,7 @@ index b59f48771aaad9429bd7078c6ecddf4f46d08cef..51f6b7be6b8e65dbd8700ba2d7a40760
|
|||||||
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 b03ed15e55bab7b2cd68be9f04b286436cf878d5..b89860d451d92ddda64b7e4144542b7fc5fd86f0 100644
|
index 8fad44228049eee477da81708bdf16658cb9ed7a..bd3f78e6453cfe18aa3da38176b04d734d83bb4b 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
|
||||||
@@ -88,7 +88,7 @@ public class FoodData {
|
@@ -88,7 +88,7 @@ public class FoodData {
|
@ -5,7 +5,7 @@ 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 4d711c0c381ffdda00cbd97fc446a68e25a04c44..83904d2d5e0bd27257a775edab8c55b4a0bb804a 100644
|
index cdf3cc2a08c52d0e5e5efd5c798f6dc156c0df55..ae6a952e49d20b7c6ad753169608794abe720ee0 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 {
|
@ -6,18 +6,18 @@ 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 17c1175d8a937b085d475095e3d48f30ee89dcc0..be0bb759dafa149f7c4bc560dcbf51dfd45b4dd8 100644
|
index 8f0a0384d12b738553a6bec02e3b9438671715a9..fa55700e61d10cc071e55dfe43b48aee2113cd44 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
|
||||||
@@ -191,6 +191,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
@@ -197,6 +197,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, ChunkIOErrorReporter, CommandSource, AutoCloseable {
|
||||||
|
|
||||||
+ private static MinecraftServer SERVER; // Paper
|
+ private static MinecraftServer SERVER; // Paper
|
||||||
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";
|
||||||
@@ -324,6 +325,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -331,6 +332,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 17c1175d8a937b085d475095e3d48f30ee89dcc0..be0bb759dafa149f7c4bc560dcbf51df
|
|||||||
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
||||||
this.profiler = this.metricsRecorder.getProfiler();
|
this.profiler = this.metricsRecorder.getProfiler();
|
||||||
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
||||||
@@ -2526,9 +2528,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2554,9 +2556,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -515,7 +515,7 @@ index 0000000000000000000000000000000000000000..fea92d280c6817cee1f18379d5ed51a3
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/world/RandomizableContainer.java b/src/main/java/net/minecraft/world/RandomizableContainer.java
|
diff --git a/src/main/java/net/minecraft/world/RandomizableContainer.java b/src/main/java/net/minecraft/world/RandomizableContainer.java
|
||||||
index 155902bc2b99ba36003bceb37ba34958952900d3..68fadc351464dde459eb4cc86660cf9add40d04e 100644
|
index 9715f1b63aeea39bde9258275f51e3e8508ca6e4..597cd5dbb4bb415a9b4d874c1c5dd621be1d6fc8 100644
|
||||||
--- a/src/main/java/net/minecraft/world/RandomizableContainer.java
|
--- a/src/main/java/net/minecraft/world/RandomizableContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/RandomizableContainer.java
|
+++ b/src/main/java/net/minecraft/world/RandomizableContainer.java
|
||||||
@@ -28,7 +28,7 @@ public interface RandomizableContainer extends Container {
|
@@ -28,7 +28,7 @@ public interface RandomizableContainer extends Container {
|
||||||
@ -530,7 +530,7 @@ index 155902bc2b99ba36003bceb37ba34958952900d3..68fadc351464dde459eb4cc86660cf9a
|
|||||||
@@ -51,13 +51,14 @@ public interface RandomizableContainer extends Container {
|
@@ -51,13 +51,14 @@ public interface RandomizableContainer extends Container {
|
||||||
default boolean tryLoadLootTable(CompoundTag nbt) {
|
default boolean tryLoadLootTable(CompoundTag nbt) {
|
||||||
if (nbt.contains("LootTable", 8)) {
|
if (nbt.contains("LootTable", 8)) {
|
||||||
this.setLootTable(ResourceKey.create(Registries.LOOT_TABLE, new ResourceLocation(nbt.getString("LootTable"))));
|
this.setLootTable(ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.parse(nbt.getString("LootTable"))));
|
||||||
+ if (this.lootableData() != null && this.getLootTable() != null) this.lootableData().loadNbt(nbt); // Paper - LootTable API
|
+ if (this.lootableData() != null && this.getLootTable() != null) this.lootableData().loadNbt(nbt); // Paper - LootTable API
|
||||||
if (nbt.contains("LootTableSeed", 4)) {
|
if (nbt.contains("LootTableSeed", 4)) {
|
||||||
this.setLootTableSeed(nbt.getLong("LootTableSeed"));
|
this.setLootTableSeed(nbt.getLong("LootTableSeed"));
|
||||||
@ -615,10 +615,10 @@ index 67840327e934b631a85cf2d64911f5cfab4402b1..9549eee0d92f322bd5232abd7e695213
|
|||||||
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/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 025e57993b85402c48db29d65ea3ceaf277ff27a..e0aec3b3e04d603dc208029554f981c6b9e6b43e 100644
|
index 42f8e2d961f83c3e9ce384158b9dfc4014eb0a5f..4cdf3b54187ebcb1f5ddfa6114386127a2846f01 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
|
||||||
@@ -209,7 +209,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
@@ -217,7 +217,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory, Player player) {
|
public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory, Player player) {
|
||||||
@ -627,7 +627,7 @@ index 025e57993b85402c48db29d65ea3ceaf277ff27a..e0aec3b3e04d603dc208029554f981c6
|
|||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
this.unpackLootTable(playerInventory.player);
|
this.unpackLootTable(playerInventory.player);
|
||||||
@@ -257,6 +257,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
@@ -265,6 +265,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||||
this.level().gameEvent((Holder) GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player));
|
this.level().gameEvent((Holder) GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -643,7 +643,7 @@ index 025e57993b85402c48db29d65ea3ceaf277ff27a..e0aec3b3e04d603dc208029554f981c6
|
|||||||
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 dbde2402fd46b0d06e8efeb90be6fb98d7ae7798..d976a6e3a79a01392a5033b05864d82782a30916 100644
|
index 3ee99193de5deb6a38d6ded561fe8f2fbf711327..ccc7367ab2740bea0f2b907223a0920b11665092 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
|
||||||
@@ -62,22 +62,26 @@ public interface ContainerEntity extends Container, MenuProvider {
|
@@ -62,22 +62,26 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||||
@ -663,7 +663,7 @@ index dbde2402fd46b0d06e8efeb90be6fb98d7ae7798..d976a6e3a79a01392a5033b05864d827
|
|||||||
default void readChestVehicleSaveData(CompoundTag nbt, HolderLookup.Provider registriesLookup) {
|
default void readChestVehicleSaveData(CompoundTag nbt, HolderLookup.Provider registriesLookup) {
|
||||||
this.clearItemStacks();
|
this.clearItemStacks();
|
||||||
if (nbt.contains("LootTable", 8)) {
|
if (nbt.contains("LootTable", 8)) {
|
||||||
this.setLootTable(ResourceKey.create(Registries.LOOT_TABLE, new ResourceLocation(nbt.getString("LootTable"))));
|
this.setLootTable(ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.parse(nbt.getString("LootTable"))));
|
||||||
+ // Paper start - LootTable API
|
+ // Paper start - LootTable API
|
||||||
+ if (this.getLootTable() != null) {
|
+ if (this.getLootTable() != null) {
|
||||||
+ this.lootableData().loadNbt(nbt);
|
+ this.lootableData().loadNbt(nbt);
|
@ -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 be0bb759dafa149f7c4bc560dcbf51dfd45b4dd8..fca7340f5b0dbbf072a752e7e7b589dbaeb17d50 100644
|
index fa55700e61d10cc071e55dfe43b48aee2113cd44..56d51073eb0cd902fa2c1e790201f74d120b149f 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
|
||||||
@@ -992,7 +992,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -999,7 +999,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 be0bb759dafa149f7c4bc560dcbf51dfd45b4dd8..fca7340f5b0dbbf072a752e7e7b589db
|
|||||||
// 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 1b38916d8e9241bd45523e692c04bf69430b64f9..14e5378ee40aeca85ce9cad87eb4574faef83448 100644
|
index 48107f8eb50483430053b990496862d71c9f8a3e..c1f41dcf49c75c3d69485c0e1ec821205438ed1e 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
|
||||||
@@ -266,7 +266,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -270,7 +270,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.convertOldUsers()) {
|
if (this.convertOldUsers()) {
|
@ -5,10 +5,10 @@ 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 f127cac376cf4d0e585d12cd5976a3aee567403a..4772e7978858263702312669f400d3da9c486730 100644
|
index 15432b512fc0d0d38bf28499e2afa5e48fec7aaa..47f2a480f6a4b15e55cedbfa8a58459d33516a97 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 {
|
@@ -128,6 +128,27 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,9 +36,9 @@ index f127cac376cf4d0e585d12cd5976a3aee567403a..4772e7978858263702312669f400d3da
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void explode() {
|
private void explode() {
|
||||||
@@ -165,4 +186,11 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -202,4 +223,11 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
public BlockState getBlockState() {
|
|
||||||
return (BlockState) this.entityData.get(PrimedTnt.DATA_BLOCK_STATE_ID);
|
return entity;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Paper start - Option to prevent TNT from moving in water
|
+ // Paper start - Option to prevent TNT from moving in water
|
@ -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 33c9001970fe01bedd72f6ba4388b43ed9707fc8..95fc5fc293eb7d77868fa0a37beb792ee0620fcd 100644
|
index 622ecc1aeb9140d5c0d181fa472d123c42e5c5f4..4abb586f964e342425c7cf0384ab8bf8cdedaea3 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
|
||||||
@@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -169,6 +169,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
|
@ -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 ce4671b24c7471efb3f6a1ae87d96c67881642f6..04a12fc412693c689c2048e4d568225b10ccf17b 100644
|
index 9dc72b01092783c436bc1fa8ce29ff7cdaa39b19..9515a6f72b54bc8926f10182143b2aa9b684a341 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
|
||||||
@@ -168,6 +168,14 @@ public class Main {
|
@@ -168,6 +168,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 57c13407fd20bcdd17642b0e6078f10082aea87b..0a7dec5ff89c94503908ad011fe7da8dd8256685 100644
|
index 2d27b92b02611d883a84a694280364d3a7ddcb09..7c835a9328b1ba8426663ed3e9575fcd35a0f748 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
|
||||||
@@ -1324,7 +1324,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1322,7 +1322,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 57c13407fd20bcdd17642b0e6078f10082aea87b..0a7dec5ff89c94503908ad011fe7da8d
|
|||||||
|
|
||||||
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 53ff70fff0d12a151d13481a3226f72af57cce3e..993ccde9e6ee769ce51cdfa4ff06cfe1bd27bbb0 100644
|
index 7432becf1c9a378a62e116153aebad4960c0c7bd..dba973ba5088d253aa67f5577663cccda7f4edd1 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
|
||||||
@@ -679,11 +679,12 @@ public class EnderDragon extends Mob implements Enemy {
|
@@ -696,11 +696,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,7 +43,7 @@ index 53ff70fff0d12a151d13481a3226f72af57cce3e..993ccde9e6ee769ce51cdfa4ff06cfe1
|
|||||||
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 ff04f392163c2f7b1015ce379706d19a5f655f5c..b0ac85dc3c67d2e4d70dfb09d4e8fc349aba14d2 100644
|
index d288bc209a0b0fdf2d73197a8e7d179e8e8c31e7..3ee24382ef3614ff0c5d5cdc614a41286ba4af5e 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
|
||||||
@@ -278,11 +278,12 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
@@ -278,11 +278,12 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||||
@ -62,10 +62,10 @@ index ff04f392163c2f7b1015ce379706d19a5f655f5c..b0ac85dc3c67d2e4d70dfb09d4e8fc34
|
|||||||
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 6df874ac5091896be5edddd362c11958c0ad815b..37cfb9694dc06f693b7b54f20bc31dfd9f95c76c 100644
|
index 0224a0e901f9430ef06c30432a7988149a67037d..391579b515c5a07066f82b33c4f9ef8ee1d05530 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
|
||||||
@@ -65,11 +65,12 @@ public class EnderEyeItem extends Item {
|
@@ -67,11 +67,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,12 +81,12 @@ index 6df874ac5091896be5edddd362c11958c0ad815b..37cfb9694dc06f693b7b54f20bc31dfd
|
|||||||
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 95fc5fc293eb7d77868fa0a37beb792ee0620fcd..edcab2dd4070703101ed9bef86f320093be6c1cb 100644
|
index 4abb586f964e342425c7cf0384ab8bf8cdedaea3..008be3aad044d20be14da3a9e96933d265104587 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
|
||||||
@@ -1262,4 +1262,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -1277,4 +1277,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
return this.id;
|
||||||
private ExplosionInteraction() {}
|
}
|
||||||
}
|
}
|
||||||
+ // Paper start - respect global sound events gamerule
|
+ // Paper start - respect global sound events gamerule
|
||||||
+ public List<net.minecraft.server.level.ServerPlayer> getPlayersForGlobalSoundGamerule() {
|
+ public List<net.minecraft.server.level.ServerPlayer> getPlayersForGlobalSoundGamerule() {
|
@ -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 14e5378ee40aeca85ce9cad87eb4574faef83448..2d877bf61cf0a7829278e6af096f5401edfe1981 100644
|
index c1f41dcf49c75c3d69485c0e1ec821205438ed1e..c466ec011d059b9960606ef2ee51ea3a3a65f8d0 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
|
||||||
@@ -589,7 +589,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -593,7 +593,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
public boolean enforceSecureProfile() {
|
public boolean enforceSecureProfile() {
|
||||||
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
||||||
|
|
||||||
@ -60,10 +60,10 @@ index a0b0614ac7d2009db5c6c10ab4a5f09dd447c635..653856d0b8dcf2baf4cc77a276f17c8c
|
|||||||
} 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 3683d2e692a092afba12b12e6e70f6b104aa89f0..3c4a90d1936fe2331564dfb4eda8459499230c0c 100644
|
index 502e7f4e168b7f9c6a0f68695f36b8d44cce218e..451f2861d601c551845a0676bddcfb60e0a84cf3 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
|
||||||
@@ -1875,7 +1875,7 @@ public final class CraftServer implements Server {
|
@@ -1878,7 +1878,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 555623fa4176c9ac4534cc7c5174d45f7c321ba1..c25c9e2a20243083b7ca928e1d4d5c3a562b7b11 100644
|
index fc196fc89502b8006dba0f15380d866882f934ce..c90717ede7331188197d67b72192addb8dd7dc0b 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
|
||||||
@@ -1522,13 +1522,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -1534,13 +1534,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,14 +5,14 @@ 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 c25c9e2a20243083b7ca928e1d4d5c3a562b7b11..b4b775687ec47c0deeced7fbf1316e0766797d0d 100644
|
index c90717ede7331188197d67b72192addb8dd7dc0b..be42d98848e79eca79fed0ee42a1b25b50347226 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
|
||||||
@@ -346,7 +346,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -346,7 +346,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 > this.getMaximumFlyingTicks(this.player)) {
|
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) 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;
|
||||||
}
|
}
|
||||||
@ -21,7 +21,7 @@ index c25c9e2a20243083b7ca928e1d4d5c3a562b7b11..b4b775687ec47c0deeced7fbf1316e07
|
|||||||
if (this.clientVehicleIsFloating && this.lastVehicle.getControllingPassenger() == this.player) {
|
if (this.clientVehicleIsFloating && this.lastVehicle.getControllingPassenger() == this.player) {
|
||||||
if (++this.aboveGroundVehicleTickCount > this.getMaximumFlyingTicks(this.lastVehicle)) {
|
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) 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
|
||||||
return;
|
return;
|
||||||
}
|
}
|
@ -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 7d1386f2f4d4b5dcf63b6b4e678568b6744a99b5..0da329781f0afd4ec4a731889b892afe7e399d21 100644
|
index 63c10be6eacd7108b8b4795d76bf624e0614440a..243eb1e54293c763a06febff551c051398d43535 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
|
||||||
@@ -844,10 +844,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
@@ -846,10 +846,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) {
|
||||||
@ -28,10 +28,10 @@ index 7d1386f2f4d4b5dcf63b6b4e678568b6744a99b5..0da329781f0afd4ec4a731889b892afe
|
|||||||
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) 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 76be4e52f7e140cf1951ae8be8a468e2bb7df20e..df530fc847b9a302c8981caa32401a8eb3e927b3 100644
|
index 09b6cfd22673d338c5d16162bafeac2ae0b3074a..72eb4ddf05e43dd2da6bfdc6987a9218fcf1171a 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
|
||||||
@@ -1195,6 +1195,14 @@ public class CraftEventFactory {
|
@@ -1196,6 +1196,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 37dfd08621d402a339f36bb70f1b39de010e8669..cc00bf81de902cfc587bcf6f18e861fd4339c91e 100644
|
index c3a16691e8a843c02e0aea6469822cd8869ad593..01ac7bb0ef8ab13e7c4b5b56b768b7c0a642b300 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
|
||||||
@@ -335,7 +335,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -340,7 +340,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
this.dropItem = nbt.getBoolean("DropItem");
|
this.dropItem = nbt.getBoolean("DropItem");
|
||||||
}
|
}
|
||||||
|
|
@ -5,10 +5,10 @@ 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 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6b885a476 100644
|
index 851e4bdf1739736fd193786a6541ffb341525dcb..6b490eb5b14cb2d3174aff79d1144c87665c7d38 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
|
||||||
@@ -69,6 +69,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -71,6 +71,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
// CraftBukkit end
|
// 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();
|
||||||
@ -16,7 +16,7 @@ index 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6
|
|||||||
private static final int MAX_TICKS_BEFORE_LOGIN = 600;
|
private static final int MAX_TICKS_BEFORE_LOGIN = 600;
|
||||||
private final byte[] challenge;
|
private final byte[] challenge;
|
||||||
final MinecraftServer server;
|
final MinecraftServer server;
|
||||||
@@ -167,7 +168,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -169,7 +170,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge, true));
|
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge, true));
|
||||||
} else {
|
} else {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -26,7 +26,7 @@ index 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -182,10 +184,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -184,10 +186,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 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,7 +264,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -266,7 +266,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||||
throw new IllegalStateException("Protocol error", cryptographyexception);
|
throw new IllegalStateException("Protocol error", cryptographyexception);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ index 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6
|
|||||||
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");
|
||||||
|
|
||||||
@@ -312,10 +313,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -314,10 +315,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 3c4a90d1936fe2331564dfb4eda8459499230c0c..52dc0049d596287a089bd5397cdfd2c99c711f2a 100644
|
index 451f2861d601c551845a0676bddcfb60e0a84cf3..a387fa6ce162531497788e0bbcec3c5ffdfa4c68 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
|
||||||
@@ -2803,5 +2803,24 @@ public final class CraftServer implements Server {
|
@@ -2811,5 +2811,24 @@ public final class CraftServer implements Server {
|
||||||
DefaultPermissions.registerCorePermissions();
|
DefaultPermissions.registerCorePermissions();
|
||||||
CraftDefaultPermissions.registerCorePermissions();
|
CraftDefaultPermissions.registerCorePermissions();
|
||||||
}
|
}
|
@ -5,11 +5,11 @@ 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 9f392edc63ebcf48df1fdd5bbc4521c67ded4b24..b919ae8602f54f6ec8c9c743f3e852cd4c00e97f 100644
|
index 56402312e44d12c859e2c4b39902d31b7cfd1573..25a45e680f9fdea90f43d59de87a3a500f4ee8c0 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
|
||||||
@@ -261,7 +261,7 @@ public class ExperienceOrb extends Entity {
|
@@ -264,7 +264,7 @@ public class ExperienceOrb extends Entity {
|
||||||
int i = this.repairPlayerItems(player, this.value);
|
int i = this.repairPlayerItems(entityplayer, this.value);
|
||||||
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
- player.giveExperiencePoints(CraftEventFactory.callPlayerExpChangeEvent(player, i).getAmount()); // CraftBukkit - this.value -> event.getAmount()
|
- player.giveExperiencePoints(CraftEventFactory.callPlayerExpChangeEvent(player, i).getAmount()); // CraftBukkit - this.value -> event.getAmount()
|
||||||
@ -18,10 +18,10 @@ index 9f392edc63ebcf48df1fdd5bbc4521c67ded4b24..b919ae8602f54f6ec8c9c743f3e852cd
|
|||||||
|
|
||||||
--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 df530fc847b9a302c8981caa32401a8eb3e927b3..022c1b2e895af65fdf91710d836a4feba1edd0a5 100644
|
index 72eb4ddf05e43dd2da6bfdc6987a9218fcf1171a..81fb6a8499f57ed1931bcd562ead20e27bdfa99b 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
|
||||||
@@ -1148,6 +1148,17 @@ public class CraftEventFactory {
|
@@ -1149,6 +1149,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 022c1b2e895af65fdf91710d836a4feba1edd0a5..a49abc180f76cb7aeb6eda86998acd00e9d3fdee 100644
|
index 81fb6a8499f57ed1931bcd562ead20e27bdfa99b..000a95dfd5c83b84fcd973a388a705d9470a4fe0 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
|
||||||
@@ -1292,6 +1292,17 @@ public class CraftEventFactory {
|
@@ -1293,6 +1293,17 @@ public class CraftEventFactory {
|
||||||
return CraftItemStack.asNMSCopy(bitem);
|
return CraftItemStack.asNMSCopy(bitem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ index 022c1b2e895af65fdf91710d836a4feba1edd0a5..a49abc180f76cb7aeb6eda86998acd00
|
|||||||
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);
|
||||||
@@ -1316,8 +1327,15 @@ public class CraftEventFactory {
|
@@ -1317,8 +1328,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();
|
||||||
}
|
}
|
@ -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 edcab2dd4070703101ed9bef86f320093be6c1cb..004dd17181a49df5c2255a9eeca03f5a354920aa 100644
|
index 008be3aad044d20be14da3a9e96933d265104587..03b0720c6ebf1a876d56d18a941e0a06ed26dbf0 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
|
||||||
@@ -341,6 +341,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,11 +11,11 @@ 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 c34873ec974eeffbc4f66dab4584c696cbe10967..580eb275942570da9e68287ca75da886ba1248c0 100644
|
index a3ba3a09378e3bd0517464130ad2c702b0b0165d..3442e33a1146318228c4727a2a5afde685f69bf7 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 {
|
@@ -46,6 +46,18 @@ public class WorldBorder {
|
||||||
return (double) (pos.getX() + 1) > this.getMinX() && (double) pos.getX() < this.getMaxX() && (double) (pos.getZ() + 1) > this.getMinZ() && (double) pos.getZ() < this.getMaxZ();
|
return this.isWithinBounds((double) chunkPos.getMinBlockX(), (double) chunkPos.getMinBlockZ()) && this.isWithinBounds((double) chunkPos.getMaxBlockX(), (double) chunkPos.getMaxBlockZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - Bound treasure maps to world border
|
+ // Paper start - Bound treasure maps to world border
|
||||||
@ -30,14 +30,14 @@ index c34873ec974eeffbc4f66dab4584c696cbe10967..580eb275942570da9e68287ca75da886
|
|||||||
+ }
|
+ }
|
||||||
+ // Paper end - Bound treasure maps to world border
|
+ // Paper end - Bound treasure maps to world border
|
||||||
+
|
+
|
||||||
public boolean isWithinBounds(ChunkPos pos) {
|
public boolean isWithinBounds(AABB box) {
|
||||||
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
|
return this.isWithinBounds(box.minX, box.minZ, box.maxX - 9.999999747378752E-6D, box.maxZ - 9.999999747378752E-6D);
|
||||||
}
|
}
|
||||||
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 28bc3447ff5ddc066a9a743d5bfa7ca69598cd51..7cdb59cd2f2ffe1195d21519ef97dae0e430285b 100644
|
index a53fa9bebdd46939a710e46466ca9a350ecefb27..0a779632c9d11496fcfc147870fba2699d9cc274 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
|
||||||
@@ -223,6 +223,7 @@ public abstract class ChunkGenerator {
|
@@ -222,6 +222,7 @@ public abstract class ChunkGenerator {
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ChunkPos chunkcoordintpair = (ChunkPos) iterator.next();
|
ChunkPos chunkcoordintpair = (ChunkPos) iterator.next();
|
Loading…
Reference in New Issue
Block a user