Compare commits
18 commits
master
...
ver/1.16.5
Author | SHA1 | Date | |
---|---|---|---|
|
fa1a7c180c | ||
|
a4e665f842 | ||
|
a2697ba5b1 | ||
|
cc25d64401 | ||
|
42e2f67b29 | ||
|
7f332fab84 | ||
|
114fec1070 | ||
|
9a76761ded | ||
|
22fb7c89d6 | ||
|
92cea84823 | ||
|
fadeabe9e3 | ||
|
0a2be0cbac | ||
|
4615f58a70 | ||
|
cfbab5ca9f | ||
|
4e01b5a9c7 | ||
|
06b0b573d3 | ||
|
903fa9a33f | ||
|
2db85c553f |
63 changed files with 798 additions and 167 deletions
|
@ -0,0 +1,46 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Fri, 9 Jul 2021 17:44:33 -0700
|
||||
Subject: [PATCH] Add PlayerSignCommandPreprocessEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/event/player/PlayerSignCommandPreprocessEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerSignCommandPreprocessEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a51a2288bf812e7d8845a6ec70274d625ff793b6
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/event/player/PlayerSignCommandPreprocessEvent.java
|
||||
@@ -0,0 +1,34 @@
|
||||
+package io.papermc.paper.event.player;
|
||||
+
|
||||
+import org.bukkit.block.Sign;
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+import java.util.Set;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a {@link Player} clicks a sign that causes a command to run.
|
||||
+ * <p>
|
||||
+ * This command is run with elevated permissions which allows players to access commands on signs they wouldn't
|
||||
+ * normally be able to run.
|
||||
+ */
|
||||
+public class PlayerSignCommandPreprocessEvent extends PlayerCommandPreprocessEvent {
|
||||
+
|
||||
+ private final Sign sign;
|
||||
+
|
||||
+ public PlayerSignCommandPreprocessEvent(@NotNull Player player, @NotNull String message, @NotNull Set<Player> recipients, @NotNull Sign sign) {
|
||||
+ super(player, message, recipients);
|
||||
+ this.sign = sign;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the sign that the command originated from.
|
||||
+ *
|
||||
+ * @return the sign
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Sign getSign() {
|
||||
+ return sign;
|
||||
+ }
|
||||
+}
|
71
Spigot-API-Patches/0318-Adds-PlayerArmSwingEvent.patch
Normal file
71
Spigot-API-Patches/0318-Adds-PlayerArmSwingEvent.patch
Normal file
|
@ -0,0 +1,71 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Fri, 12 Mar 2021 19:20:03 -0800
|
||||
Subject: [PATCH] Adds PlayerArmSwingEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/event/player/PlayerArmSwingEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerArmSwingEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..1a4550a73e89f9cf92d2831d21bcfb46f92fd189
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/event/player/PlayerArmSwingEvent.java
|
||||
@@ -0,0 +1,27 @@
|
||||
+package io.papermc.paper.event.player;
|
||||
+
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
+import org.bukkit.event.player.PlayerAnimationType;
|
||||
+import org.bukkit.inventory.EquipmentSlot;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+public class PlayerArmSwingEvent extends PlayerAnimationEvent {
|
||||
+
|
||||
+ private final EquipmentSlot equipmentSlot;
|
||||
+
|
||||
+ public PlayerArmSwingEvent(@NotNull Player player, @NotNull EquipmentSlot equipmentSlot) {
|
||||
+ super(player, PlayerAnimationType.ARM_SWING);
|
||||
+ this.equipmentSlot = equipmentSlot;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the hand of the arm swing.
|
||||
+ *
|
||||
+ * @return the hand
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public EquipmentSlot getHand() {
|
||||
+ return this.equipmentSlot;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
|
||||
index 6cd236cd1fa10ec37e6e0228c7bbd4415b39399d..4d18b0f2984b301bb2d909c9c362de4cbd4366fe 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
|
||||
@@ -7,6 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a player animation event
|
||||
+ * <br>Use {@link io.papermc.paper.event.player.PlayerArmSwingEvent} for determining which arm was swung.
|
||||
*/
|
||||
public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@@ -18,12 +19,19 @@ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
|
||||
*
|
||||
* @param player The player instance
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public PlayerAnimationEvent(@NotNull final Player player) {
|
||||
super(player);
|
||||
|
||||
// Only supported animation type for now:
|
||||
animationType = PlayerAnimationType.ARM_SWING;
|
||||
}
|
||||
+ // Paper start
|
||||
+ public PlayerAnimationEvent(@NotNull final Player player, @NotNull PlayerAnimationType animationType) {
|
||||
+ super(player);
|
||||
+ this.animationType = animationType;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
/**
|
||||
* Get the type of this animation event
|
|
@ -1828,7 +1828,7 @@ index 0c1e12b0b43f949d4ace600b2ccdffe52faab1e6..2ad09749f3005c3eff143d83580e2591
|
|||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 3b48799d084f14722f815cb35cbd48b618380fca..cf6d350e6afc46bb58678192fe0b24b7d923412e 100644
|
||||
index 05aedca561919a12ced1925c5cc9af585bb04523..ce9f10f890a5866ab6208c7253b15b09fe323a81 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -19,6 +19,12 @@ public class Main {
|
||||
|
@ -2126,7 +2126,7 @@ index 816f2cbebe849a9d9533f985298bcd5d36f660eb..24e856473a0050c0b097c17977635037
|
|||
player.activeContainer.addSlotListener(player);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f652e0b42d 100644
|
||||
index b51a874e4665f977a154792e6216e03e04525f39..eb666f85ea74172e7beee7911e0ed383cd73548f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -240,14 +240,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -2309,7 +2309,7 @@ index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f6
|
|||
@Override
|
||||
public int getPing() {
|
||||
return getHandle().ping;
|
||||
@@ -1716,6 +1790,138 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1716,6 +1790,139 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
getInventory().setItemInMainHand(hand);
|
||||
}
|
||||
|
||||
|
@ -2327,6 +2327,7 @@ index b51a874e4665f977a154792e6216e03e04525f39..6ab14bccb1fcd108931bf7ec331e60f6
|
|||
+
|
||||
+ @Override
|
||||
+ public void sendMessage(final net.kyori.adventure.identity.Identity identity, final net.kyori.adventure.text.Component message, final net.kyori.adventure.audience.MessageType type) {
|
||||
+ if (this.getHandle().playerConnection == null) return;
|
||||
+ final PacketPlayOutChat packet = new PacketPlayOutChat(null, type == net.kyori.adventure.audience.MessageType.CHAT ? net.minecraft.network.chat.ChatMessageType.CHAT : net.minecraft.network.chat.ChatMessageType.SYSTEM, identity.uuid());
|
||||
+ packet.adventure$message = message;
|
||||
+ this.getHandle().playerConnection.sendPacket(packet);
|
||||
|
|
|
@ -33,31 +33,35 @@ index cf38d517821659e25e786a805e229ef2d626d75f..26d461196b4a998b445f8c6e67fd7ec0
|
|||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cae9da158f54438d2a397665c7ce964f6f755469..f6f0d551e22ff085935c1543bf84392de0368214 100644
|
||||
index cae9da158f54438d2a397665c7ce964f6f755469..63772205358715ff77be64da418aeb31ff0c3cef 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -247,6 +247,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -247,6 +247,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
|
||||
public boolean forceExplosionKnockback; // SPIGOT-949
|
||||
public boolean persistentInvisibility = false;
|
||||
+ public org.bukkit.Location origin; // Paper
|
||||
+ private @Nullable UUID originWorldId; // Paper
|
||||
// Spigot start
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -1625,6 +1626,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1625,6 +1627,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.bukkitEntity.storeBukkitValues(nbttagcompound);
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ // Paper start - Save the entity's origin location
|
||||
+ if (this.origin != null) {
|
||||
+ nbttagcompound.setUUID("Paper.OriginWorld", origin.getWorld().getUID());
|
||||
+ if (this.originWorldId != null) {
|
||||
+ // Technically it is legal to no longer know the origin world... so that's fun.
|
||||
+ nbttagcompound.setUUID("Paper.OriginWorld", this.originWorldId);
|
||||
+ }
|
||||
+ nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
+ }
|
||||
+ // Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||
@@ -1747,6 +1754,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1747,6 +1758,18 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -68,6 +72,7 @@ index cae9da158f54438d2a397665c7ce964f6f755469..f6f0d551e22ff085935c1543bf84392d
|
|||
+ if (nbttagcompound.hasKey("Paper.OriginWorld")) {
|
||||
+ originWorld = Bukkit.getWorld(nbttagcompound.getUUID("Paper.OriginWorld"));
|
||||
+ }
|
||||
+ this.originWorldId = originWorld == null ? null : originWorld.getUID();
|
||||
+ origin = new org.bukkit.Location(originWorld, originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
@ -75,7 +80,7 @@ index cae9da158f54438d2a397665c7ce964f6f755469..f6f0d551e22ff085935c1543bf84392d
|
|||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -1808,6 +1826,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1808,6 +1831,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
||||
protected abstract void saveData(NBTTagCompound nbttagcompound);
|
||||
|
||||
|
|
|
@ -29,10 +29,10 @@ index d16ae924bcbe31c964f7fb448757c748e5c4418c..4bba6977a0287837b8927718c040ac61
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index dce47ec1fc186d12ffa30bfd3d71870aecb95d40..cf92de7c138ef9cbbc1263bee29b9d0017b45827 100644
|
||||
index 63772205358715ff77be64da418aeb31ff0c3cef..72c7602c0a97c8fb2699c556a5ed758aebfb0957 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -500,9 +500,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -501,9 +501,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.fallDistance *= 0.5F;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ index dce47ec1fc186d12ffa30bfd3d71870aecb95d40..cf92de7c138ef9cbbc1263bee29b9d00
|
|||
|
||||
if (!this.world.isClientSide) {
|
||||
this.setFlag(0, this.fireTicks > 0);
|
||||
@@ -595,6 +602,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -596,6 +603,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.setFireTicks(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ This is a duplicate API from spigot, so use our duplicate subclass and
|
|||
improve setPosition to use raw
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 15418868c2b92498139e66d913ee1c35b3abf0cf..cfd0af520dd3dcf364a3ffd03a74e3b9ee6045af 100644
|
||||
index 6ebd4ec781aa215c2b941261250c15c87c223cab..46c516b9ff089a3c885d635244942fd5a6ecf132 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -213,7 +213,7 @@ public abstract class PlayerList {
|
||||
|
@ -34,10 +34,10 @@ index 15418868c2b92498139e66d913ee1c35b3abf0cf..cfd0af520dd3dcf364a3ffd03a74e3b9
|
|||
|
||||
// CraftBukkit - Moved message to after join
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cf92de7c138ef9cbbc1263bee29b9d0017b45827..10cbf66f06b31c9a4cae2359b3fbb9988abb9278 100644
|
||||
index 72c7602c0a97c8fb2699c556a5ed758aebfb0957..8c8f1f0f368d41c746c4ccb02dc95482f3336df3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -398,7 +398,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -399,7 +399,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return d1 * d1 + d2 * d2 + d3 * d3 < d0 * d0;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@ index 416a6760883cb40367535c7c5acd779742bb8af5..670efbe53241a0ae32d618c83da601cc
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 77cc0aeb979369df2156f8fb916067f608b61ebf..caae8bdae592a1ae4f99861088458d7461f4c97a 100644
|
||||
index 8c8f1f0f368d41c746c4ccb02dc95482f3336df3..121e559dea10f9471e8bac9d18b267fec9cdcf1d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2618,7 +2618,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2623,7 +2623,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
double d4 = DimensionManager.a(this.world.getDimensionManager(), worldserver.getDimensionManager());
|
||||
BlockPosition blockposition = new BlockPosition(MathHelper.a(this.locX() * d4, d0, d2), this.locY(), MathHelper.a(this.locZ() * d4, d1, d3));
|
||||
// CraftBukkit start
|
||||
|
|
|
@ -25,10 +25,10 @@ index abbbe1786eb68af02f9d39650aad730ac44aac8a..3ac2ac3db9b1c271b3c21930bb137166
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index caae8bdae592a1ae4f99861088458d7461f4c97a..bfced192c1e8fd3fa0250a0f93adfc061d7e71e5 100644
|
||||
index 121e559dea10f9471e8bac9d18b267fec9cdcf1d..3bc10943c98aedb863df005d578a6865450b5e02 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2289,6 +2289,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2294,6 +2294,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
||||
@Nullable
|
||||
public ScoreboardTeamBase getScoreboardTeam() {
|
||||
|
|
|
@ -6,7 +6,7 @@ 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.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b7df4d8eb3ccb9e8dc85898352f41c5c20abcb34..6cbb797cb0de4b26d8ddd7f0bf567f49bd36f9c0 100644
|
||||
index 3bc10943c98aedb863df005d578a6865450b5e02..08457284f8decbf23378267f8c53be481fdb616b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -143,6 +143,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -31,7 +31,7 @@ index b7df4d8eb3ccb9e8dc85898352f41c5c20abcb34..6cbb797cb0de4b26d8ddd7f0bf567f49
|
|||
private CraftEntity bukkitEntity;
|
||||
|
||||
public CraftEntity getBukkitEntity() {
|
||||
@@ -272,7 +287,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -273,7 +288,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.x = Vec3D.ORIGIN;
|
||||
this.am = 1.0F;
|
||||
this.an = 1.0F;
|
||||
|
|
|
@ -45,10 +45,10 @@ index beb0beb716869978be6bc5a78ce3b6cf785c5aee..e3cdea3c85d762af6984f3dbe544fdfe
|
|||
private java.util.Map<EntityPlayer, Boolean> trackedPlayerMap = null;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 092ee75f9527af25a48ab052659e3304986b50e0..d314cdd9341e6aa5748a5b1afdd9569bec956c74 100644
|
||||
index 1bc226adb1f959f3c0e350a4d6f8794f9eb7584f..7152d23a4d493ca90ac4e83b5589c5e620250fe0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2771,6 +2771,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2776,6 +2776,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public boolean bV() {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d314cdd9341e6aa5748a5b1afdd9569bec956c74..00e79363b3f961111595c50758332f6c1c1b31bb 100644
|
||||
index 7152d23a4d493ca90ac4e83b5589c5e620250fe0..d531db4892e775c6bf8dc4e09cbf4f754ab7c5ef 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2046,6 +2046,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2051,6 +2051,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
||||
|
|
|
@ -27,10 +27,10 @@ index 2dc58b9f769ea43b737804456aafab47ecc143b8..c611b5a63498f5ad1f50a75ccd5d7299
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 49da1525cfc46743013bbac0528ec58501cab6eb..b798190628c1d83b5bf9e5497b515ef1e9f26707 100644
|
||||
index d531db4892e775c6bf8dc4e09cbf4f754ab7c5ef..d41c9bd566283065b524d8a22effd236a32dcbaa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -268,6 +268,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -269,6 +269,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
|
@ -39,7 +39,7 @@ index 49da1525cfc46743013bbac0528ec58501cab6eb..b798190628c1d83b5bf9e5497b515ef1
|
|||
// Spigot end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 6fa269cec002fcffd6d02125c20efa9314148243..2eee92f74a7c82ec7df05db6df79743b4345cc86 100644
|
||||
index f26f02856e7cca0ca62325adf992619dd15b3885..dd9c51b28e32389429887e9c9cef0a554eff8a40 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -2903,8 +2903,11 @@ public abstract class EntityLiving extends Entity {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index dcaf5c107bb77b63333f924a33961f9e5cad7082..43039c14e087259e3ce4b5091b887759b66fe52d 100644
|
||||
index d41c9bd566283065b524d8a22effd236a32dcbaa..c3f1490696b1aeba20fde7554010caa4150f5856 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -268,6 +268,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -269,6 +269,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
|
@ -16,8 +16,8 @@ index dcaf5c107bb77b63333f924a33961f9e5cad7082..43039c14e087259e3ce4b5091b887759
|
|||
protected int numCollisions = 0; // Paper
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
@@ -1666,6 +1667,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
nbttagcompound.setUUID("Paper.OriginWorld", origin.getWorld().getUID());
|
||||
@@ -1670,6 +1671,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
+ // Save entity's from mob spawner status
|
||||
|
@ -27,8 +27,8 @@ index dcaf5c107bb77b63333f924a33961f9e5cad7082..43039c14e087259e3ce4b5091b887759
|
|||
// Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -1798,6 +1803,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
@@ -1803,6 +1808,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.originWorldId = originWorld == null ? null : originWorld.getUID();
|
||||
origin = new org.bukkit.Location(originWorld, originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
|
||||
}
|
||||
+
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
|
|||
UUID, ticks lived, valid, dead
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 43039c14e087259e3ce4b5091b887759b66fe52d..f15c60e56fc32a7dd525eefb2d622c33e00037c7 100644
|
||||
index c3f1490696b1aeba20fde7554010caa4150f5856..a2feecdca8423ef02248b1abae823d8518c7bcb7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2527,7 +2527,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2532,7 +2532,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
|
|
|
@ -43,10 +43,10 @@ index e39f1ea4eefb0d8e0ca379b116b3699c13bb3f35..9151d84e2f6fb316525c744665891787
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 102c2bb98a99cdbfcdf1297341dbba91434ee0e3..046b191e771ed9be337e095214a67febd768e5f6 100644
|
||||
index 71afcc1a829212f4d7cab3afe757d6eae8874500..8d005bbc2bdc8694d80cdb1470e540f113b79062 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -276,6 +276,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -277,6 +277,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
protected int numCollisions = 0; // Paper
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
|
|
|
@ -17,10 +17,10 @@ index b6effe1037f3ae59e6faa5f5d039b6ad54bca5d4..87374174dcbf9e7ee448a1cdd9a35285
|
|||
return (float) (1.0D / this.b(GenericAttributes.ATTACK_SPEED) * 20.0D);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index ee3fbf0789b4841a113727397ba6809b2600ff83..a13867ff6d188e7633a91f1e1600116286ac0cd4 100644
|
||||
index 7bb674147117e00fd5de55c9e8c524b389bb3104..70163b3c755e63285b11bb22dab3e4b537b8ef23 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2189,6 +2189,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2190,6 +2190,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
connection.sendPacket(new net.minecraft.network.protocol.game.PacketPlayOutOpenBook(net.minecraft.world.EnumHand.MAIN_HAND));
|
||||
connection.sendPacket(new net.minecraft.network.protocol.game.PacketPlayOutSetSlot(0, slot, inventory.getItemInHand()));
|
||||
}
|
||||
|
|
|
@ -78,10 +78,10 @@ index f6f79ed9c38206cc6a4feb5504e854a476868aec..7d2b947b3c2b255c01241f2c4a6d7377
|
|||
int i = this.f ? 300 : 100;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 37497d7ff04b84d4758997970dbdbf88b40d0493..28390d3830ed9f3f5d97ab38913e6c40f9943a70 100644
|
||||
index 8d005bbc2bdc8694d80cdb1470e540f113b79062..4161d189613b5fb542cef8c128852e6e7d548833 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1538,6 +1538,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1539,6 +1539,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -89,7 +89,7 @@ index 37497d7ff04b84d4758997970dbdbf88b40d0493..28390d3830ed9f3f5d97ab38913e6c40
|
|||
public void a(Entity entity, int i, DamageSource damagesource) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource);
|
||||
@@ -2442,6 +2443,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2447,6 +2448,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.fallDistance = 0.0F;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ index f5be9554e1fd01a35b926196b30fd64f1567a799..3e7ac6699ad1f147220c286e251ce0ec
|
|||
this.fallDistance = 0;
|
||||
this.foodData = new FoodMetaData(this);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 28390d3830ed9f3f5d97ab38913e6c40f9943a70..2292295bac55651850b5e033f1ca9819bb7fa96f 100644
|
||||
index 4161d189613b5fb542cef8c128852e6e7d548833..441d8efa24a377b81eb53c3997ae9d30a5f7bc67 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2355,6 +2355,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2360,6 +2360,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -41,10 +41,10 @@ index 3e7ac6699ad1f147220c286e251ce0ec1ca25035..e755191435e74246b309f8fe5a668dae
|
|||
|
||||
if (entity1 != entity && this.playerConnection != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2292295bac55651850b5e033f1ca9819bb7fa96f..af38b81df3f60163cafc341543ecad0865225943 100644
|
||||
index 441d8efa24a377b81eb53c3997ae9d30a5f7bc67..fd9bb9b7b59c9dcd797e52109afc2f6dd2160bb1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2045,12 +2045,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2050,12 +2050,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ index 2292295bac55651850b5e033f1ca9819bb7fa96f..af38b81df3f60163cafc341543ecad08
|
|||
}
|
||||
|
||||
}
|
||||
@@ -2105,7 +2108,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2110,7 +2113,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ index 2292295bac55651850b5e033f1ca9819bb7fa96f..af38b81df3f60163cafc341543ecad08
|
|||
if (entity.getVehicle() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
@@ -2115,7 +2121,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2120,7 +2126,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||
VehicleExitEvent event = new VehicleExitEvent(
|
||||
(Vehicle) getBukkitEntity(),
|
||||
|
@ -83,7 +83,7 @@ index 2292295bac55651850b5e033f1ca9819bb7fa96f..af38b81df3f60163cafc341543ecad08
|
|||
);
|
||||
// Suppress during worldgen
|
||||
if (this.valid) {
|
||||
@@ -2129,7 +2135,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2134,7 +2140,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
|
|
|
@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to
|
|||
be unintentional in the few cases we've seen so far.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 25e0d0dd7b114560896679f0314cea288d7a768c..f57ad014fb3d2ce2405bdd63db4c730458aac17a 100644
|
||||
index 840edab739dada3f1459328a90e0e92e7cf2375e..abfbf942521d5abe14ab6cdeedc29591d3f54e6e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2234,6 +2234,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2235,6 +2235,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void resetCooldown() {
|
||||
getHandle().resetAttackCooldown();
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index af38b81df3f60163cafc341543ecad0865225943..413f715c98dc0a0953e60032ad1ebef2b0b3bbe3 100644
|
||||
index fd9bb9b7b59c9dcd797e52109afc2f6dd2160bb1..92c312eb431409c615ae63b01087ee2cb89b868f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1504,6 +1504,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1505,6 +1505,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return this.c(f - 90.0F, f1);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ index af38b81df3f60163cafc341543ecad0865225943..413f715c98dc0a0953e60032ad1ebef2
|
|||
public final Vec3D j(float f) {
|
||||
if (f == 1.0F) {
|
||||
return new Vec3D(this.locX(), this.getHeadY(), this.locZ());
|
||||
@@ -2154,6 +2155,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2159,6 +2160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return this.getPassengers().size() < 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ index 1ae969aff1d44ad9af28fc94d8821884b9ad0563..47aa69dfe43390b811c264adc0af1d01
|
|||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 413f715c98dc0a0953e60032ad1ebef2b0b3bbe3..712c81fe2cf6da6b80fea21fd6c3d0e0adc5a35a 100644
|
||||
index 92c312eb431409c615ae63b01087ee2cb89b868f..4d41e741f0a1b11a8b98c34303018c032e4b1fe4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -63,6 +63,8 @@ import net.minecraft.world.EnumHand;
|
||||
|
@ -55,8 +55,8 @@ index 413f715c98dc0a0953e60032ad1ebef2b0b3bbe3..712c81fe2cf6da6b80fea21fd6c3d0e0
|
|||
// Paper end
|
||||
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
@@ -1674,6 +1677,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
nbttagcompound.setUUID("Paper.OriginWorld", origin.getWorld().getUID());
|
||||
@@ -1678,6 +1681,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
+ if (spawnReason != null) {
|
||||
|
@ -65,7 +65,7 @@ index 413f715c98dc0a0953e60032ad1ebef2b0b3bbe3..712c81fe2cf6da6b80fea21fd6c3d0e0
|
|||
// Save entity's from mob spawner status
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbttagcompound.setBoolean("Paper.FromMobSpawner", true);
|
||||
@@ -1812,6 +1818,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1817,6 +1823,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
|
|
@ -40,10 +40,10 @@ index 145767e8b0fc4105a0afa47af17dcdbb75e952bc..174eb12722872182b2d9b54841e5bb57
|
|||
double deltaZ = this.locZ() - player.locZ();
|
||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index f57ad014fb3d2ce2405bdd63db4c730458aac17a..dc8545241ed62f6b654b2559e025c3b34c00575f 100644
|
||||
index abfbf942521d5abe14ab6cdeedc29591d3f54e6e..b6f558eb6e76a50aa8a0012a879f88376086e44e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2243,6 +2243,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2244,6 +2244,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
super.remove();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -224,10 +224,10 @@ index 4e26db120e544d8867d895395241e425f23f575b..fbff779fa581a661cc03850bffa0da34
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 712c81fe2cf6da6b80fea21fd6c3d0e0adc5a35a..efa8d9a16e87475adf7e71a0dfa2861653f73c06 100644
|
||||
index 4d41e741f0a1b11a8b98c34303018c032e4b1fe4..a3c74208df658ad7db79e7cbc29b2364602f4c37 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2804,6 +2804,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2809,6 +2809,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ index de4e0477c5c777ce9ac601f88d24f2dd2786eb6f..17c6118fb1ea1f16d37eb13116e11f88
|
|||
}
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index efa8d9a16e87475adf7e71a0dfa2861653f73c06..32dad0b72ee0d0a1ac30decb0fb52f4399f9f39f 100644
|
||||
index a3c74208df658ad7db79e7cbc29b2364602f4c37..73d4e813df19cf423071181b710f6af85ca96c98 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -68,6 +68,7 @@ import net.minecraft.world.entity.animal.EntityFish;
|
||||
|
@ -125,7 +125,7 @@ index efa8d9a16e87475adf7e71a0dfa2861653f73c06..32dad0b72ee0d0a1ac30decb0fb52f43
|
|||
protected int portalTicks;
|
||||
protected BlockPosition ac;
|
||||
private boolean invulnerable;
|
||||
@@ -275,6 +276,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -276,6 +277,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
|
@ -133,7 +133,7 @@ index efa8d9a16e87475adf7e71a0dfa2861653f73c06..32dad0b72ee0d0a1ac30decb0fb52f43
|
|||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
protected int numCollisions = 0; // Paper
|
||||
public void inactiveTick() { }
|
||||
@@ -665,6 +667,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -666,6 +668,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.recalcPosition();
|
||||
} else {
|
||||
if (enummovetype == EnumMoveType.PISTON) {
|
||||
|
@ -141,7 +141,7 @@ index efa8d9a16e87475adf7e71a0dfa2861653f73c06..32dad0b72ee0d0a1ac30decb0fb52f43
|
|||
vec3d = this.b(vec3d);
|
||||
if (vec3d.equals(Vec3D.ORIGIN)) {
|
||||
return;
|
||||
@@ -677,6 +680,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -678,6 +681,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.x = Vec3D.ORIGIN;
|
||||
this.setMot(Vec3D.ORIGIN);
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ index efa8d9a16e87475adf7e71a0dfa2861653f73c06..32dad0b72ee0d0a1ac30decb0fb52f43
|
|||
|
||||
vec3d = this.a(vec3d, enummovetype);
|
||||
Vec3D vec3d1 = this.g(vec3d);
|
||||
@@ -2012,6 +2022,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2017,6 +2027,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ index efa8d9a16e87475adf7e71a0dfa2861653f73c06..32dad0b72ee0d0a1ac30decb0fb52f43
|
|||
public void k(Entity entity) {
|
||||
this.a(entity, Entity::setPosition);
|
||||
}
|
||||
@@ -2822,6 +2833,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2827,6 +2838,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return this.ae;
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@ index 8b09aaa30dd753fd34bea155890bdd9e5cb180f5..2005cb484ba6b5929ad81d3d120521f2
|
|||
return this.bB != null;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
index 858bbfbc08a5f2e1ef93ff52d6708059b32fbbbf..d7e152f7147bb599ce21dc605ebbd76e82eced26 100644
|
||||
index 29957e79161db862c3eee5d0ed0cb8edb5dceb1c..596450d3cdb3be4abca3e75bed743abd071fb0b0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
@@ -213,17 +213,29 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
|
|
|
@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the
|
|||
heightmap resolves the issue without having to load all spawn chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 32dad0b72ee0d0a1ac30decb0fb52f4399f9f39f..b1495da5fdead24caf9e936a385d97fd2db2a0cc 100644
|
||||
index 73d4e813df19cf423071181b710f6af85ca96c98..522009c7ef56cd51e592c3bb985e33b4ee7d2532 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2735,6 +2735,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2740,6 +2740,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
BlockPosition blockposition1;
|
||||
|
||||
if (flag1) {
|
||||
|
|
|
@ -19,10 +19,10 @@ index 7fbd501d70dccf869a4454e2789a5d68f2e15754..9e4591ddc4b755f4ff5a6f1078b51cb1
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b1495da5fdead24caf9e936a385d97fd2db2a0cc..334d60c71fa13841f9d04af5404cc25acbc0ec76 100644
|
||||
index 522009c7ef56cd51e592c3bb985e33b4ee7d2532..1bfbbac3f6369f64350c5cba16d880f3d2c7fd79 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -278,6 +278,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -279,6 +279,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public boolean isTemporarilyActive = false; // Paper
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
|
@ -30,7 +30,7 @@ index b1495da5fdead24caf9e936a385d97fd2db2a0cc..334d60c71fa13841f9d04af5404cc25a
|
|||
protected int numCollisions = 0; // Paper
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
@@ -1694,6 +1695,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1698,6 +1699,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbttagcompound.setBoolean("Paper.FromMobSpawner", true);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ index b1495da5fdead24caf9e936a385d97fd2db2a0cc..334d60c71fa13841f9d04af5404cc25a
|
|||
// Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -1828,6 +1832,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1833,6 +1837,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
|
|
@ -149,7 +149,7 @@ index 8981dfacd10cae9de052e1b36ce5181cd0e6752d..202fa94d5dc55b549475ae0309bbcfca
|
|||
protected static final DataWatcherObject<NBTTagCompound> bk = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p);
|
||||
protected static final DataWatcherObject<NBTTagCompound> bl = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index dc8545241ed62f6b654b2559e025c3b34c00575f..935b5668a81db4d19a08b09c61519114532a23d9 100644
|
||||
index b6f558eb6e76a50aa8a0012a879f88376086e44e..c218a2c02f5aefc9105fea371119abb2b3118368 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1,5 +1,8 @@
|
||||
|
@ -161,7 +161,7 @@ index dc8545241ed62f6b654b2559e025c3b34c00575f..935b5668a81db4d19a08b09c61519114
|
|||
import com.destroystokyo.paper.Title;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
@@ -2253,6 +2256,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2254,6 +2257,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void setViewDistance(int viewDistance) {
|
||||
throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Load Chunks for Login Asynchronously
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index 6e5d21af43261dc2f12ceec7b7e3269be635cf7a..ecf4cd6dfea777ab9daea0b40724d247df7ddb53 100644
|
||||
index cb098defa7b93864294befa9b9a427804461188b..fc7140e0eb11e4bec99e453647fce200bca0ed7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -629,7 +629,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -71,7 +71,7 @@ index 218dc900e125a11548485887b1918742072c7a77..2c932d36f982e7f8713aabff9a6c6310
|
|||
public static final TicketType<ChunkCoordIntPair> UNKNOWN = a("unknown", Comparator.comparingLong(ChunkCoordIntPair::pair), 1);
|
||||
public static final TicketType<Unit> PLUGIN = a("plugin", (a, b) -> 0); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/network/LoginListener.java b/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||
index 09ceac61f873ee0cb689c66a403c42677961011d..06e2b48ed6d6d52d0eb17301254ed07fb69cb8af 100644
|
||||
index 2e995103fba15c21dbe89321896c7df03ae5e67b..ef2aa000932c222e358789fcd2629dd8a46cfe80 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||
@@ -88,7 +88,7 @@ public class LoginListener implements PacketLoginInListener {
|
||||
|
@ -93,7 +93,7 @@ index 09ceac61f873ee0cb689c66a403c42677961011d..06e2b48ed6d6d52d0eb17301254ed07f
|
|||
if (entityplayer != null) {
|
||||
this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
index f02ddd53df4674a2b5e0bb142db756d1f153d69b..443247b03b8352c4dd453270dccdbd7eb5f0944b 100644
|
||||
index 8a8f75acdd55e00ac2e7b5c621d1f522208df2c2..7c1d25feab71c325ce2379afa6c61732eebd74f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -222,6 +222,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
@ -292,10 +292,10 @@ index 66c1a9ca392b29fe2191577d32c70b214fa7293d..c7e78d0626fa0dd18021c1a0827a10c0
|
|||
Iterator iterator = list.iterator();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7bce3722fb00194f5a913c0b9866b73cfc74611d..8ca7012264528f17ac2e4f15ced96c774fa566d7 100644
|
||||
index d57a40000c257b7249bec828d38a5d50cd4199e6..e02d349f4353f96318d858a1aa70dfc4fadb6c71 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1372,7 +1372,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1373,7 +1373,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
this.lastY = d1;
|
||||
this.lastZ = d4;
|
||||
this.setPosition(d3, d1, d4);
|
||||
|
|
|
@ -7,10 +7,10 @@ The code following this has better support for null worlds to move
|
|||
them back to the world spawn.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 896b4d016de78e98276d7cdf9328d8951572e3be..fbd473d39cd71510b5fe8b7a4d34d3b824301f73 100644
|
||||
index e02d349f4353f96318d858a1aa70dfc4fadb6c71..f78c79f34b4ee89a72fe5a57da0eb4010cfea07c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1809,9 +1809,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1813,9 +1813,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
bworld = server.getWorld(worldName);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
|
|||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index fbd473d39cd71510b5fe8b7a4d34d3b824301f73..8d8d94219f9a556212763fce736452a19249ffec 100644
|
||||
index f78c79f34b4ee89a72fe5a57da0eb4010cfea07c..3cc5b0dc8d79c9d8e89a16ba150a6b4acb8c84d6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1974,11 +1974,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1979,11 +1979,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
} else {
|
||||
// CraftBukkit start - Capture drops for death event
|
||||
if (this instanceof EntityLiving && !((EntityLiving) this).forceDrops) {
|
||||
|
@ -34,7 +34,7 @@ index fbd473d39cd71510b5fe8b7a4d34d3b824301f73..8d8d94219f9a556212763fce736452a1
|
|||
|
||||
entityitem.defaultPickupDelay();
|
||||
// CraftBukkit start
|
||||
@@ -2626,6 +2627,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2631,6 +2632,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@Nullable
|
||||
public Entity teleportTo(WorldServer worldserver, BlockPosition location) {
|
||||
// CraftBukkit end
|
||||
|
@ -47,7 +47,7 @@ index fbd473d39cd71510b5fe8b7a4d34d3b824301f73..8d8d94219f9a556212763fce736452a1
|
|||
if (this.world instanceof WorldServer && !this.dead) {
|
||||
this.world.getMethodProfiler().enter("changeDimension");
|
||||
// CraftBukkit start
|
||||
@@ -2646,6 +2653,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2651,6 +2658,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
// CraftBukkit end
|
||||
|
||||
this.world.getMethodProfiler().exitEnter("reloading");
|
||||
|
@ -59,7 +59,7 @@ index fbd473d39cd71510b5fe8b7a4d34d3b824301f73..8d8d94219f9a556212763fce736452a1
|
|||
Entity entity = this.getEntityType().a((World) worldserver);
|
||||
|
||||
if (entity != null) {
|
||||
@@ -2659,10 +2671,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2664,10 +2676,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||
this.getBukkitEntity().setHandle(entity);
|
||||
entity.bukkitEntity = this.getBukkitEntity();
|
||||
|
@ -70,7 +70,7 @@ index fbd473d39cd71510b5fe8b7a4d34d3b824301f73..8d8d94219f9a556212763fce736452a1
|
|||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -2787,7 +2795,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2792,7 +2800,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public boolean canPortal() {
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker
|
|||
Use the distance map to find candidate players for tracking.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 11a412b1df98dea2826330b0b246655844a4f4ea..1d77d6254b024c286781be8dc74680bc1e8f1238 100644
|
||||
index 7f67773686a2d55153f7b2bfbe24df84fe1198be..1eb1da61ee2aa2cc5d28a46fd364a182cd16983b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1654,6 +1654,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
@ -316,7 +316,7 @@ index d509cfd2da99233e5142abd176cc50ccea7c32b6..9fc74f08b912ff885c9478167c7ef173
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cb5c93dca3b947462b89f79c60c7562085684b87..da2b5bfd3966ded2d5dde0d65646583576a088c5 100644
|
||||
index 3cc5b0dc8d79c9d8e89a16ba150a6b4acb8c84d6..019b602db883434c65964130bcac3f02e467332a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -46,6 +46,7 @@ import net.minecraft.network.syncher.DataWatcherObject;
|
||||
|
@ -327,7 +327,7 @@ index cb5c93dca3b947462b89f79c60c7562085684b87..da2b5bfd3966ded2d5dde0d656465835
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.PlayerChunkMap;
|
||||
@@ -295,6 +296,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -296,6 +297,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b244f5d204938452ea19335947830de47336bbd4..8151403b2a7f5f8441c6810d1bd2bf3df4cefa80 100644
|
||||
index 019b602db883434c65964130bcac3f02e467332a..d058675b800cb73f235d5675aea32bac175e0534 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -66,6 +66,7 @@ import net.minecraft.world.INamableTileEntity;
|
||||
|
@ -16,7 +16,7 @@ index b244f5d204938452ea19335947830de47336bbd4..8151403b2a7f5f8441c6810d1bd2bf3d
|
|||
import net.minecraft.world.entity.item.EntityItem;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.entity.vehicle.EntityBoat;
|
||||
@@ -479,7 +480,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -480,7 +481,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
||||
public void setPosition(double d0, double d1, double d2) {
|
||||
this.setPositionRaw(d0, d1, d2);
|
||||
|
@ -25,7 +25,7 @@ index b244f5d204938452ea19335947830de47336bbd4..8151403b2a7f5f8441c6810d1bd2bf3d
|
|||
if (valid) ((WorldServer) world).chunkCheck(this); // CraftBukkit
|
||||
}
|
||||
|
||||
@@ -2999,6 +3000,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -3004,6 +3005,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return new AxisAlignedBB(vec3d, vec3d1);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ index b244f5d204938452ea19335947830de47336bbd4..8151403b2a7f5f8441c6810d1bd2bf3d
|
|||
public void a(AxisAlignedBB axisalignedbb) {
|
||||
// CraftBukkit start - block invalid bounding boxes
|
||||
double minX = axisalignedbb.minX,
|
||||
@@ -3437,6 +3439,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -3442,6 +3444,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public void setPositionRaw(double d0, double d1, double d2) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Optimize WorldBorder collision checks and air
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c50b89ee8f16821923933025bf19243771dd1604..27e5ba64ed6406c1ece318bf79fca0f261a77818 100644
|
||||
index d058675b800cb73f235d5675aea32bac175e0534..d7e1e09cd3053220a5413b498108d57f23ec94a4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -909,7 +909,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -910,7 +910,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
AxisAlignedBB axisalignedbb = this.getBoundingBox();
|
||||
VoxelShapeCollision voxelshapecollision = VoxelShapeCollision.a(this);
|
||||
VoxelShape voxelshape = this.world.getWorldBorder().c();
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add entity liquid API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 27e5ba64ed6406c1ece318bf79fca0f261a77818..743d4725c0a26a8abd0a98eed2ec45ffba6211ad 100644
|
||||
index d7e1e09cd3053220a5413b498108d57f23ec94a4..e1927f019dfbabab9af357294c4b73fa41bd3f2e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1166,12 +1166,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1167,12 +1167,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return this.inWater;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ index 27e5ba64ed6406c1ece318bf79fca0f261a77818..743d4725c0a26a8abd0a98eed2ec45ff
|
|||
private boolean k() {
|
||||
return this.world.getType(this.getChunkCoordinates()).a(Blocks.BUBBLE_COLUMN);
|
||||
}
|
||||
@@ -1185,6 +1186,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1186,6 +1187,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return this.isInWater() || this.isInRain() || this.k();
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ index 27e5ba64ed6406c1ece318bf79fca0f261a77818..743d4725c0a26a8abd0a98eed2ec45ff
|
|||
public boolean aH() {
|
||||
return this.isInWater() || this.k();
|
||||
}
|
||||
@@ -1327,6 +1329,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1328,6 +1330,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
return this.O == tag;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,10 +73,10 @@ index 8f3dd1493f3a8121376f79632b3941cf642219a7..d3449dc9eeba0d8022c3a7b0280eaffc
|
|||
return (!this.player.joining && !this.networkManager.isConnected()) || this.processedDisconnect; // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0f8d10c2bc7728b58528096fc0686c3aeee623a7..18d7cf6e783843d44715210b7c8db7bf0a5c89ae 100644
|
||||
index e2f5d2b5e237be3f0ff5fa72a3bef2bf3b6dfd5f..30f21b0d6017fcf8801543296be69a0b717c8fac 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2388,6 +2388,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2389,6 +2389,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Paper end
|
||||
};
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ index d3449dc9eeba0d8022c3a7b0280eaffcd42e7265..fe3bd1c54a7e366bd4f02b417f7725ba
|
|||
this.player.playerConnection.sendPacket(new PacketPlayOutPosition(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.teleportAwait));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 743d4725c0a26a8abd0a98eed2ec45ffba6211ad..58d9dce288ab9cc1989cfcb66703b76fdabf1319 100644
|
||||
index e1927f019dfbabab9af357294c4b73fa41bd3f2e..ec163bf527120a19cdc9fd7ccd69b6eb83d0bb54 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -145,6 +145,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -42,7 +42,7 @@ index 743d4725c0a26a8abd0a98eed2ec45ffba6211ad..58d9dce288ab9cc1989cfcb66703b76f
|
|||
static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
|
||||
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
}
|
||||
@@ -1408,6 +1409,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1409,6 +1410,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public void setPositionRotation(double d0, double d1, double d2, float f, float f1) {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a1fb19d45ee3809ee6a515669ba64ea45b31428c..9b6e5f279a22efc2d015e2d31076a8c06e6b3886 100644
|
||||
index ec163bf527120a19cdc9fd7ccd69b6eb83d0bb54..48cbc44d5b502443be8205a6481d037f9fea491e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3478,4 +3478,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -3483,4 +3483,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
||||
void accept(Entity entity, double d0, double d1, double d2);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#isTicking
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 9b6e5f279a22efc2d015e2d31076a8c06e6b3886..d072e3fb26f32db80be68f0e23526e34f57ff331 100644
|
||||
index 48cbc44d5b502443be8205a6481d037f9fea491e..35b2e8dba3536febe997f3c562c56f0d5371a524 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -48,6 +48,7 @@ import net.minecraft.resources.MinecraftKey;
|
||||
|
@ -16,7 +16,7 @@ index 9b6e5f279a22efc2d015e2d31076a8c06e6b3886..d072e3fb26f32db80be68f0e23526e34
|
|||
import net.minecraft.server.level.EntityPlayer;
|
||||
import net.minecraft.server.level.PlayerChunkMap;
|
||||
import net.minecraft.server.level.TicketType;
|
||||
@@ -3483,5 +3484,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -3488,5 +3489,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
public static int nextEntityId() {
|
||||
return entityCount.incrementAndGet();
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix CME on adding a passenger in CreatureSpawnEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d072e3fb26f32db80be68f0e23526e34f57ff331..0841cf7e968a8a3b577e91f6dcd0487169474329 100644
|
||||
index 35b2e8dba3536febe997f3c562c56f0d5371a524..7f212d7471e96e91b990cc5432216b2c1e8fb01f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3182,7 +3182,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -3187,7 +3187,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public Stream<Entity> recursiveStream() {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Player elytra boost API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 18d7cf6e783843d44715210b7c8db7bf0a5c89ae..8337ed8bb20b8d887bcd71ddc5f29bce346c7cff 100644
|
||||
index 30f21b0d6017fcf8801543296be69a0b717c8fac..b4eee7f78f8950432af69e232b96062af97ed51f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -69,12 +69,14 @@ import net.minecraft.world.entity.ai.attributes.AttributeMapBase;
|
||||
|
@ -23,7 +23,7 @@ index 18d7cf6e783843d44715210b7c8db7bf0a5c89ae..8337ed8bb20b8d887bcd71ddc5f29bce
|
|||
import net.minecraft.world.level.biome.BiomeManager;
|
||||
import net.minecraft.world.level.block.entity.TileEntitySign;
|
||||
import net.minecraft.world.level.saveddata.maps.MapIcon;
|
||||
@@ -2284,6 +2286,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2285,6 +2287,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
throw new RuntimeException("Unknown settings type");
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ changes but this should usually not happen. A config option to disable
|
|||
this completely is added though in case that should ever be necessary.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 424754a0183b071d20c86f0420cec784a8992e2b..97870622e41cca36d9c7493bfad796f35f3831f4 100644
|
||||
index 424754a0183b071d20c86f0420cec784a8992e2b..fdd7457848e8c7d491705f374c3608828cea02c3 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -337,6 +337,14 @@ public class PaperWorldConfig {
|
||||
|
@ -29,7 +29,7 @@ index 424754a0183b071d20c86f0420cec784a8992e2b..97870622e41cca36d9c7493bfad796f3
|
|||
}
|
||||
|
||||
+ public boolean seedBasedFeatureSearch = true;
|
||||
+ public boolean seedBasedFeatureSearchLoadsChunks = false;
|
||||
+ public boolean seedBasedFeatureSearchLoadsChunks = true;
|
||||
+ private void seedBasedFeatureSearch() {
|
||||
+ seedBasedFeatureSearch = getBoolean("seed-based-feature-search", seedBasedFeatureSearch);
|
||||
+ seedBasedFeatureSearchLoadsChunks = getBoolean("seed-based-feature-search-loads-chunks", seedBasedFeatureSearchLoadsChunks);
|
||||
|
|
|
@ -19,10 +19,10 @@ index 5a451cc855de57f79a57670ba38e3af2343cb510..7d3207a9af8360ddad228281d6aa65e1
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index bb1a3fb7d0c0b770636971877bed045005787e64..f35afa4d8d087649f57020e4f89185cffcb1ed3a 100644
|
||||
index 7f212d7471e96e91b990cc5432216b2c1e8fb01f..14ada3f197e625d922c8b39ecdb1ac76e5fc49e9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1575,6 +1575,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1576,6 +1576,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public boolean isCollidable() {
|
||||
|
|
|
@ -32,10 +32,10 @@ index cf457f6b6ee2968f68f4eede30bb703a6a4f990b..1358993217e601e3bab6e0a4e8c55d55
|
|||
|
||||
// Paper start
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 41987716afa8ec34214868373df97d0e8f8b27c1..e81de526a847c730abf86016354c1dc57780ec8b 100644
|
||||
index af1f76692207bb3b5fa895be77c00501f08b2969..dc64a22e6b232909902d738c3587fcfa7b9d99cb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2300,6 +2300,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2301,6 +2301,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
? (org.bukkit.entity.Firework) entity.getBukkitEntity()
|
||||
: null;
|
||||
}
|
||||
|
|
|
@ -28,10 +28,10 @@ index d052d53771d868e6fa25d8854fc675a808722c65..c293efaa70c67d7a4227d779eac5d3a5
|
|||
public int wanderingTraderSpawnDayTicks = 24000;
|
||||
public int wanderingTraderSpawnChanceFailureIncrement = 25;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f35afa4d8d087649f57020e4f89185cffcb1ed3a..a76d32a978ec6fe749ffc0bd50004bda059b6196 100644
|
||||
index 14ada3f197e625d922c8b39ecdb1ac76e5fc49e9..bcb4ac7a3ca009b68498534eddc98d40bffeaf12 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1467,6 +1467,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -1468,6 +1468,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
public void collide(Entity entity) {
|
||||
if (!this.isSameVehicle(entity)) {
|
||||
if (!entity.noclip && !this.noclip) {
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: HexedHero <6012891+HexedHero@users.noreply.github.com>
|
||||
Date: Thu, 19 Nov 2020 02:07:10 +0000
|
||||
Subject: [PATCH] Fix console spam when removing chests in water
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockChest.java b/src/main/java/net/minecraft/world/level/block/BlockChest.java
|
||||
index b2c29cff5883868cb56a4e376ab946ac929abc94..a45ee959f41e7f349ff2c309f21fa44ec671cb87 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockChest.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockChest.java
|
||||
@@ -239,7 +239,7 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I
|
||||
@Override
|
||||
public void remove(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
|
||||
if (!iblockdata.a(iblockdata1.getBlock())) {
|
||||
- TileEntity tileentity = world.getTileEntity(blockposition);
|
||||
+ TileEntity tileentity = world.getTileEntity(blockposition, false); // Paper - Don't validate TE - Fix console spam when removing chests in water
|
||||
|
||||
if (tileentity instanceof IInventory) {
|
||||
InventoryUtils.dropInventory(world, blockposition, (IInventory) tileentity);
|
|
@ -0,0 +1,32 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: HexedHero <6012891+HexedHero@users.noreply.github.com>
|
||||
Date: Thu, 19 Nov 2020 02:07:10 +0000
|
||||
Subject: [PATCH] Skip TE break validation for some waterlogged TEs
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockCampfire.java b/src/main/java/net/minecraft/world/level/block/BlockCampfire.java
|
||||
index 21baa8fb99b0587da503e14e2b04abf3134d03bc..ba2385a876e7d77bc253d98307f1c75ec8aeb46c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockCampfire.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockCampfire.java
|
||||
@@ -98,7 +98,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
|
||||
@Override
|
||||
public void remove(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
|
||||
if (!iblockdata.a(iblockdata1.getBlock())) {
|
||||
- TileEntity tileentity = world.getTileEntity(blockposition);
|
||||
+ TileEntity tileentity = world.getTileEntity(blockposition, !iblockdata1.isSameInstance(Blocks.WATER)); // Don't validate TE when removing campfire in water
|
||||
|
||||
if (tileentity instanceof TileEntityCampfire) {
|
||||
InventoryUtils.a(world, blockposition, ((TileEntityCampfire) tileentity).getItems());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockChest.java b/src/main/java/net/minecraft/world/level/block/BlockChest.java
|
||||
index b2c29cff5883868cb56a4e376ab946ac929abc94..219950a446ef5811b113b32158852def964234a4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockChest.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockChest.java
|
||||
@@ -239,7 +239,7 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I
|
||||
@Override
|
||||
public void remove(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
|
||||
if (!iblockdata.a(iblockdata1.getBlock())) {
|
||||
- TileEntity tileentity = world.getTileEntity(blockposition);
|
||||
+ TileEntity tileentity = world.getTileEntity(blockposition, !iblockdata1.isSameInstance(Blocks.WATER)); // Paper - Don't validate TE - Fix console spam when removing chests in water
|
||||
|
||||
if (tileentity instanceof IInventory) {
|
||||
InventoryUtils.dropInventory(world, blockposition, (IInventory) tileentity);
|
|
@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f8446fd716a891a0b71675ccee6a6eac55fba87c..176a17582cb3b29a2ed430914ba8c0582bffe541 100644
|
||||
index 454bc4c7b2e54a75dd0510263165e41cf26b1751..879074df54e56a9275957a83c92b467094e95cd4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -14,6 +14,7 @@ import io.netty.buffer.ByteBufOutputStream;
|
||||
|
@ -66,7 +66,7 @@ index f8446fd716a891a0b71675ccee6a6eac55fba87c..176a17582cb3b29a2ed430914ba8c058
|
|||
try {
|
||||
this.serverThread.join();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0f04ba41df95986b71524995738831223080cb88..e5c78b4e7537c8a042dcc41ca6b77c000c4317de 100644
|
||||
index 0f04ba41df95986b71524995738831223080cb88..a158abfe3c4bafa1594701123b0e8118069f7e2b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -18,6 +18,7 @@ import com.mojang.serialization.Lifecycle;
|
||||
|
@ -85,3 +85,11 @@ index 0f04ba41df95986b71524995738831223080cb88..e5c78b4e7537c8a042dcc41ca6b77c00
|
|||
}
|
||||
loadPlugins();
|
||||
enablePlugins(PluginLoadOrder.STARTUP);
|
||||
@@ -970,6 +972,7 @@ public final class CraftServer implements Server {
|
||||
plugin.getDescription().getName(),
|
||||
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
|
||||
));
|
||||
+ if (console.isDebugging()) TraceUtil.dumpTraceForThread(worker.getThread(), "still running");
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose Tracked Players
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f7223f214f911dd25abcf3a52745588ec630241d..7abeeefeb579a43bc9ee85fd4150afacfb11c802 100644
|
||||
index bcb4ac7a3ca009b68498534eddc98d40bffeaf12..04127554c330aaa4e1685fb77058ed92def4ba80 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -172,7 +172,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
@ -18,7 +18,7 @@ index f7223f214f911dd25abcf3a52745588ec630241d..7abeeefeb579a43bc9ee85fd4150afac
|
|||
public Throwable addedToWorldStack; // Paper - entity debug
|
||||
public CraftEntity getBukkitEntity() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index e81de526a847c730abf86016354c1dc57780ec8b..05248f560d643080a3eac581c01aa89fb3709e6c 100644
|
||||
index dc64a22e6b232909902d738c3587fcfa7b9d99cb..5d4bcca1689efa0c94801faa48eb63315b884108 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -16,6 +16,7 @@ import java.net.InetSocketAddress;
|
||||
|
@ -29,7 +29,7 @@ index e81de526a847c730abf86016354c1dc57780ec8b..05248f560d643080a3eac581c01aa89f
|
|||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -2309,6 +2310,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2310,6 +2311,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -57,10 +57,10 @@ index 169fa174f86f8a8dc42d3b9c4954a39d0a738c06..6835401bd7863bbd655502547a9fd4ae
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d62179765f93738e8444b507238b4fd79a1e9443..89b2be0e9e42d65b7d2d2833de4e6cd1c6e17e8e 100644
|
||||
index 04127554c330aaa4e1685fb77058ed92def4ba80..ded22f1431a3e909996d6bbbc5bdf09247f46898 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2235,7 +2235,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2240,7 +2240,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
protected boolean q(Entity entity) {
|
||||
|
@ -69,7 +69,7 @@ index d62179765f93738e8444b507238b4fd79a1e9443..89b2be0e9e42d65b7d2d2833de4e6cd1
|
|||
}
|
||||
|
||||
public final float getCollisionBorderSize() { return bg(); } // Paper - OBFHELPER
|
||||
@@ -2331,7 +2331,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2336,7 +2336,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public boolean isVehicle() {
|
||||
|
@ -78,7 +78,7 @@ index d62179765f93738e8444b507238b4fd79a1e9443..89b2be0e9e42d65b7d2d2833de4e6cd1
|
|||
}
|
||||
|
||||
public boolean bt() {
|
||||
@@ -3143,7 +3143,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -3148,7 +3148,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public boolean w(Entity entity) {
|
||||
|
@ -87,7 +87,7 @@ index d62179765f93738e8444b507238b4fd79a1e9443..89b2be0e9e42d65b7d2d2833de4e6cd1
|
|||
|
||||
Entity entity1;
|
||||
|
||||
@@ -3159,7 +3159,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -3164,7 +3164,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
public boolean a(Class<? extends Entity> oclass) {
|
||||
|
@ -96,7 +96,7 @@ index d62179765f93738e8444b507238b4fd79a1e9443..89b2be0e9e42d65b7d2d2833de4e6cd1
|
|||
|
||||
Entity entity;
|
||||
|
||||
@@ -3176,7 +3176,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -3181,7 +3181,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
|
||||
public Collection<Entity> getAllPassengers() {
|
||||
Set<Entity> set = Sets.newHashSet();
|
||||
|
@ -105,7 +105,7 @@ index d62179765f93738e8444b507238b4fd79a1e9443..89b2be0e9e42d65b7d2d2833de4e6cd1
|
|||
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
@@ -3202,7 +3202,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -3207,7 +3207,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
private void a(boolean flag, Set<Entity> set) {
|
||||
Entity entity;
|
||||
|
||||
|
|
|
@ -64,10 +64,10 @@ index 760579921927b4c8b0f20b2611b95fd626e4b27f..3075700dfa992da81b10246fcf7c7ad1
|
|||
return this.c;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e5c78b4e7537c8a042dcc41ca6b77c000c4317de..706dad235de3b7ffe014f564e1c68f18e1edeefc 100644
|
||||
index a158abfe3c4bafa1594701123b0e8118069f7e2b..c84feaac7ba4c10892b0e7dbea212f70ee40dec9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1157,7 +1157,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1158,7 +1158,7 @@ public final class CraftServer implements Server {
|
||||
} else if (name.equals(levelName + "_the_end")) {
|
||||
worldKey = net.minecraft.world.level.World.THE_END;
|
||||
} else {
|
||||
|
@ -76,7 +76,7 @@ index e5c78b4e7537c8a042dcc41ca6b77c000c4317de..706dad235de3b7ffe014f564e1c68f18
|
|||
}
|
||||
|
||||
WorldServer internal = (WorldServer) new WorldServer(console, console.executorService, worldSession, worlddata, worldKey, dimensionmanager, getServer().worldLoadListenerFactory.create(11),
|
||||
@@ -1247,6 +1247,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1248,6 +1248,15 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ index e87523612d0423d71eab7b9af851c1c268cdf84f..568da9686c41a41e43ede3fe15e0ca53
|
|||
return this.c;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 706dad235de3b7ffe014f564e1c68f18e1edeefc..89244c152665c97cb539bea07fedd1774ed626f1 100644
|
||||
index c84feaac7ba4c10892b0e7dbea212f70ee40dec9..281431475da39456809dae12dc981c18914586a1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -18,6 +18,7 @@ import com.mojang.serialization.Lifecycle;
|
||||
|
@ -161,7 +161,7 @@ index 706dad235de3b7ffe014f564e1c68f18e1edeefc..89244c152665c97cb539bea07fedd177
|
|||
}
|
||||
|
||||
public boolean getCommandBlockOverride(String command) {
|
||||
@@ -2497,5 +2500,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2498,5 +2501,11 @@ public final class CraftServer implements Server {
|
||||
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
|
||||
return mobGoals;
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ index bf4051349917cc1d727fc5544237e0291cb6f1e6..15b972b4a93b8fe3655acec47bc84b0f
|
|||
Main.LOGGER.info("Forcing world upgrade! {}", convertable_conversionsession.getLevelName()); // CraftBukkit
|
||||
WorldUpgrader worldupgrader = new WorldUpgrader(convertable_conversionsession, datafixer, immutableset, flag);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d9ea784758fe52782042ce4b61faa915f895b3f8..ca8ca3ada9d8074a2b67c590a98c459563513ba6 100644
|
||||
index b3ebf5cd59c827b7426069eda0cb3d47b4386792..e47c9b7b64095f2a5cf6cb365550398eeeed724f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -515,13 +515,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
@ -375,10 +375,10 @@ index ebb0d6988f87013ea5d523ab4a1b31cb669ccc43..74d826853389b8e01ffe2b076cf2b179
|
|||
return this.cache.getAndMoveToFirst(ChunkCoordIntPair.pair(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ()));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8209f188dbc932114268486a2ebd77df989a86ec..cebecee640ed5a7fc2b978e00ff7eb012228267d 100644
|
||||
index e3d68a108c0ce1786ff2899e320fb2c766782055..894c7834f8e5829058e5004829a795a1004510bf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1146,14 +1146,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1147,14 +1147,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
worlddata.checkName(name);
|
||||
worlddata.a(console.getServerModName(), console.getModded().isPresent());
|
||||
|
@ -394,7 +394,7 @@ index 8209f188dbc932114268486a2ebd77df989a86ec..cebecee640ed5a7fc2b978e00ff7eb01
|
|||
|
||||
long j = BiomeManager.a(creator.seed());
|
||||
List<MobSpawner> list = ImmutableList.of(new MobSpawnerPhantom(), new MobSpawnerPatrol(), new MobSpawnerCat(), new VillageSiege(), new MobSpawnerTrader(worlddata));
|
||||
@@ -1170,6 +1163,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1171,6 +1164,14 @@ public final class CraftServer implements Server {
|
||||
chunkgenerator = worlddimension.c();
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@ index 558af73ac16550ee6964c4dce681a404633b2552..75bcfb3a2b4a104aeebb2fe3298714b2
|
|||
public Entity b(WorldServer worldserver, PlayerTeleportEvent.TeleportCause cause) {
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 89b2be0e9e42d65b7d2d2833de4e6cd1c6e17e8e..6e1304f7169c11f67c573b2c8dc11825bcc7da0d 100644
|
||||
index ded22f1431a3e909996d6bbbc5bdf09247f46898..0ec3589df774af366a896b8dc257f138e94e6e18 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -314,6 +314,37 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -315,6 +315,37 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
// Paper end - optimise entity tracking
|
||||
|
||||
|
@ -64,7 +64,7 @@ index 89b2be0e9e42d65b7d2d2833de4e6cd1c6e17e8e..6e1304f7169c11f67c573b2c8dc11825
|
|||
public Entity(EntityTypes<?> entitytypes, World world) {
|
||||
this.id = Entity.entityCount.incrementAndGet();
|
||||
this.passengers = Lists.newArrayList();
|
||||
@@ -2299,6 +2330,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -2304,6 +2335,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
}
|
||||
|
||||
this.E();
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Fri, 9 Jul 2021 13:50:48 -0700
|
||||
Subject: [PATCH] Fix commands from signs not firing command events
|
||||
|
||||
This patch changes sign command logic so that `run_command` click events:
|
||||
- are logged to the console
|
||||
- fire PlayerCommandPreprocessEvent
|
||||
- work with double-slash commands like `//wand`
|
||||
- sends failure messages to the player who clicked the sign
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 32ac923d41d89ae170924532245bde9975bcfbd3..dc4bd421ea36779342a35e82830a05fa68b96f7b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -845,4 +845,9 @@ public class PaperWorldConfig {
|
||||
private void fixInvulnerableEndCrystalExploit() {
|
||||
fixInvulnerableEndCrystalExploit = getBoolean("unsupported-settings.fix-invulnerable-end-crystal-exploit", fixInvulnerableEndCrystalExploit);
|
||||
}
|
||||
+
|
||||
+ public boolean showSignClickCommandFailureMessagesToPlayer = false;
|
||||
+ private void showSignClickCommandFailureMessagesToPlayer() {
|
||||
+ showSignClickCommandFailureMessagesToPlayer = getBoolean("show-sign-click-command-failure-msgs-to-player", showSignClickCommandFailureMessagesToPlayer);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/commands/DelegatingCommandSource.java b/src/main/java/io/papermc/paper/commands/DelegatingCommandSource.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5c3f17163609ee81f820e4f496017d507578daf3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/commands/DelegatingCommandSource.java
|
||||
@@ -0,0 +1,42 @@
|
||||
+package io.papermc.paper.commands;
|
||||
+
|
||||
+import net.minecraft.commands.CommandListenerWrapper;
|
||||
+import net.minecraft.commands.ICommandListener;
|
||||
+import net.minecraft.network.chat.IChatBaseComponent;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+
|
||||
+import java.util.UUID;
|
||||
+
|
||||
+public class DelegatingCommandSource implements ICommandListener {
|
||||
+
|
||||
+ private final ICommandListener delegate;
|
||||
+
|
||||
+ public DelegatingCommandSource(ICommandListener delegate) {
|
||||
+ this.delegate = delegate;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void sendMessage(IChatBaseComponent message, UUID sender) {
|
||||
+ delegate.sendMessage(message, sender);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean shouldSendSuccess() {
|
||||
+ return delegate.shouldSendSuccess();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean shouldSendFailure() {
|
||||
+ return delegate.shouldSendFailure();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean shouldBroadcastCommands() {
|
||||
+ return delegate.shouldBroadcastCommands();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
|
||||
+ return delegate.getBukkitSender(wrapper);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
||||
index 7e30ec9a08d919d2ae9218ee0a11f77719129f07..4270a9bbc272706b5a88807d465a32e73d18b90f 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
||||
@@ -245,6 +245,7 @@ public class CommandDispatcher {
|
||||
return this.a(sender, newCommand, newCommand, false);
|
||||
}
|
||||
|
||||
+ public int performCommand(CommandListenerWrapper commandlistenerwrapper, String s) { return this.a(commandlistenerwrapper, s); } // Paper - OBFHELPER
|
||||
public int a(CommandListenerWrapper commandlistenerwrapper, String s) {
|
||||
return this.a(commandlistenerwrapper, s, s, true);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java
|
||||
index 7f78f388584899b13ff983f0dc37c679bfb1507e..1fc3e59551e26b25ba367b45df6024107450a444 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySign.java
|
||||
@@ -32,6 +32,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
private EnumColor color;
|
||||
public java.util.UUID signEditor; // Paper
|
||||
private static final boolean CONVERT_LEGACY_SIGNS = Boolean.getBoolean("convertLegacySigns"); // Paper
|
||||
+ private static final org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger(); // Paper
|
||||
|
||||
public TileEntitySign() {
|
||||
super(TileEntityTypes.SIGN);
|
||||
@@ -155,7 +156,18 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
ChatClickable chatclickable = chatmodifier.getClickEvent();
|
||||
|
||||
if (chatclickable.a() == ChatClickable.EnumClickAction.RUN_COMMAND) {
|
||||
- entityhuman.getMinecraftServer().getCommandDispatcher().a(this.a((EntityPlayer) entityhuman), chatclickable.b());
|
||||
+ // Paper start
|
||||
+ EntityPlayer player = (EntityPlayer) entityhuman;
|
||||
+ String command = chatclickable.b().startsWith("/") ? chatclickable.b() : "/" + chatclickable.b();
|
||||
+ if (org.spigotmc.SpigotConfig.logCommands) {
|
||||
+ LOGGER.info("{} issued server command: {}", entityhuman.getName(), command);
|
||||
+ }
|
||||
+ io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent event = new io.papermc.paper.event.player.PlayerSignCommandPreprocessEvent(player.getBukkitEntity(), command, new org.bukkit.craftbukkit.util.LazyPlayerSet(player.server), (org.bukkit.block.Sign) net.minecraft.server.MCUtil.toBukkitBlock(this.world, this.position).getState());
|
||||
+ if (!event.callEvent()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ player.server.getCommandDispatcher().performCommand(this.createCommandSourceStack(((org.bukkit.craftbukkit.entity.CraftPlayer) event.getPlayer()).getHandle()), event.getMessage());
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -188,12 +200,26 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+ public CommandListenerWrapper createCommandSourceStack(@Nullable EntityPlayer entityplayer) { return this.a(entityplayer); } // Paper - OBFHELPER
|
||||
public CommandListenerWrapper a(@Nullable EntityPlayer entityplayer) {
|
||||
String s = entityplayer == null ? "Sign" : entityplayer.getDisplayName().getString();
|
||||
Object object = entityplayer == null ? new ChatComponentText("Sign") : entityplayer.getScoreboardDisplayName();
|
||||
|
||||
+ // Paper start - send messages back to the player
|
||||
+ ICommandListener commandSource = this.world.paperConfig.showSignClickCommandFailureMessagesToPlayer ? new io.papermc.paper.commands.DelegatingCommandSource(this) {
|
||||
+ @Override
|
||||
+ public void sendMessage(net.minecraft.network.chat.IChatBaseComponent message, java.util.UUID sender) {
|
||||
+ entityplayer.sendMessage(message, sender);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean shouldSendFailure() {
|
||||
+ return true;
|
||||
+ }
|
||||
+ } : this;
|
||||
+ // Paper end
|
||||
// CraftBukkit - this
|
||||
- return new CommandListenerWrapper(this, Vec3D.a((BaseBlockPosition) this.position), Vec2F.a, (WorldServer) this.world, 2, s, (IChatBaseComponent) object, this.world.getMinecraftServer(), entityplayer);
|
||||
+ return new CommandListenerWrapper(commandSource, Vec3D.a((BaseBlockPosition) this.position), Vec2F.a, (WorldServer) this.world, 2, s, (IChatBaseComponent) object, this.world.getMinecraftServer(), entityplayer); // Paper
|
||||
}
|
||||
|
||||
public EnumColor getColor() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java
|
||||
index 8ddd246ad69a2e53749d38c369af701c161de54e..fd16506aeb92df86dd88eb3bb8091e5ab055760e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java
|
||||
@@ -50,7 +50,7 @@ public class BukkitCommandWrapper implements com.mojang.brigadier.Command<Comman
|
||||
|
||||
@Override
|
||||
public int run(CommandContext<CommandListenerWrapper> context) throws CommandSyntaxException {
|
||||
- return server.dispatchCommand(context.getSource().getBukkitSender(), context.getInput()) ? 1 : 0;
|
||||
+ return server.dispatchCommand(context.getSource().getBukkitSender(), context.getRange().get(context.getInput())) ? 1 : 0; // Paper - actually use the StringRange from context
|
||||
}
|
||||
|
||||
@Override
|
|
@ -0,0 +1,20 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Mon, 12 Jul 2021 12:28:29 +0100
|
||||
Subject: [PATCH] Use a CHM for StructureTemplate.Pallete cache
|
||||
|
||||
fixes a CME due to this collection being shared across threads
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java
|
||||
index 9b82ff37faaafc3a799413f6949fb88a993aa9a0..866b01255e9dce8a45a3224a73becab7abd7eb1f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java
|
||||
@@ -837,7 +837,7 @@ public class DefinedStructure {
|
||||
private final Map<Block, List<DefinedStructure.BlockInfo>> b;
|
||||
|
||||
private a(List<DefinedStructure.BlockInfo> list) {
|
||||
- this.b = Maps.newHashMap();
|
||||
+ this.b = Maps.newConcurrentMap(); // Paper - Use CHM
|
||||
this.a = list;
|
||||
}
|
||||
|
96
Spigot-Server-Patches/0762-Backport-Spigot-891-PR.patch
Normal file
96
Spigot-Server-Patches/0762-Backport-Spigot-891-PR.patch
Normal file
|
@ -0,0 +1,96 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Fri, 23 Jul 2021 19:34:50 +0100
|
||||
Subject: [PATCH] Backport Spigot-891 PR
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index 0be39dac4b9dd69d7d73d86d64cf1e33e4086e81..3bfb0e2f18d86776d79576e657e0fecefb562ae8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -15,6 +15,7 @@ import java.util.concurrent.Future;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Consumer;
|
||||
+import java.util.function.IntUnaryOperator; // Paper - Backport Spigot-#891
|
||||
import java.util.logging.Level;
|
||||
import com.destroystokyo.paper.ServerSchedulerReportingWrapper;
|
||||
import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
||||
@@ -48,10 +49,26 @@ import org.bukkit.scheduler.BukkitWorker;
|
||||
public class CraftScheduler implements BukkitScheduler {
|
||||
|
||||
static Plugin MINECRAFT = new MinecraftInternalPlugin();
|
||||
+ // Paper start - Backport Spigot-#891
|
||||
+ /**
|
||||
+ * The start ID for the counter.
|
||||
+ */
|
||||
+ private static final int START_ID = 1;
|
||||
+ /**
|
||||
+ * Increment the {@link #ids} field and reset it to the {@link #START_ID} if it reaches {@link Integer#MAX_VALUE}
|
||||
+ */
|
||||
+ private static final IntUnaryOperator INCREMENT_IDS = previous -> {
|
||||
+ // We reached the end, go back to the start!
|
||||
+ if (previous == Integer.MAX_VALUE) {
|
||||
+ return START_ID;
|
||||
+ }
|
||||
+ return previous + 1;
|
||||
+ };
|
||||
+ // Paper end
|
||||
/**
|
||||
* Counter for IDs. Order doesn't matter, only uniqueness.
|
||||
*/
|
||||
- private final AtomicInteger ids = new AtomicInteger(1);
|
||||
+ private final AtomicInteger ids = new AtomicInteger(START_ID); // Paper - Backport Spigot-#891
|
||||
/**
|
||||
* Current head of linked-list. This reference is always stale, {@link CraftTask#next} is the live reference.
|
||||
*/
|
||||
@@ -70,7 +87,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
int value = Long.compare(o1.getNextRun(), o2.getNextRun());
|
||||
|
||||
// If the tasks should run on the same tick they should be run FIFO
|
||||
- return value != 0 ? value : Integer.compare(o1.getTaskId(), o2.getTaskId());
|
||||
+ return value != 0 ? value : Long.compare(o1.getCreatedAt(), o2.getCreatedAt()); // Paper - Backport Spigot-#891
|
||||
}
|
||||
});
|
||||
/**
|
||||
@@ -539,7 +556,14 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
}
|
||||
|
||||
private int nextId() {
|
||||
- return ids.incrementAndGet();
|
||||
+ // Paper start - Backport Spigot-#891
|
||||
+ Validate.isTrue(runners.size() < Integer.MAX_VALUE, "There are already " + Integer.MAX_VALUE + " tasks scheduled! Cannot schedule more.");
|
||||
+ int id;
|
||||
+ do {
|
||||
+ id = ids.updateAndGet(INCREMENT_IDS);
|
||||
+ } while (runners.containsKey(id)); // Avoid generating duplicate IDs
|
||||
+ return id;
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
void parsePending() { // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
index 3c96807e97657502849093e4371e9fef3584a346..8b4c34282f14f17d4efbddfdc63c49110ba068fe 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||
@@ -34,6 +34,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
|
||||
public Timing timings; // Paper
|
||||
private final Plugin plugin;
|
||||
private final int id;
|
||||
+ private final long createdAt = System.nanoTime(); // Paper - Backport Spigot-#891
|
||||
|
||||
CraftTask() {
|
||||
this(null, null, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING);
|
||||
@@ -104,6 +105,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
|
||||
} // Paper
|
||||
}
|
||||
|
||||
+ // Paper start - Backport Spigot-#891
|
||||
+ long getCreatedAt() {
|
||||
+ return createdAt;
|
||||
+ }
|
||||
+ // paper end
|
||||
+
|
||||
long getPeriod() {
|
||||
return period;
|
||||
}
|
31
Spigot-Server-Patches/0763-Adds-PlayerArmSwingEvent.patch
Normal file
31
Spigot-Server-Patches/0763-Adds-PlayerArmSwingEvent.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Fri, 12 Mar 2021 19:22:21 -0800
|
||||
Subject: [PATCH] Adds PlayerArmSwingEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayInArmAnimation.java b/src/main/java/net/minecraft/network/protocol/game/PacketPlayInArmAnimation.java
|
||||
index ab9ef34782f483bb297a8cdd82eb3388bd2df706..a463aca7279e1ae69598b609fad2a08ceda1e23b 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayInArmAnimation.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayInArmAnimation.java
|
||||
@@ -29,6 +29,7 @@ public class PacketPlayInArmAnimation implements Packet<PacketListenerPlayIn> {
|
||||
packetlistenerplayin.a(this);
|
||||
}
|
||||
|
||||
+ public EnumHand getHand() { return b(); } // Paper - OBFHELPER
|
||||
public EnumHand b() {
|
||||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
index 4001078e2a408dfd5a93c21f55a58c1fde32abbb..7044620e7fb5874913e7911adb606668a76ac0de 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -2224,7 +2224,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
// Arm swing animation
|
||||
- PlayerAnimationEvent event = new PlayerAnimationEvent(this.getPlayer());
|
||||
+ io.papermc.paper.event.player.PlayerArmSwingEvent event = new io.papermc.paper.event.player.PlayerArmSwingEvent(this.getPlayer(), packetplayinarmanimation.getHand() == EnumHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND); // Paper
|
||||
this.server.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) return;
|
|
@ -0,0 +1,91 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Wed, 25 Aug 2021 13:19:53 -0700
|
||||
Subject: [PATCH] Vanilla command permission fixes
|
||||
|
||||
Fixes permission checks for vanilla commands which don't have a
|
||||
requirement, as well as for namespaced vanilla commands.
|
||||
|
||||
diff --git a/src/main/java/com/mojang/brigadier/builder/ArgumentBuilder.java b/src/main/java/com/mojang/brigadier/builder/ArgumentBuilder.java
|
||||
index 899008b2980d13f1be6280cd8cb959c53a29bebf..f875507241ac6769545e91cd3285232b75b892f0 100644
|
||||
--- a/src/main/java/com/mojang/brigadier/builder/ArgumentBuilder.java
|
||||
+++ b/src/main/java/com/mojang/brigadier/builder/ArgumentBuilder.java
|
||||
@@ -14,9 +14,17 @@ import java.util.Collections;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public abstract class ArgumentBuilder<S, T extends ArgumentBuilder<S, T>> {
|
||||
+ // Paper start
|
||||
+ private static final Predicate<Object> DEFAULT_REQUIREMENT = s -> true;
|
||||
+
|
||||
+ @SuppressWarnings("unchecked")
|
||||
+ public static <S> Predicate<S> defaultRequirement() {
|
||||
+ return (Predicate<S>) DEFAULT_REQUIREMENT;
|
||||
+ }
|
||||
+ // Paper end
|
||||
private final RootCommandNode<S> arguments = new RootCommandNode<>();
|
||||
private Command<S> command;
|
||||
- private Predicate<S> requirement = s -> true;
|
||||
+ private Predicate<S> requirement = defaultRequirement(); // Paper
|
||||
private CommandNode<S> target;
|
||||
private RedirectModifier<S> modifier = null;
|
||||
private boolean forks;
|
||||
diff --git a/src/main/java/com/mojang/brigadier/tree/CommandNode.java b/src/main/java/com/mojang/brigadier/tree/CommandNode.java
|
||||
index c0fac7369b111e65b896a15848ae22457e5e8914..fd310f5d009801492def4af943322a3b9859f9c6 100644
|
||||
--- a/src/main/java/com/mojang/brigadier/tree/CommandNode.java
|
||||
+++ b/src/main/java/com/mojang/brigadier/tree/CommandNode.java
|
||||
@@ -30,7 +30,7 @@ public abstract class CommandNode<S> implements Comparable<CommandNode<S>> {
|
||||
private Map<String, CommandNode<S>> children = Maps.newTreeMap(); //Paper - Switch to tree map for automatic sorting
|
||||
private Map<String, LiteralCommandNode<S>> literals = Maps.newLinkedHashMap();
|
||||
private Map<String, ArgumentCommandNode<S, ?>> arguments = Maps.newLinkedHashMap();
|
||||
- private final Predicate<S> requirement;
|
||||
+ public Predicate<S> requirement; // Paper - Vanilla command permission fixes (private final -> public)
|
||||
private final CommandNode<S> redirect;
|
||||
private final RedirectModifier<S> modifier;
|
||||
private final boolean forks;
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
||||
index 4270a9bbc272706b5a88807d465a32e73d18b90f..3d255c2ed31d7267bb6cd789702063671d785018 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
||||
@@ -197,6 +197,13 @@ public class CommandDispatcher {
|
||||
CommandPublish.a(this.b);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ for (final CommandNode<CommandListenerWrapper> node : this.dispatcher().getRoot().getChildren()) {
|
||||
+ if (node.getRequirement() == com.mojang.brigadier.builder.ArgumentBuilder.<CommandListenerWrapper>defaultRequirement()) {
|
||||
+ node.requirement = stack -> stack.base == ICommandListener.DUMMY || stack.getBukkitSender().hasPermission(org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(node));
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
this.b.findAmbiguities((commandnode, commandnode1, commandnode2, collection) -> {
|
||||
// CommandDispatcher.LOGGER.warn("Ambiguity between arguments {} and {} with inputs: {}", this.b.getPath(commandnode1), this.b.getPath(commandnode2), collection); // CraftBukkit
|
||||
});
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
index 56a0665127c7c55049b8438c91e72b6881ed11e0..c87fa1b2378f25307fff6acbcbc178e5cafd50e4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
@@ -87,7 +87,23 @@ public final class VanillaCommandWrapper extends BukkitCommand {
|
||||
}
|
||||
|
||||
public static String getPermission(CommandNode<CommandListenerWrapper> vanillaCommand) {
|
||||
- return "minecraft.command." + ((vanillaCommand.getRedirect() == null) ? vanillaCommand.getName() : vanillaCommand.getRedirect().getName());
|
||||
+ // Paper start
|
||||
+ final String commandName;
|
||||
+ if (vanillaCommand.getRedirect() == null) {
|
||||
+ commandName = vanillaCommand.getName();
|
||||
+ } else {
|
||||
+ commandName = vanillaCommand.getRedirect().getName();
|
||||
+ }
|
||||
+ return "minecraft.command." + stripDefaultNamespace(commandName);
|
||||
+ }
|
||||
+
|
||||
+ private static String stripDefaultNamespace(final String maybeNamespaced) {
|
||||
+ final String prefix = "minecraft:";
|
||||
+ if (maybeNamespaced.startsWith(prefix)) {
|
||||
+ return maybeNamespaced.substring(prefix.length());
|
||||
+ }
|
||||
+ return maybeNamespaced;
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
private String toDispatcher(String[] args, String name) {
|
22
Spigot-Server-Patches/0765-Remove-duplicate-code.patch
Normal file
22
Spigot-Server-Patches/0765-Remove-duplicate-code.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 29 Aug 2021 20:24:17 +0100
|
||||
Subject: [PATCH] Remove duplicate code
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/ContainerFurnace.java b/src/main/java/net/minecraft/world/inventory/ContainerFurnace.java
|
||||
index 14cc1f15ae3af5b7e0996eab7ecc895546a4ed8c..4fbc84be10ec7f9ecd6df25e96b974b9e121c39f 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/ContainerFurnace.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/ContainerFurnace.java
|
||||
@@ -89,11 +89,6 @@ public abstract class ContainerFurnace extends ContainerRecipeBook<IInventory> {
|
||||
this.furnace.clear();
|
||||
}
|
||||
|
||||
- @Override
|
||||
- public void a(boolean flag, IRecipe<?> irecipe, EntityPlayer entityplayer) {
|
||||
- (new AutoRecipeFurnace(this)).a(entityplayer, irecipe, flag); // CraftBukkit - decompile error
|
||||
- }
|
||||
-
|
||||
@Override
|
||||
public boolean a(IRecipe<? super IInventory> irecipe) {
|
||||
return irecipe.a(this.furnace, this.c);
|
|
@ -0,0 +1,49 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Sat, 16 Oct 2021 17:38:35 -0700
|
||||
Subject: [PATCH] Use correct WorldDimension registry when loading default
|
||||
end/nether
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/IRegistry.java b/src/main/java/net/minecraft/core/IRegistry.java
|
||||
index 4f04d8081912e0fe771f0db9e086c789328f246f..2262c1b30682c445a5c370e267a0fce96244fdb8 100644
|
||||
--- a/src/main/java/net/minecraft/core/IRegistry.java
|
||||
+++ b/src/main/java/net/minecraft/core/IRegistry.java
|
||||
@@ -391,6 +391,7 @@ public abstract class IRegistry<T> implements Codec<T>, Keyable, Registry<T> {
|
||||
@Override
|
||||
public abstract int a(@Nullable T t0);
|
||||
|
||||
+ @Nullable public final T get(@Nullable ResourceKey<T> resourcekey) { return this.a(resourcekey); } // Paper - OBFHELPER
|
||||
@Nullable
|
||||
public abstract T a(@Nullable ResourceKey<T> resourcekey);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index bf80e870e6a2a6fe1d4ae1bea355bcd7a0735d3b..0737009363635c677246642f371847c9100e49a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -523,7 +523,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
long i = generatorsettings.getSeed();
|
||||
long j = BiomeManager.a(i);
|
||||
List<MobSpawner> list = ImmutableList.of(new MobSpawnerPhantom(), new MobSpawnerPatrol(), new MobSpawnerCat(), new VillageSiege(), new MobSpawnerTrader(iworlddataserver));
|
||||
- WorldDimension worlddimension = (WorldDimension) registrymaterials.a(dimensionKey);
|
||||
+ // Paper start - Use correct WorldDimension registry
|
||||
+ WorldDimension worlddimension = generatorsettings.dimensions().get(dimensionKey);
|
||||
+ if (worlddimension == null) {
|
||||
+ worlddimension = registrymaterials.get(dimensionKey);
|
||||
+ }
|
||||
+ // Paper end
|
||||
DimensionManager dimensionmanager;
|
||||
ChunkGenerator chunkgenerator;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/GeneratorSettings.java b/src/main/java/net/minecraft/world/level/levelgen/GeneratorSettings.java
|
||||
index 5d9fd65b91ed7f3d66f36e900b12522876e0e22f..b345a08d47319a038f64c3d5a01292342b266a6e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/GeneratorSettings.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/GeneratorSettings.java
|
||||
@@ -140,6 +140,7 @@ public class GeneratorSettings {
|
||||
return registrymaterials1;
|
||||
}
|
||||
|
||||
+ public final RegistryMaterials<WorldDimension> dimensions() { return this.d(); } // Paper - OBFHELPER
|
||||
public RegistryMaterials<WorldDimension> d() {
|
||||
return this.f;
|
||||
}
|
19
Spigot-Server-Patches/0767-Update-log4j.patch
Normal file
19
Spigot-Server-Patches/0767-Update-log4j.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nassim Jahnke <jahnke.nassim@gmail.com>
|
||||
Date: Thu, 9 Dec 2021 21:30:08 +0100
|
||||
Subject: [PATCH] Update log4j
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 1a9204c869dd36e80932b1366352db15ebd70723..48495ad71339c142a62839824a98c02011645207 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -30,7 +30,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-bom</artifactId>
|
||||
- <version>2.11.2</version>
|
||||
+ <version>2.17.0</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
|
@ -110,6 +110,7 @@ fi
|
|||
|
||||
# dont forget \ at end of each line but last
|
||||
importLibrary com.mojang authlib com/mojang/authlib yggdrasil/YggdrasilGameProfileRepository.java
|
||||
importLibrary com.mojang brigadier com/mojang/brigadier/builder ArgumentBuilder.java
|
||||
importLibrary com.mojang datafixerupper com/mojang/datafixers DataFixerBuilder.java
|
||||
importLibrary com.mojang datafixerupper com/mojang/datafixers/util Either.java
|
||||
importLibrary com.mojang datafixerupper com/mojang/serialization/codecs KeyDispatchCodec.java
|
||||
|
|
Loading…
Reference in a new issue