mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9ae3f10f SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API 48c0c547 PR-786: Add methods to get sounds from entities CraftBukkit Changes: 5cc9c022a SPIGOT-7152: Handle hand item changing during air interact event 4ffa1acf6 SPIGOT-7154: Players get kicked when interacting with a conversation 4daa21123 SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API e5d6a9bbf PR-1100: Add methods to get sounds from entities b7e9f1c8b SPIGOT-7146: Reduce use of Material switch in ItemMeta Spigot Changes: 4c157bb4 Rebuild patches
This commit is contained in:
parent
51183af967
commit
ef0e5a642d
@ -1805,10 +1805,10 @@ index 9566e4306ada5e82dede0f002aa06da12c44996b..4d5f0837bd0e02a30c943d8969fb6b13
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 922d33ff4fa9d901d3c5c0a9f8399ad8aef62c37..cd287978c34873c7122794e4f3e762915978a1f0 100644
|
||||
index 259d878ddd4e4e2b289c0de0325ca8fd6203c484..a829779ac56a271cad463806984991b4713a27be 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a base entity in the world
|
||||
*/
|
||||
@ -1817,7 +1817,7 @@ index 922d33ff4fa9d901d3c5c0a9f8399ad8aef62c37..cd287978c34873c7122794e4f3e76291
|
||||
|
||||
/**
|
||||
* Gets the entity's current position
|
||||
@@ -656,4 +656,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -683,4 +683,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index cd287978c34873c7122794e4f3e762915978a1f0..c315d2494969190f8b53236f905ad5c5cf1bfc39 100644
|
||||
index a829779ac56a271cad463806984991b4713a27be..20c529bdd94a6bac09d9f8222f33dfc9e8d53fa9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -671,5 +671,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -698,5 +698,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
|
||||
return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.customName())));
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add methods for working with arrows stuck in living entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 9f876af2324ebb1f299fbebc8c66d551df7463f0..ba64745a77821ecb8626aca4c8df264c93835270 100644
|
||||
index 2b816f0e6bdb912ceeff82c0043272b3970fe243..f00502b59f15c3a92ce18e7d1aa4e546fd45b16a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -620,4 +620,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -689,4 +689,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @return Whether the entity is invisible
|
||||
*/
|
||||
public boolean isInvisible();
|
||||
|
@ -7,10 +7,10 @@ Get the Entity being boosted
|
||||
Get the firework launcher
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java
|
||||
index 05e86cb9d826cdf14490fa649348d46c51adbfdb..d616d5941b3c7b85e350e845901da798601b9a3c 100644
|
||||
index e750b34d7d067a5f2f5587853274b6f479cc4fd6..0d31aa0b22cf1e849572294e2cfe38b48c9210af 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Firework.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Firework.java
|
||||
@@ -43,4 +43,15 @@ public interface Firework extends Projectile {
|
||||
@@ -111,4 +111,20 @@ public interface Firework extends Projectile {
|
||||
* @param shotAtAngle the new shotAtAngle
|
||||
*/
|
||||
void setShotAtAngle(boolean shotAtAngle);
|
||||
@ -20,9 +20,14 @@ index 05e86cb9d826cdf14490fa649348d46c51adbfdb..d616d5941b3c7b85e350e845901da798
|
||||
+ public java.util.UUID getSpawningEntity();
|
||||
+ /**
|
||||
+ * If this firework is boosting an entity, return it
|
||||
+ * @deprecated use {@link #getAttachedTo()}
|
||||
+ * @see #setAttachedTo(LivingEntity)
|
||||
+ * @return The entity being boosted
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.Nullable
|
||||
+ public LivingEntity getBoostedEntity();
|
||||
+ @Deprecated
|
||||
+ default LivingEntity getBoostedEntity() {
|
||||
+ return getAttachedTo();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
@ -90,10 +90,10 @@ index 91fc11dda99de506be83d40df8929bf7cd8e8d85..7dc631ebd009f5f5c3ac1699c3f3515c
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 2cf43eac30187a43a01c81b3021b2cfec0d4ba8a..864941be2d07de08f63e740ad2becf1dc5790433 100644
|
||||
index 652238659e0a6e0df11f2798773aea4fe7712360..9c57eda3b7af7026639afda9959bc5e5a720861a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -21,6 +21,11 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder {
|
||||
|
||||
@ -106,10 +106,10 @@ index 2cf43eac30187a43a01c81b3021b2cfec0d4ba8a..864941be2d07de08f63e740ad2becf1d
|
||||
* Returns the name of this player
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index be9334a8b5fba9181ad63c211697e798be63da25..0514a141cb93a650be38c63d4336d46e4304f4b6 100644
|
||||
index 6f117995c3ccf9182946c01a663cd8bef1804eb3..00266bf81b022a0f4b4f71061b82a8713b773320 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -8,6 +8,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -9,6 +9,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface Mob extends LivingEntity, Lootable {
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 864941be2d07de08f63e740ad2becf1dc5790433..bcdf267485f1d68ccc7ea105d5d40bc9bc9db2a2 100644
|
||||
index 9c57eda3b7af7026639afda9959bc5e5a720861a..be3eaadbc768a306da68a15abcaa7a5d3ec760c7 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -318,6 +318,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -319,6 +319,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public int getExpToLevel();
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index c315d2494969190f8b53236f905ad5c5cf1bfc39..b9a61d06d72831dc0c591e129553453a537d3785 100644
|
||||
index 20c529bdd94a6bac09d9f8222f33dfc9e8d53fa9..e598c7c90d625313b8a935418bb68e0e6cb6bc6e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -681,5 +681,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -708,5 +708,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
@Nullable
|
||||
Location getOrigin();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] LivingEntity#setKiller
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index b41133f23d25f90fc0993499056c4eeaf003a701..bfc90a3569abc717f37c064e3068c55ef323edab 100644
|
||||
index f00502b59f15c3a92ce18e7d1aa4e546fd45b16a..036936671d816fc553ad2fdf8324609ab610b7f5 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -279,6 +279,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -281,6 +281,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@Nullable
|
||||
public Player getKiller();
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index bcdf267485f1d68ccc7ea105d5d40bc9bc9db2a2..bd9222b9b5e7ec1f3aebe37838775f345e868150 100644
|
||||
index be3eaadbc768a306da68a15abcaa7a5d3ec760c7..13b74e942012169611f2791f8b4493d04710e4c0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -479,6 +479,14 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -480,6 +480,14 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
@Deprecated
|
||||
public void setShoulderEntityRight(@Nullable Entity entity);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 08ce9cb5a44f62dc3138c45aab947a52a24d3e37..dbe8511d97bfd6361177f66ae638af0c3be19a04 100644
|
||||
index 036936671d816fc553ad2fdf8324609ab610b7f5..75629874849e4cdcf0465b653f27baaca5247fea 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -643,5 +643,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -712,5 +712,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @param arrows Number of arrows to stick in this entity
|
||||
*/
|
||||
void setArrowsStuck(int arrows);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
||||
How long an entity has raised hands to charge an attack or use an item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index bd9222b9b5e7ec1f3aebe37838775f345e868150..34c2ae10e2a230ef88a756cf2024edcda2429fbf 100644
|
||||
index 13b74e942012169611f2791f8b4493d04710e4c0..9c711d0b2c2f7b0c0603847590e8a1a94f091ff0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -307,7 +307,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -308,7 +308,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*
|
||||
* @return the item being used by the player, or null if they are not using
|
||||
* an item
|
||||
@ -20,10 +20,10 @@ index bd9222b9b5e7ec1f3aebe37838775f345e868150..34c2ae10e2a230ef88a756cf2024edcd
|
||||
public ItemStack getItemInUse();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index dbe8511d97bfd6361177f66ae638af0c3be19a04..06896b9690a939ade2167da1a19239df2dcdba8f 100644
|
||||
index 75629874849e4cdcf0465b653f27baaca5247fea..c80e75b72ac863db19e3d234e349876dd8797924 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -657,5 +657,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -726,5 +726,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @param delay Delay in ticks
|
||||
*/
|
||||
void setShieldBlockingDelay(int delay);
|
||||
|
@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
||||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 34c2ae10e2a230ef88a756cf2024edcda2429fbf..f97521acad823ffce08faefc81e3b6a9a374410e 100644
|
||||
index 9c711d0b2c2f7b0c0603847590e8a1a94f091ff0..8f489abbb7e80d869ca0f6e8626cecbd453b625a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -158,6 +158,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -159,6 +159,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public void closeInventory();
|
||||
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API
|
||||
Get the chunk the entity is currently registered to
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index b9a61d06d72831dc0c591e129553453a537d3785..df07eb07896790a09d1022daef5cffc6a435f739 100644
|
||||
index e598c7c90d625313b8a935418bb68e0e6cb6bc6e..c6f14159067a14afd44378aaa9ac840aba2e2f9c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.entity;
|
||||
@ -17,7 +17,7 @@ index b9a61d06d72831dc0c591e129553453a537d3785..df07eb07896790a09d1022daef5cffc6
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Nameable;
|
||||
@@ -688,5 +689,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -715,5 +716,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* @return True if entity spawned from a mob spawner
|
||||
*/
|
||||
boolean fromMobSpawner();
|
||||
|
@ -495,10 +495,10 @@ index 324fca7bf480a463adb30842fa169052534f5252..3e3682be2a1afe92ccdc9a1d97469a69
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index df07eb07896790a09d1022daef5cffc6a435f739..7a05615ec7678338801bcae2ec9a029b13d323d2 100644
|
||||
index c6f14159067a14afd44378aaa9ac840aba2e2f9c..8751ba50a0e5d00839885ad5a905eb727445b749 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -163,6 +163,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -164,6 +164,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
public boolean teleport(@NotNull Entity destination, @NotNull TeleportCause cause);
|
||||
|
||||
|
@ -65,10 +65,10 @@ index 0000000000000000000000000000000000000000..18a96dbb01d3b34476652264b2d6be37
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 1dd9f7ac1f26c253b8181519aa1873784bc54a07..a4b1ae0caea94882f601a0420354838c6a52ef28 100644
|
||||
index c80e75b72ac863db19e3d234e349876dd8797924..c29846df0469535870e1743eee25325a4f092a6d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -81,6 +81,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -83,6 +83,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@NotNull
|
||||
public Block getTargetBlock(@Nullable Set<Material> transparent, int maxDistance);
|
||||
|
||||
|
@ -230,18 +230,18 @@ index 0000000000000000000000000000000000000000..43f062257472a06e9e64c2feef6c3b10
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index 0514a141cb93a650be38c63d4336d46e4304f4b6..cc30b4e22ee238de13f031398fc566f4123694ff 100644
|
||||
index 00266bf81b022a0f4b4f71061b82a8713b773320..dcaddf4a1e3d954565f2110224be8e7d5c597a0a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.bukkit.entity;
|
||||
@@ -2,6 +2,7 @@ package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.loot.Lootable;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
@@ -11,6 +12,13 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
@@ -12,6 +13,13 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
// Paper start
|
||||
@Override
|
||||
org.bukkit.inventory.@org.jetbrains.annotations.NotNull EntityEquipment getEquipment();
|
||||
|
@ -49,10 +49,10 @@ index 0000000000000000000000000000000000000000..f52644fab1522bdf83ff4f489e9805b2
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index a4b1ae0caea94882f601a0420354838c6a52ef28..f479e8c26e88520a47f7beeec753b3af9978bde1 100644
|
||||
index c29846df0469535870e1743eee25325a4f092a6d..63b39fe0f2c8c529e289c69969588a98dd7fc758 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -150,6 +150,50 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -152,6 +152,50 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
@Nullable
|
||||
public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);
|
||||
|
@ -26,10 +26,10 @@ index 3e3682be2a1afe92ccdc9a1d97469a69f952a9ed..8f7536e5ef73328cb69f7214956aac58
|
||||
* Gets the full in-game time on this world since the world generation
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index cc30b4e22ee238de13f031398fc566f4123694ff..55c5227a340e34621160afc9fae3ea843492881d 100644
|
||||
index dcaddf4a1e3d954565f2110224be8e7d5c597a0a..4a7ffd617c2a660a4d2e9d10f54add2391f832b9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -19,6 +19,13 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
@@ -20,6 +20,13 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
*/
|
||||
@NotNull
|
||||
com.destroystokyo.paper.entity.Pathfinder getPathfinder();
|
||||
|
@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners,
|
||||
or DEFAULT since data was not stored.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 7a05615ec7678338801bcae2ec9a029b13d323d2..634f3b5dd22bf439aaec7c3ecfb3477b66e994e8 100644
|
||||
index 8751ba50a0e5d00839885ad5a905eb727445b749..f17f30a9969e52313387c0d92edd980f72687a11 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -727,5 +727,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -754,5 +754,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
// TODO remove impl here
|
||||
return getLocation().getChunk();
|
||||
}
|
||||
|
@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..f0067c2e953d18e1a33536980071ba3f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 356e516790c4e38d8dac6a106f824787a0ee19ba..33e58114c98a75c14f576db29fe0b658fcec6e15 100644
|
||||
index 63b39fe0f2c8c529e289c69969588a98dd7fc758..54046c5810f9f6f3f28e815a210617683139509d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -809,5 +809,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -878,5 +878,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
@NotNull
|
||||
org.bukkit.inventory.EquipmentSlot getHandRaised();
|
||||
|
@ -8,10 +8,10 @@ Adds a new method to fetch the location of a player's bed without generating any
|
||||
getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index f97521acad823ffce08faefc81e3b6a9a374410e..876215c84cf6915f5af131da38d97c20580c0292 100644
|
||||
index 8f489abbb7e80d869ca0f6e8626cecbd453b625a..0775c1061a72af66344ec45248b50072c394da38 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -248,6 +248,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -249,6 +249,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public int getSleepTicks();
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add entity liquid API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 634f3b5dd22bf439aaec7c3ecfb3477b66e994e8..1c9d0e6541d41972f9966b83cbba02f6b230a72c 100644
|
||||
index f17f30a9969e52313387c0d92edd980f72687a11..587bf31ed2b2edc7d467d226c91c2bccdd1e4044 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -733,5 +733,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -760,5 +760,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
@NotNull
|
||||
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 33e58114c98a75c14f576db29fe0b658fcec6e15..5192d2472bece141b0990d48a3373a6fb4e1fea6 100644
|
||||
index 54046c5810f9f6f3f28e815a210617683139509d..2c559c590b96753aa5dc2db2bacca32d8afad352 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -829,5 +829,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -898,5 +898,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @param jumping entity jump state
|
||||
*/
|
||||
void setJumping(boolean jumping);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 876215c84cf6915f5af131da38d97c20580c0292..cbeb9d1b99759cf3cd65895ff54fa7eabf511f3a 100644
|
||||
index 0775c1061a72af66344ec45248b50072c394da38..7e23e157eb70e6bf94d0ac4a0196cc5c943dcac4 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -153,6 +153,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -154,6 +154,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@Nullable
|
||||
public InventoryView openMerchant(@NotNull Merchant merchant, boolean force);
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 1c9d0e6541d41972f9966b83cbba02f6b230a72c..718af7c49ab8cc232bf72cecdef8a90e2595e835 100644
|
||||
index 587bf31ed2b2edc7d467d226c91c2bccdd1e4044..895ccd46d6792210ac9e53093111bd9439e1a41c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -763,5 +763,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -790,5 +790,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* Check if entity is in lava
|
||||
*/
|
||||
public boolean isInLava();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Clarify the Javadocs for Entity.getEntitySpawnReason()
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 718af7c49ab8cc232bf72cecdef8a90e2595e835..e3de56ffa7b3a554755a7401988945eca655d816 100644
|
||||
index 895ccd46d6792210ac9e53093111bd9439e1a41c..b9701e29d4bf2fbcc08bfacf3ebfb275fc0ae8b0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -729,7 +729,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -756,7 +756,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 5192d2472bece141b0990d48a3373a6fb4e1fea6..aa1b76a0633e223fbae0897cb0690fdd7e9f4c40 100644
|
||||
index 2c559c590b96753aa5dc2db2bacca32d8afad352..8375cbdb79e82afebbcc18f85e874238f18cda50 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -780,6 +780,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -849,6 +849,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@NotNull
|
||||
org.bukkit.inventory.ItemStack getActiveItem();
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose LivingEntity hurt direction
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index aa1b76a0633e223fbae0897cb0690fdd7e9f4c40..a8ccf7f0a74a8295bbb921e24eed626c15104b8c 100644
|
||||
index 8375cbdb79e82afebbcc18f85e874238f18cda50..a6c0b5e55adadd78619d251d979e9e46068a637e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -859,5 +859,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -928,5 +928,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @param quantity quantity of item
|
||||
*/
|
||||
void playPickupItemAnimation(@NotNull Item item, int quantity);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose Tracked Players
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index e3de56ffa7b3a554755a7401988945eca655d816..898c005cb715235df8d7ed6a98faa8191af2fd91 100644
|
||||
index b9701e29d4bf2fbcc08bfacf3ebfb275fc0ae8b0..fd9bc146a06e06d0967d9c45421aec460e49bab6 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -768,5 +768,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -795,5 +795,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* Check if entity is inside a ticking chunk
|
||||
*/
|
||||
public boolean isTicking();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index cbeb9d1b99759cf3cd65895ff54fa7eabf511f3a..f9531c0f909c7caeddfb8f06ef9a11469ba7d434 100644
|
||||
index 7e23e157eb70e6bf94d0ac4a0196cc5c943dcac4..29885c7184dbec82a6de69c39878276392779d71 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -327,6 +327,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -328,6 +328,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public void setCooldown(@NotNull Material material, int ticks);
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Mob#lookAt API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index 55c5227a340e34621160afc9fae3ea843492881d..07bedbc15ba2463d3c629ae68d229286d4033f79 100644
|
||||
index 4a7ffd617c2a660a4d2e9d10f54add2391f832b9..c6d8622fba3397cf3434726f1d7c49e95b887e46 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -26,6 +26,88 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
@@ -27,6 +27,88 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
* @return True if mob is exposed to daylight
|
||||
*/
|
||||
boolean isInDaylight();
|
||||
|
@ -23,10 +23,10 @@ index aa534b1a9a1fb84a2fbd4b372f313bb4b63325fa..43b53c21af01e0f496c8aaacff82dfdf
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 087a9c54bc11d5d87aa90bf9d8e66fdac2c44457..5238d83788ef39db1f86c22a0b27648cc47a215b 100644
|
||||
index a6c0b5e55adadd78619d251d979e9e46068a637e..d47706a915ae1bfaa3187a83cb6d35ea202c03d0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -482,6 +482,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -484,6 +484,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
public boolean hasLineOfSight(@NotNull Entity other);
|
||||
|
||||
|
@ -420,13 +420,13 @@ index 479f7a7c54c85cb685f56e60906650d1989c03ff..60267ee382de80fab86b440ff72a2455
|
||||
+}
|
||||
+// Paper end
|
||||
diff --git a/src/main/java/org/bukkit/entity/Raider.java b/src/main/java/org/bukkit/entity/Raider.java
|
||||
index 9a99b8ca1ec9c3c88b29275c88b1221e1b22bcef..756b4a7794ea0905abd4e4fe777f69ffe36658f5 100644
|
||||
index 987f9b0866b213450b4de1310600161c8587a545..144fdcfd1f35b6346b672006905aedb8a3773018 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Raider.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Raider.java
|
||||
@@ -47,4 +47,20 @@ public interface Raider extends Monster {
|
||||
* @param join CanJoinRaid status
|
||||
@@ -57,4 +57,20 @@ public interface Raider extends Monster {
|
||||
*/
|
||||
void setCanJoinRaid(boolean join);
|
||||
@NotNull
|
||||
Sound getCelebrationSound();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 5238d83788ef39db1f86c22a0b27648cc47a215b..8fa8922ad2fb0ea8f770368faff61e56e9761df9 100644
|
||||
index d47706a915ae1bfaa3187a83cb6d35ea202c03d0..4af5e8d0cba6555f7615e4e809d9aff221c0dc4d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -335,6 +335,36 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -337,6 +337,36 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
public void setArrowsInBody(int count);
|
||||
|
||||
|
@ -5,13 +5,13 @@ Subject: [PATCH] Left handed API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index 07bedbc15ba2463d3c629ae68d229286d4033f79..984ad873f36c3dcc73703eb6902c4eab5f1e72b6 100644
|
||||
index c6d8622fba3397cf3434726f1d7c49e95b887e46..12ebceec3eb6f4c3325e6c6a592676795a988136 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -148,4 +148,20 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
* @return whether the mob is aware
|
||||
@@ -162,4 +162,20 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
*/
|
||||
public boolean isAware();
|
||||
@Nullable
|
||||
public Sound getAmbientSound();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
|
@ -24,10 +24,10 @@ index be8d5c172b0a300648f21e2163ccf0a9cd7915ee..4fcafddf3792b66c618f91e04d102f37
|
||||
* Return the translation key for the Material, so the client can translate it into the active
|
||||
* locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 898c005cb715235df8d7ed6a98faa8191af2fd91..9b46e42fcd803c2f0fb46b220ed79d69b1d16fc4 100644
|
||||
index fd9bc146a06e06d0967d9c45421aec460e49bab6..f1cb02f7891e47b7c8328bfd62437deed93226b3 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -775,5 +775,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -802,5 +802,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* @return players in tracking range
|
||||
*/
|
||||
@NotNull Set<Player> getTrackedPlayers();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity powdered snow API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 9b46e42fcd803c2f0fb46b220ed79d69b1d16fc4..9c31424a297b9b727ac4ad13040eb9e5674b716b 100644
|
||||
index f1cb02f7891e47b7c8328bfd62437deed93226b3..80140c8636c10553c1be741b7e4e5084007279e5 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -802,5 +802,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -829,5 +829,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* @return Whether the entity was successfully spawned.
|
||||
*/
|
||||
public boolean spawnAt(@NotNull Location location, @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Freeze Tick Lock API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 9c31424a297b9b727ac4ad13040eb9e5674b716b..8bc6876c82935988436597161fa0ec94c032174b 100644
|
||||
index 80140c8636c10553c1be741b7e4e5084007279e5..461e29a0abbb021c886bffec71c948e1edc3d222 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -278,6 +278,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -279,6 +279,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
boolean isFrozen();
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] More Projectile API
|
||||
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java
|
||||
index d616d5941b3c7b85e350e845901da798601b9a3c..b7a6e3b1ac327c4e03f9d73952c1ce4d54967cf4 100644
|
||||
index 0d31aa0b22cf1e849572294e2cfe38b48c9210af..571712e17551f24b369044b8215b722f7183ae7d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Firework.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Firework.java
|
||||
@@ -15,6 +15,8 @@ public interface Firework extends Projectile {
|
||||
@@ -16,6 +16,8 @@ public interface Firework extends Projectile {
|
||||
|
||||
/**
|
||||
* Apply the provided meta to the fireworks
|
||||
@ -18,9 +18,49 @@ index d616d5941b3c7b85e350e845901da798601b9a3c..b7a6e3b1ac327c4e03f9d73952c1ce4d
|
||||
*
|
||||
* @param meta The FireworkMeta to apply
|
||||
*/
|
||||
@@ -54,4 +56,52 @@ public interface Firework extends Projectile {
|
||||
@org.jetbrains.annotations.Nullable
|
||||
public LivingEntity getBoostedEntity();
|
||||
@@ -54,31 +56,39 @@ public interface Firework extends Projectile {
|
||||
* {@link #getMaxLife()}, the firework will detonate.
|
||||
*
|
||||
* @param ticks the ticks to set. Must be greater than or equal to 0
|
||||
+ * @deprecated use {@link #setTicksFlown(int)}
|
||||
* @return true if the life was set, false if this firework has already detonated
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
boolean setLife(int ticks);
|
||||
|
||||
/**
|
||||
* Get the ticks that this firework has been alive. When this value reaches
|
||||
* {@link #getMaxLife()}, the firework will detonate.
|
||||
*
|
||||
+ * @deprecated use {@link #getTicksFlown()}
|
||||
* @return the life ticks
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
int getLife();
|
||||
|
||||
/**
|
||||
* Set the time in ticks this firework will exist until it is detonated.
|
||||
*
|
||||
* @param ticks the ticks to set. Must be greater than 0
|
||||
+ * @deprecated use {@link #setTicksToDetonate(int)}
|
||||
* @return true if the time was set, false if this firework has already detonated
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
boolean setMaxLife(int ticks);
|
||||
|
||||
/**
|
||||
* Get the time in ticks this firework will exist until it is detonated.
|
||||
*
|
||||
+ * @deprecated use {@link #getTicksToDetonate()}
|
||||
* @return the maximum life in ticks
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
int getMaxLife();
|
||||
|
||||
/**
|
||||
@@ -127,4 +137,52 @@ public interface Firework extends Projectile {
|
||||
return getAttachedTo();
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Paper start - Firework API
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Player#getFishHook
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index f9531c0f909c7caeddfb8f06ef9a11469ba7d434..f854c1252f42ac02ad4eb84f7b5734b4cec88e53 100644
|
||||
index 29885c7184dbec82a6de69c39878276392779d71..3b204144e2d245098b3dc23b8779f9ed817bb6d1 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -355,6 +355,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -356,6 +356,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@Nullable
|
||||
public Location getPotentialBedLocation();
|
||||
// Paper end
|
||||
|
@ -76,10 +76,10 @@ index 0000000000000000000000000000000000000000..0426ee8bd71142b6f933a479c0f2e5ef
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 8bc6876c82935988436597161fa0ec94c032174b..03b35d3ba8ba00c0fa0272450f19355244a014ea 100644
|
||||
index 461e29a0abbb021c886bffec71c948e1edc3d222..321f3ec6c7020ada38143832aea1c545850b9b21 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -121,10 +121,77 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -122,10 +122,77 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*
|
||||
* @param yaw the yaw
|
||||
* @param pitch the pitch
|
||||
|
@ -25,10 +25,10 @@ index 3f7e860de4e28745fcdf8d2f41f4a8c210f48909..39fa4c65e0f61450901662ff5c08d54a
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 03b35d3ba8ba00c0fa0272450f19355244a014ea..4d4a0d15876cc48c9c0456b9f11a5dda37fd56ce 100644
|
||||
index 321f3ec6c7020ada38143832aea1c545850b9b21..6dd81f07ef4d6993187987d3352a01771ffb715e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -897,4 +897,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -924,4 +924,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
boolean isInPowderedSnow();
|
||||
// Paper end
|
||||
|
@ -6415,7 +6415,7 @@ index 288fdbef407d11ab430d5d7026dfad148c3c1065..6fefa619299d3202158490630d62c16a
|
||||
@Override
|
||||
public void tell(R runnable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6e6d33fcf2786fb995696cf69d66fc10b11a1dfa..331686c382fa88c0fd32056e2c68c3078341f4b7 100644
|
||||
index 9fdfeab462e5f5c5e09c5fee2dfe1fca89330086..18d56618a1e8ff5ba408523f620333dbdf48a257 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -315,6 +315,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -6431,7 +6431,7 @@ index 6e6d33fcf2786fb995696cf69d66fc10b11a1dfa..331686c382fa88c0fd32056e2c68c307
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 8fd9667776dc9822cb2e4f54b77c33f5e2bfd3f2..c4f91b80add5d79d999aa49c5da6dab094a24694 100644
|
||||
index ad34d8af3e5bba7ec4f41a10c423ed1262c58f6d..2bad9717ec4ec16309856a83d8e19735ae1fcbec 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -260,6 +260,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@ -6443,7 +6443,7 @@ index 8fd9667776dc9822cb2e4f54b77c33f5e2bfd3f2..c4f91b80add5d79d999aa49c5da6dab0
|
||||
@Override
|
||||
public float getBukkitYaw() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 77a91fe6fd028291e9c66163714ab53f9cf031ed..decf753d088983ef6bbf32a32a6ee8d3cca3ee69 100644
|
||||
index 77c6f4ff7131b7317a0c0193ead21eabe38517cb..738c54ce0a0fb7fee6b584a6d96a8b74931222e5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -242,6 +242,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@ -7150,10 +7150,10 @@ index 93308369f0bbd1e95569d9d573b8b6f42c8ae5a7..6d9469d577dcbb9d5b5b703cf47c8863
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index ef27c0f94355ec7be4a314a0f93bc1c146012210..71c1595b59b757441304a158367d750ed509e4d1 100644
|
||||
index 080c0ab395a457d528c34417c102c2db2feec20f..08f6be760cc2f0a6f9c6a3e165e4554ac01654e0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1128,4 +1128,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1145,4 +1145,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -2048,7 +2048,7 @@ index 84564ca128d2dfc79c0b5a13b699cf6fc80bdea7..9ab4588e4e512176b881ad4c252e400f
|
||||
// CraftBukkit end
|
||||
this.chatVisibility = packet.chatVisibility();
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a768fe68db9cf1fedc2e4a2ef7b58fd2673be078..77f169e6d2d9899316c6a38dd7ef8de24d9b6414 100644
|
||||
index f63ade8d99295ce9d001aae6f5228a7374e16438..93d02b5de0721e3c5903e80bbf8b3b56ec3ab45d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -188,6 +188,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
@ -2114,7 +2114,7 @@ index a768fe68db9cf1fedc2e4a2ef7b58fd2673be078..77f169e6d2d9899316c6a38dd7ef8de2
|
||||
// CraftBukkit end
|
||||
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> {
|
||||
@@ -1788,9 +1793,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1793,9 +1798,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
*/
|
||||
|
||||
this.player.disconnect();
|
||||
@ -2129,7 +2129,7 @@ index a768fe68db9cf1fedc2e4a2ef7b58fd2673be078..77f169e6d2d9899316c6a38dd7ef8de2
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.player.getTextFilter().leave();
|
||||
@@ -1880,7 +1887,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1885,7 +1892,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
if (this.verifyChatMessage(playerchatmessage)) {
|
||||
this.chatMessageChain.append(() -> {
|
||||
CompletableFuture<FilteredText> completablefuture = this.filterTextPacket(playerchatmessage.signedContent().plain());
|
||||
@ -2138,7 +2138,7 @@ index a768fe68db9cf1fedc2e4a2ef7b58fd2673be078..77f169e6d2d9899316c6a38dd7ef8de2
|
||||
|
||||
return CompletableFuture.allOf(completablefuture, completablefuture1).thenAcceptAsync((ovoid) -> {
|
||||
FilterMask filtermask = ((FilteredText) completablefuture.join()).mask();
|
||||
@@ -2042,7 +2049,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2047,7 +2054,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.handleCommand(s);
|
||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
@ -2152,7 +2152,7 @@ index a768fe68db9cf1fedc2e4a2ef7b58fd2673be078..77f169e6d2d9899316c6a38dd7ef8de2
|
||||
Player player = this.getCraftPlayer();
|
||||
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
|
||||
String originalFormat = event.getFormat(), originalMessage = event.getMessage();
|
||||
@@ -2175,9 +2187,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2180,9 +2192,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
private ChatMessageContent getSignedContent(ServerboundChatPacket packet) {
|
||||
@ -2167,7 +2167,7 @@ index a768fe68db9cf1fedc2e4a2ef7b58fd2673be078..77f169e6d2d9899316c6a38dd7ef8de2
|
||||
}
|
||||
|
||||
private void broadcastChatMessage(PlayerChatMessage message) {
|
||||
@@ -2280,14 +2295,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2288,14 +2303,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
private CompletableFuture<Component> queryChatPreview(String query) {
|
||||
MutableComponent ichatmutablecomponent = Component.literal(query);
|
||||
@ -2189,7 +2189,7 @@ index a768fe68db9cf1fedc2e4a2ef7b58fd2673be078..77f169e6d2d9899316c6a38dd7ef8de2
|
||||
}
|
||||
|
||||
private CompletableFuture<Component> queryCommandPreview(String query) {
|
||||
@@ -2296,7 +2314,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2304,7 +2322,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
CompletableFuture<Component> completablefuture = this.getPreviewedArgument(commandlistenerwrapper, PreviewableCommand.of(parseresults));
|
||||
|
||||
completablefuture.thenAcceptAsync((ichatbasecomponent) -> {
|
||||
@ -2198,7 +2198,7 @@ index a768fe68db9cf1fedc2e4a2ef7b58fd2673be078..77f169e6d2d9899316c6a38dd7ef8de2
|
||||
}, this.server);
|
||||
return completablefuture;
|
||||
}
|
||||
@@ -3086,30 +3104,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3094,30 +3112,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3089,10 +3089,10 @@ index 53b5af4179cc4bc4d5646f183da5e327a45237ac..a859a675b4bc543e139358223cc92ad5
|
||||
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
||||
return this.target;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 71c1595b59b757441304a158367d750ed509e4d1..7c9dcf62f85bb3ddffb4eadb3961d7b356c503f8 100644
|
||||
index 08f6be760cc2f0a6f9c6a3e165e4554ac01654e0..dfae0888684cbf3e6b2fc3201c78fa10c67628a1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -196,6 +196,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -198,6 +198,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
protected Entity entity;
|
||||
private EntityDamageEvent lastDamageEvent;
|
||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
|
||||
@ -3100,7 +3100,7 @@ index 71c1595b59b757441304a158367d750ed509e4d1..7c9dcf62f85bb3ddffb4eadb3961d7b3
|
||||
|
||||
public CraftEntity(final CraftServer server, final Entity entity) {
|
||||
this.server = server;
|
||||
@@ -830,6 +831,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -847,6 +848,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return this.getHandle().getVehicle().getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -3133,7 +3133,7 @@ index 71c1595b59b757441304a158367d750ed509e4d1..7c9dcf62f85bb3ddffb4eadb3961d7b3
|
||||
@Override
|
||||
public void setCustomName(String name) {
|
||||
// sane limit for name length
|
||||
@@ -885,6 +912,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -902,6 +929,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
public String getName() {
|
||||
return CraftChatMessage.fromComponent(this.getHandle().getName());
|
||||
}
|
||||
@ -3152,10 +3152,10 @@ index 71c1595b59b757441304a158367d750ed509e4d1..7c9dcf62f85bb3ddffb4eadb3961d7b3
|
||||
@Override
|
||||
public boolean isPermissionSet(String name) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 56151652fdeb98f54358cfefc3d8773c1a39fcf6..2c934b7a2142a4d1ae21feeb95d23f22cfda3be0 100644
|
||||
index ef3d6450b2ae2274b7e40c621aa30da279313669..19549dda26c24388bd13a5a2579789e2d1e3ad88 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -318,9 +318,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -321,9 +321,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
container = CraftEventFactory.callInventoryOpenEvent(player, container);
|
||||
if (container == null) return;
|
||||
|
||||
@ -3170,7 +3170,7 @@ index 56151652fdeb98f54358cfefc3d8773c1a39fcf6..2c934b7a2142a4d1ae21feeb95d23f22
|
||||
player.containerMenu = container;
|
||||
player.initMenu(container);
|
||||
}
|
||||
@@ -389,8 +392,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -392,8 +395,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
||||
// Now open the window
|
||||
MenuType<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory());
|
||||
@ -3834,7 +3834,7 @@ index a0334ec0a80dfc4f1e68c2e338aa486faaefb29e..257776a12ca26c1e75be22a67c94b0aa
|
||||
@Override
|
||||
public CraftMerchant getCraftMerchant() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
|
||||
index ca359cb1ac5f48d4f75d33946fcddedb270407c2..fefa4d83c5699be0b55794cd28d13d27b66ef108 100644
|
||||
index 4154b4489be172f1ef1693b54368b7ffc8629c31..e8413ad360e9b6c4eef13edf9dd0095e7e64bce2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
|
||||
@@ -1,8 +1,9 @@
|
||||
@ -3848,19 +3848,7 @@ index ca359cb1ac5f48d4f75d33946fcddedb270407c2..fefa4d83c5699be0b55794cd28d13d27
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -17,9 +18,11 @@ import org.bukkit.craftbukkit.util.CraftChatMessage;
|
||||
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
import org.bukkit.inventory.meta.BookMeta;
|
||||
import org.bukkit.inventory.meta.BookMeta.Generation;
|
||||
+import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
// Spigot start
|
||||
import static org.spigotmc.ValidateUtils.*;
|
||||
+
|
||||
import java.util.AbstractList;
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
import net.md_5.bungee.chat.ComponentSerializer;
|
||||
@@ -269,6 +272,145 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
|
||||
@@ -261,6 +262,145 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
|
||||
this.generation = (generation == null) ? null : generation.ordinal();
|
||||
}
|
||||
|
||||
@ -4006,7 +3994,7 @@ index ca359cb1ac5f48d4f75d33946fcddedb270407c2..fefa4d83c5699be0b55794cd28d13d27
|
||||
@Override
|
||||
public String getPage(final int page) {
|
||||
Validate.isTrue(this.isValidPage(page), "Invalid page number");
|
||||
@@ -413,7 +555,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
|
||||
@@ -405,7 +545,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -4016,7 +4004,7 @@ index ca359cb1ac5f48d4f75d33946fcddedb270407c2..fefa4d83c5699be0b55794cd28d13d27
|
||||
|
||||
if (this.hasTitle()) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
|
||||
index 00445fc7373c70f4cecc4114f9bcfb4b6f27c0e8..67a198fe1ba930836b82fcc22ab25eb1810be0cf 100644
|
||||
index 507fa96a3fb904b74429df5756c9a6378ec8c5b7..abb9e88abc74135284b941e040d4058690a82b27 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
|
||||
@@ -1,6 +1,6 @@
|
||||
@ -4027,7 +4015,7 @@ index 00445fc7373c70f4cecc4114f9bcfb4b6f27c0e8..67a198fe1ba930836b82fcc22ab25eb1
|
||||
import java.util.Map;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import org.bukkit.Material;
|
||||
@@ -84,8 +84,29 @@ class CraftMetaBookSigned extends CraftMetaBook implements BookMeta {
|
||||
@@ -78,8 +78,29 @@ class CraftMetaBookSigned extends CraftMetaBook implements BookMeta {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1262,7 +1262,7 @@ index b2f79a0c9caa6783816afc36531c94378e832cb7..99d44faab5b5da244fdc170c73d73723
|
||||
this.entityManager.saveAll();
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a258c965a4a0352f9d77def6748b176f3bdab106..cdc24defe649644ceade1c6cfcfe20c29ca936c1 100644
|
||||
index 93d02b5de0721e3c5903e80bbf8b3b56ec3ab45d..4e7db441f68019d6e5d3359605b76bc4b258e87e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -342,7 +342,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@ -1281,7 +1281,7 @@ index a258c965a4a0352f9d77def6748b176f3bdab106..cdc24defe649644ceade1c6cfcfe20c2
|
||||
|
||||
this.chatPreviewThrottler.tick();
|
||||
}
|
||||
@@ -2149,7 +2147,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2154,7 +2152,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
private void handleCommand(String s) {
|
||||
@ -1290,7 +1290,7 @@ index a258c965a4a0352f9d77def6748b176f3bdab106..cdc24defe649644ceade1c6cfcfe20c2
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
|
||||
@@ -2159,7 +2157,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2164,7 +2162,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -1299,7 +1299,7 @@ index a258c965a4a0352f9d77def6748b176f3bdab106..cdc24defe649644ceade1c6cfcfe20c2
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2172,7 +2170,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2177,7 +2175,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
} finally {
|
||||
@ -1333,7 +1333,7 @@ index 521f485366c65527ac3289dd27d8f2e311706a10..5833cc3d5014dad82607afc4d643b6be
|
||||
|
||||
public UserWhiteList getWhiteList() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 331686c382fa88c0fd32056e2c68c3078341f4b7..47a05aa42739f4cfce828c0de42b4f1da467093e 100644
|
||||
index 18d56618a1e8ff5ba408523f620333dbdf48a257..1a44c98b69398ba5dcb4115f0e8fdcf3f62fd920 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -132,7 +132,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
||||
@ -1425,7 +1425,7 @@ index cdf8020194f2ec1fe7b65b22c8e1f5b1c23eaefa..2db27f5e3e3c1bb0502c055f78c4a81e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index c4f91b80add5d79d999aa49c5da6dab094a24694..e2d93d7a9c421f896e98e6dd6b318f9a30cab3b4 100644
|
||||
index 2bad9717ec4ec16309856a83d8e19735ae1fcbec..bffaa7397e931b7b15a1780989e69aae8b29345f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -140,7 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@ -1437,7 +1437,7 @@ index c4f91b80add5d79d999aa49c5da6dab094a24694..e2d93d7a9c421f896e98e6dd6b318f9a
|
||||
|
||||
public abstract class LivingEntity extends Entity {
|
||||
|
||||
@@ -2795,7 +2795,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2817,7 +2817,6 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -1445,7 +1445,7 @@ index c4f91b80add5d79d999aa49c5da6dab094a24694..e2d93d7a9c421f896e98e6dd6b318f9a
|
||||
super.tick();
|
||||
this.updatingUsingItem();
|
||||
this.updateSwimAmount();
|
||||
@@ -2837,9 +2836,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2859,9 +2858,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
if (!this.isRemoved()) {
|
||||
@ -1455,7 +1455,7 @@ index c4f91b80add5d79d999aa49c5da6dab094a24694..e2d93d7a9c421f896e98e6dd6b318f9a
|
||||
}
|
||||
|
||||
double d0 = this.getX() - this.xo;
|
||||
@@ -2921,8 +2918,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2943,8 +2940,6 @@ public abstract class LivingEntity extends Entity {
|
||||
if (this.isSleeping()) {
|
||||
this.setXRot(0.0F);
|
||||
}
|
||||
@ -1464,7 +1464,7 @@ index c4f91b80add5d79d999aa49c5da6dab094a24694..e2d93d7a9c421f896e98e6dd6b318f9a
|
||||
}
|
||||
|
||||
public void detectEquipmentUpdates() {
|
||||
@@ -3104,7 +3099,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3126,7 +3121,6 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
this.setDeltaMovement(d4, d5, d6);
|
||||
this.level.getProfiler().push("ai");
|
||||
@ -1472,7 +1472,7 @@ index c4f91b80add5d79d999aa49c5da6dab094a24694..e2d93d7a9c421f896e98e6dd6b318f9a
|
||||
if (this.isImmobile()) {
|
||||
this.jumping = false;
|
||||
this.xxa = 0.0F;
|
||||
@@ -3114,7 +3108,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3136,7 +3130,6 @@ public abstract class LivingEntity extends Entity {
|
||||
this.serverAiStep();
|
||||
this.level.getProfiler().pop();
|
||||
}
|
||||
@ -1480,7 +1480,7 @@ index c4f91b80add5d79d999aa49c5da6dab094a24694..e2d93d7a9c421f896e98e6dd6b318f9a
|
||||
|
||||
this.level.getProfiler().pop();
|
||||
this.level.getProfiler().push("jump");
|
||||
@@ -3149,9 +3142,9 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3171,9 +3164,9 @@ public abstract class LivingEntity extends Entity {
|
||||
this.updateFallFlying();
|
||||
AABB axisalignedbb = this.getBoundingBox();
|
||||
|
||||
@ -1492,7 +1492,7 @@ index c4f91b80add5d79d999aa49c5da6dab094a24694..e2d93d7a9c421f896e98e6dd6b318f9a
|
||||
this.level.getProfiler().pop();
|
||||
this.level.getProfiler().push("freezing");
|
||||
boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES);
|
||||
@@ -3180,9 +3173,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3202,9 +3195,7 @@ public abstract class LivingEntity extends Entity {
|
||||
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow nerfed mobs to jump and take water damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index decf753d088983ef6bbf32a32a6ee8d3cca3ee69..4f58fae1b3738e7e0507a46df275a258c94fcec4 100644
|
||||
index 738c54ce0a0fb7fee6b584a6d96a8b74931222e5..38d3749104742f63f1f4f4c9595e83a4fa445cd1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -110,6 +110,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@ -16,7 +16,7 @@ index decf753d088983ef6bbf32a32a6ee8d3cca3ee69..4f58fae1b3738e7e0507a46df275a258
|
||||
public GoalSelector targetSelector;
|
||||
@Nullable
|
||||
private LivingEntity target;
|
||||
@@ -812,7 +813,17 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -818,7 +819,17 @@ public abstract class Mob extends LivingEntity {
|
||||
@Override
|
||||
protected final void serverAiStep() {
|
||||
++this.noActionTime;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable despawn distances for living entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 4f58fae1b3738e7e0507a46df275a258c94fcec4..854653b2481ebe3a04f671ef0af2aecf3093fc0b 100644
|
||||
index 38d3749104742f63f1f4f4c9595e83a4fa445cd1..ce04fa5ae8c539fd6f6aa7648a4cdce6b680463e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -788,14 +788,14 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -794,14 +794,14 @@ public abstract class Mob extends LivingEntity {
|
||||
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.distanceToSqr((Entity) this);
|
||||
|
@ -21,10 +21,10 @@ index 5c3b11f738c1ea19981cc878aa6c2323497391a0..b91a61be7c4829fce0ff8da290eab580
|
||||
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
|
||||
double d4 = max * max;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 854653b2481ebe3a04f671ef0af2aecf3093fc0b..c09f1ac470c4055897f8d6c6201bd8dc421cdbfe 100644
|
||||
index ce04fa5ae8c539fd6f6aa7648a4cdce6b680463e..0b056e65b2efe0f96a6beecfc41709bfa18983ca 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -784,7 +784,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -790,7 +790,7 @@ public abstract class Mob extends LivingEntity {
|
||||
if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
|
||||
this.discard();
|
||||
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
|
||||
|
@ -25,7 +25,7 @@ index 2f7646e2bcc9622d8579eec25b56615da5a84d06..f5ded21e15ca425d23af90f0e339a961
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 70c338f5bf605d2f51a21670634c716177cd6f97..ef7320d69d058ea260e48dd1e0d4fc2d69aec1c2 100644
|
||||
index 9878aded49d0049b066fa608c7eaf25a55fcf12e..385c81c9e0faf7a51d24b3542713e0d57e5398dd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -304,7 +304,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -56,7 +56,7 @@ index 70c338f5bf605d2f51a21670634c716177cd6f97..ef7320d69d058ea260e48dd1e0d4fc2d
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
}
|
||||
@@ -1847,6 +1867,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1861,6 +1881,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.bukkitEntity.storeBukkitValues(nbt);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -72,7 +72,7 @@ index 70c338f5bf605d2f51a21670634c716177cd6f97..ef7320d69d058ea260e48dd1e0d4fc2d
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -1973,6 +2002,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1987,6 +2016,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -132,10 +132,10 @@ index 2d4a990da2402a6c24c03e8be7e518e33db99c8f..10f8b5ff56e4c1d8300835e045abdce7
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 7c9dcf62f85bb3ddffb4eadb3961d7b356c503f8..fba18e3c6903d4ed8233b4d32ed07bf08311ca27 100644
|
||||
index dfae0888684cbf3e6b2fc3201c78fa10c67628a1..ddd0fde5c9065cc35b3bcf81defb119f5b0608d6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1198,5 +1198,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1215,5 +1215,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ character.
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 5072d4dc1f7f77c61e3cc72c1101cb95f6596ce7..451dd594a2acc6fbc7112b9ecfa737c942f10a3c 100644
|
||||
index 22c095539425a6667b8e7f5c5f0a8ff2e87adfb5..e21a6961bab606036440f2a6bd90998b4129ae10 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2033,7 +2033,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2038,7 +2038,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ index 5072d4dc1f7f77c61e3cc72c1101cb95f6596ce7..451dd594a2acc6fbc7112b9ecfa737c9
|
||||
for (int i = 0; i < message.length(); ++i) {
|
||||
if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) {
|
||||
return true;
|
||||
@@ -2050,7 +2050,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2055,7 +2055,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
OutgoingPlayerChatMessage outgoing = OutgoingPlayerChatMessage.create(original);
|
||||
|
||||
@ -42,7 +42,7 @@ index 5072d4dc1f7f77c61e3cc72c1101cb95f6596ce7..451dd594a2acc6fbc7112b9ecfa737c9
|
||||
this.handleCommand(s);
|
||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
@@ -2153,7 +2153,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2158,7 +2158,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index a6192a7edd94e63c568ca8196e0ed9fa993da6bb..1d3cd79634366718cd354cd2f55c6fc974ad3525 100644
|
||||
index 489153b3d22b37f01a027b0effc091d4715e7f7b..c2407224e8bc5e872e153de14090d60e66bb07bc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -99,7 +99,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -102,7 +102,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void setHealth(double health) {
|
||||
health = (float) health;
|
||||
if ((health < 0) || (health > this.getMaxHealth())) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable portal search radius
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a761c5b3551c7a87b8d04b03f5640805007fbcd3..3bf89827afc515ffae0f79532b38c5f31ba014f6 100644
|
||||
index f9f0cb28811e3a14bf4b5005050920b4992f868b..4b5babb9fa755ba2897fc633c8eba30cfd220ea0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2937,7 +2937,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2951,7 +2951,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType());
|
||||
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
|
||||
// CraftBukkit start
|
||||
|
@ -17,10 +17,10 @@ index fd3ccc1726cd73e9f5be3f936115e2431c77183c..c1c86dc95d610bb391191317fa0c0e4c
|
||||
static {
|
||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index fba18e3c6903d4ed8233b4d32ed07bf08311ca27..8b4f1ef248d0b13927cbf634a0e2a97eb93c8ae4 100644
|
||||
index ddd0fde5c9065cc35b3bcf81defb119f5b0608d6..b9599f4f431098d63be98b5175890371103f8813 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -450,10 +450,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -452,10 +452,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
public void setVelocity(Vector velocity) {
|
||||
Preconditions.checkArgument(velocity != null, "velocity");
|
||||
velocity.checkFinite();
|
||||
|
@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
|
||||
logic which is most likely to be true.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3bf89827afc515ffae0f79532b38c5f31ba014f6..4218d5aa5b4ba77d304b91c6c6cd9fa9cdaaa532 100644
|
||||
index 4b5babb9fa755ba2897fc633c8eba30cfd220ea0..6e8811a6a4b41d38c99ac40a2d4f0bef4713b762 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2575,6 +2575,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2589,6 +2589,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
@Nullable
|
||||
public Team getTeam() {
|
||||
@ -23,7 +23,7 @@ index 3bf89827afc515ffae0f79532b38c5f31ba014f6..4218d5aa5b4ba77d304b91c6c6cd9fa9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 0d61cb2b7af48bbc60b04be6a4767ccba2b29ffb..3023e714961d1b565d9e8659e07ccc4dab729f2f 100644
|
||||
index 87b8a9bb1493d4ff048f0283151cfc5c8ea7d7ef..4e192c98b7beb23ac75b7442883eba7bb98dc475 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -823,6 +823,7 @@ public abstract class LivingEntity extends Entity {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add methods for working with arrows stuck in living entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 13906f0dfd7169b2110c83b7cb51c4979668cb13..652f0e3429efba1326f0e4cae7096a6cfe4b2c85 100644
|
||||
index c2407224e8bc5e872e153de14090d60e66bb07bc..4f4ee7071183e7eef918741e38c2bc2e522c72df 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -722,4 +722,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -764,4 +764,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
this.getHandle().persistentInvisibility = invisible;
|
||||
this.getHandle().setSharedFlag(5, invisible);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 451dd594a2acc6fbc7112b9ecfa737c942f10a3c..e4f1b7fca8046df11f7e212c316385f82ce45322 100644
|
||||
index e21a6961bab606036440f2a6bd90998b4129ae10..9f0a5b950a022aa2a3d3d60837fdb9023f041a9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1763,8 +1763,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1768,8 +1768,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
|
||||
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 3023e714961d1b565d9e8659e07ccc4dab729f2f..1dcf41a4105c05c3182afa8585dee20723d2c136 100644
|
||||
index 4e192c98b7beb23ac75b7442883eba7bb98dc475..5678461976a07f9afecccb1d34ea3eec24fba80e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3589,9 +3589,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3611,9 +3611,10 @@ public abstract class LivingEntity extends Entity {
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@ -20,7 +20,7 @@ index 3023e714961d1b565d9e8659e07ccc4dab729f2f..1dcf41a4105c05c3182afa8585dee207
|
||||
level.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -3605,6 +3606,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3627,6 +3628,13 @@ public abstract class LivingEntity extends Entity {
|
||||
} else {
|
||||
itemstack = this.useItem.finishUsingItem(this.level, this);
|
||||
}
|
||||
@ -34,7 +34,7 @@ index 3023e714961d1b565d9e8659e07ccc4dab729f2f..1dcf41a4105c05c3182afa8585dee207
|
||||
// CraftBukkit end
|
||||
|
||||
if (itemstack != this.useItem) {
|
||||
@@ -3612,6 +3620,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3634,6 +3642,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 1dcf41a4105c05c3182afa8585dee20723d2c136..54e7fa7a483e15c440f562559601292c2a064208 100644
|
||||
index 5678461976a07f9afecccb1d34ea3eec24fba80e..8dc6fbbdfaecf0eb38a876d87d77f111541f766d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -784,7 +784,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@ -34,7 +34,7 @@ index 1dcf41a4105c05c3182afa8585dee20723d2c136..54e7fa7a483e15c440f562559601292c
|
||||
// CraftBukkit start - Handle scaled health
|
||||
if (this instanceof ServerPlayer) {
|
||||
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
|
||||
@@ -3422,7 +3432,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3444,7 +3454,7 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void setAbsorptionAmount(float amount) {
|
||||
|
@ -20,10 +20,10 @@ index 8834ed411a7db86b4d2b88183a1315317107d719..c45b5ab6776f3ac79f856c3a6467c510
|
||||
static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() {
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6c0eac7f4fbf57ae1a777de651ef93f577dc9c3a..972f31be7c91aaaa3e959527ca28c706b9ab3028 100644
|
||||
index 9f0a5b950a022aa2a3d3d60837fdb9023f041a9b..b86f742c4a7500f0bb241d5c07a077aa1be1c7e5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2636,8 +2636,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2644,8 +2644,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -19,10 +19,10 @@ index 4d8dfe375f5b3b9e5cfc12a6af0b87ae78f9b764..5d214b7dd4f6d7feff0a1904ce6573cf
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index bfbd6a23a39cf96371ebabbe4a79036acfd3f4b2..846ca6e4437cc827584459511c3e119b35f9ba72 100644
|
||||
index 75bc0d9e8ec46d1fcfd6d5886d5ab03537e575d2..9df3561fca35b1649de1545e924bd96ec5f80089 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3275,7 +3275,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3283,7 +3283,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public final boolean isDisconnected() {
|
||||
|
@ -5,13 +5,13 @@ Subject: [PATCH] Firework API's
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
index 4abcdc515411372006ff5d33510bdd64092c186a..5406925cd66f46ab8744123c670d72cea7bfc3a1 100644
|
||||
index ba13507263d78d34eb8d3038c437229c0469d476..61252ef8a79bac0ea2d3d231ec6b12166f39d072 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
@@ -39,6 +39,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
public int lifetime;
|
||||
@Nullable
|
||||
public LivingEntity attachedToEntity;
|
||||
public LivingEntity attachedToEntity; // PAIL private -> public
|
||||
+ public java.util.UUID spawningEntity; // Paper
|
||||
|
||||
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
|
||||
@ -74,10 +74,10 @@ index cdf35c5873f68245891241c0efa3bcf5658c3f6d..766af1f45b14654d3655a06ae0bfb0d4
|
||||
if (!user.getAbilities().instabuild) {
|
||||
itemStack.shrink(1);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
index 3a1c3d20ecc3612421e346edbbb74ab47f16a137..be86114eac3975b82ca74d4d6ed3f0402a642e8a 100644
|
||||
index 59d5c314711b4ec239e5bcb4272b11ed72705c5a..c242f654c88ca1773429348939d3bb2ffae3768c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
@@ -78,4 +78,17 @@ public class CraftFirework extends CraftProjectile implements Firework {
|
||||
@@ -135,4 +135,11 @@ public class CraftFirework extends CraftProjectile implements Firework {
|
||||
public void setShotAtAngle(boolean shotAtAngle) {
|
||||
this.getHandle().getEntityData().set(FireworkRocketEntity.DATA_SHOT_AT_ANGLE, shotAtAngle);
|
||||
}
|
||||
@ -87,11 +87,5 @@ index 3a1c3d20ecc3612421e346edbbb74ab47f16a137..be86114eac3975b82ca74d4d6ed3f040
|
||||
+ public java.util.UUID getSpawningEntity() {
|
||||
+ return getHandle().spawningEntity;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public org.bukkit.entity.LivingEntity getBoostedEntity() {
|
||||
+ net.minecraft.world.entity.LivingEntity boostedEntity = getHandle().attachedToEntity;
|
||||
+ return boostedEntity != null ? (org.bukkit.entity.LivingEntity) boostedEntity.getBukkitEntity() : null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
@ -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 32d230dc6968306dd6e322ffd6a820380e3c88b1..f7a8c947ef639d0d9cf8e527f8a0072432cba0c5 100644
|
||||
index ac2b7e86afc21607564ddea62e39ec484e91bbf2..2d6d393ccdb6ed3aadc1e00a7a1a8dcb78277771 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2319,6 +2319,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2333,6 +2333,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
||||
|
@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
||||
You can set this to 0 to disable collisions.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f7a8c947ef639d0d9cf8e527f8a0072432cba0c5..a676fa481ad3e3ac60cf5ba9d86acd61bea329ca 100644
|
||||
index 2d6d393ccdb6ed3aadc1e00a7a1a8dcb78277771..55f1886761c7a528f0f1e371de546aff7707e60b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -379,6 +379,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -24,10 +24,10 @@ index f7a8c947ef639d0d9cf8e527f8a0072432cba0c5..a676fa481ad3e3ac60cf5ba9d86acd61
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 9f6629189a126c12a2d45098e12f41d8e45147a4..841149ffcdb2228fac3ac2bdc56c02ed26f219f6 100644
|
||||
index 45b76070d6a178ffb5cd378cbeb12342eab4f360..e711c02279ff48e76038a6281bbe8060e34d900b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3264,8 +3264,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3286,8 +3286,11 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,10 +11,10 @@ I suspect Mojang may switch to this behavior before full release.
|
||||
To be converted into a Paper-API event at some point in the future?
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 846ca6e4437cc827584459511c3e119b35f9ba72..db2db8156338eae296f085a60a91a29fe02ab050 100644
|
||||
index 9df3561fca35b1649de1545e924bd96ec5f80089..f8955429ec4cfe778de77a7db5fef624c20e4318 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2456,6 +2456,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2464,6 +2464,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
switch (packet.getAction()) {
|
||||
case PRESS_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(true);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index c09f1ac470c4055897f8d6c6201bd8dc421cdbfe..049a9c4547428d7306d82ed35bcd470ae6f3efc3 100644
|
||||
index 0b056e65b2efe0f96a6beecfc41709bfa18983ca..6d0d194aaababd91a26dffc07f547d60eadd098e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -629,6 +629,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -635,6 +635,11 @@ public abstract class Mob extends LivingEntity {
|
||||
ItemEntity entityitem = (ItemEntity) iterator.next();
|
||||
|
||||
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
|
||||
|
@ -58,10 +58,10 @@ index 07a8abb714a9dfd470ab0486c336e3b58ea927a1..d4e3649f4d66545842a7f8cd3dabad39
|
||||
@Override
|
||||
public abstract boolean isSpectator();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 2c934b7a2142a4d1ae21feeb95d23f22cfda3be0..3954ed194388c6487c6cd0303aea9e1b65a0f8ee 100644
|
||||
index 19549dda26c24388bd13a5a2579789e2d1e3ad88..3ca0d08a9e6511b8a96abcf0807a77d52f303a44 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -504,6 +504,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -507,6 +507,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
this.getHandle().getCooldowns().addCooldown(CraftMagicNumbers.getItem(material), ticks);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ 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 a676fa481ad3e3ac60cf5ba9d86acd61bea329ca..81fd2e443de0b85b340b48e66bc5fb0acad5d60a 100644
|
||||
index 55f1886761c7a528f0f1e371de546aff7707e60b..be1b7014a745a3f7ce6cb690c494bbb876e40fcc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -380,6 +380,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -16,7 +16,7 @@ index a676fa481ad3e3ac60cf5ba9d86acd61bea329ca..81fd2e443de0b85b340b48e66bc5fb0a
|
||||
@javax.annotation.Nullable
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
@@ -1954,6 +1955,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1968,6 +1969,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
@ -27,7 +27,7 @@ index a676fa481ad3e3ac60cf5ba9d86acd61bea329ca..81fd2e443de0b85b340b48e66bc5fb0a
|
||||
// Paper end
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2093,6 +2098,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2107,6 +2112,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.originWorld = originWorld;
|
||||
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||
}
|
||||
@ -49,10 +49,10 @@ index e5b56a85d76d1417dda2d14b1b03850bbb070f4c..5304b0455b070006922e1b5471e9c0ab
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||
Entity vehicle = entity.getVehicle();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 8b4f1ef248d0b13927cbf634a0e2a97eb93c8ae4..5a8e31d3e1078559f17151a8f9a9cbaec58b1942 100644
|
||||
index b9599f4f431098d63be98b5175890371103f8813..d3a8c68f5186f69432fb8af8b34b174b04368fc1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1243,5 +1243,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1260,5 +1260,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
//noinspection ConstantConditions
|
||||
return originVector.toLocation(world);
|
||||
}
|
||||
|
@ -5,25 +5,17 @@ Subject: [PATCH] LivingEntity#setKiller
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index b65d44780c7e6e1e2e8724df838d1aa54edcc30a..6455a81fea0de79173419587171b5ed025c30592 100644
|
||||
index 4f4ee7071183e7eef918741e38c2bc2e522c72df..a08fd99fb97d8c880c855e6af2a99afcfa8098b5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -8,6 +8,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
+import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.effect.MobEffect;
|
||||
@@ -344,6 +345,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -347,6 +347,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void setKiller(Player killer) {
|
||||
+ ServerPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
|
||||
+ net.minecraft.server.level.ServerPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
|
||||
+ getHandle().lastHurtByPlayer = entityPlayer;
|
||||
+ getHandle().lastHurtByMob = entityPlayer;
|
||||
+ getHandle().lastHurtByPlayerTime = entityPlayer == null ? 0 : 100; // 100 value taken from EntityLiving#damageEntity
|
||||
|
@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
|
||||
random disconnections for clients.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index fddef0ba2ff963a242e457c4888dc801d1ea6920..95c0f5e429a0dd5075264d91c80f0016e7d330c5 100644
|
||||
index 32c4383cfb4cab6329d7046c48daf3050fa027c6..c4f1ded84ec1ed152faeb835a3f50b7e31356655 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3234,14 +3234,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3242,14 +3242,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 841149ffcdb2228fac3ac2bdc56c02ed26f219f6..18d29125c19db2ffc3550a843ee9c3974b619f89 100644
|
||||
index e711c02279ff48e76038a6281bbe8060e34d900b..2eb002d6231dcb2a4bf4b1eb96ca4ecdb6d4bca2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -15,7 +15,7 @@ index 841149ffcdb2228fac3ac2bdc56c02ed26f219f6..18d29125c19db2ffc3550a843ee9c397
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@@ -2977,6 +2978,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2999,6 +3000,13 @@ public abstract class LivingEntity extends Entity {
|
||||
ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
|
||||
|
||||
if (!ItemStack.matches(itemstack1, itemstack)) {
|
||||
|
@ -13,11 +13,11 @@ starting point for future additions in this area.
|
||||
Fixes GH-559
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||
index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af880d679b1f 100644
|
||||
index 4017933f2244fca32cf9d39444f3a4f550e8af01..0c40a4a18cfc6f4ed6473a475f307f5c75ab56c5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||
@@ -9,9 +9,22 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey;
|
||||
@@ -8,9 +8,22 @@ import org.bukkit.Material;
|
||||
import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
|
||||
@DelegateDeserialization(CraftMetaItem.SerializableMeta.class)
|
||||
-public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
@ -40,7 +40,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88
|
||||
CompoundTag entityTag;
|
||||
|
||||
CraftMetaArmorStand(CraftMetaItem meta) {
|
||||
@@ -22,6 +35,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
@@ -21,6 +34,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
}
|
||||
|
||||
CraftMetaArmorStand armorStand = (CraftMetaArmorStand) meta;
|
||||
@ -54,7 +54,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88
|
||||
this.entityTag = armorStand.entityTag;
|
||||
}
|
||||
|
||||
@@ -30,11 +50,39 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
@@ -29,11 +49,39 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
|
||||
if (tag.contains(ENTITY_TAG.NBT)) {
|
||||
this.entityTag = tag.getCompound(ENTITY_TAG.NBT).copy();
|
||||
@ -94,7 +94,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -57,6 +105,31 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
@@ -56,6 +104,31 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
void applyToItem(CompoundTag tag) {
|
||||
super.applyToItem(tag);
|
||||
|
||||
@ -126,7 +126,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88
|
||||
if (this.entityTag != null) {
|
||||
tag.put(ENTITY_TAG.NBT, entityTag);
|
||||
}
|
||||
@@ -78,7 +151,7 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
@@ -72,7 +145,7 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
}
|
||||
|
||||
boolean isArmorStandEmpty() {
|
||||
@ -135,7 +135,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +162,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
@@ -83,7 +156,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
if (meta instanceof CraftMetaArmorStand) {
|
||||
CraftMetaArmorStand that = (CraftMetaArmorStand) meta;
|
||||
|
||||
@ -150,7 +150,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -104,9 +183,14 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
@@ -98,9 +177,14 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
final int original;
|
||||
int hash = original = super.applyHash();
|
||||
|
||||
@ -168,7 +168,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88
|
||||
|
||||
return original != hash ? CraftMetaArmorStand.class.hashCode() ^ hash : hash;
|
||||
}
|
||||
@@ -115,6 +199,28 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
@@ -109,6 +193,28 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
Builder<String, Object> serialize(Builder<String, Object> builder) {
|
||||
super.serialize(builder);
|
||||
|
||||
@ -197,7 +197,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88
|
||||
return builder;
|
||||
}
|
||||
|
||||
@@ -128,4 +234,56 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
@@ -122,4 +228,56 @@ public class CraftMetaArmorStand extends CraftMetaItem {
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
@ -28,10 +28,10 @@ index 911843bf38ab750edd4a63417ba7a9deb6b64cb1..a0950f5902c3719dc31205ec43dca948
|
||||
|
||||
// Paper start
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 3954ed194388c6487c6cd0303aea9e1b65a0f8ee..4ff81744b7c9113f57cf1fa89bb943902711b2dc 100644
|
||||
index 3ca0d08a9e6511b8a96abcf0807a77d52f303a44..7ea4a2d4e691e0a0a4d9ef3189a29a4a4ca4374b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -614,6 +614,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -617,6 +617,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 40a289c81bffc679d7c77052d4dbea25832d0acf..1dd0c9629d16bfaaebec61cbadf720d14902069d 100644
|
||||
index 90bd5c1a010a3a9d24328e5c719053603e206626..116dee1f1f9c489e6f85a8fa3b7f36267109d720 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3248,9 +3248,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3256,9 +3256,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
FilteredText filteredtext = (FilteredText) signText.get(i);
|
||||
|
||||
if (this.player.isTextFilteringEnabled()) {
|
||||
|
@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle()
|
||||
However, replaced it too to make it clearer of intent.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 5a8e31d3e1078559f17151a8f9a9cbaec58b1942..f70cc39d7fdd9308fd328007fcadbaab1780ad5f 100644
|
||||
index d3a8c68f5186f69432fb8af8b34b174b04368fc1..2a4f26c5bae66121c5c21d7f1013b3b7753608a4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -807,14 +807,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -824,14 +824,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return false;
|
||||
}
|
||||
final CraftEntity other = (CraftEntity) obj;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 18d29125c19db2ffc3550a843ee9c3974b619f89..6e1484555eeceacf5a082ad16f1e7539f283fb8a 100644
|
||||
index 2eb002d6231dcb2a4bf4b1eb96ca4ecdb6d4bca2..3f2bf9e04b20b74a61d2cf1cadbecd36002d0edc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3700,12 +3700,24 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3722,12 +3722,24 @@ public abstract class LivingEntity extends Entity {
|
||||
if (this.isUsingItem() && !this.useItem.isEmpty()) {
|
||||
Item item = this.useItem.getItem();
|
||||
|
||||
@ -35,10 +35,10 @@ index 18d29125c19db2ffc3550a843ee9c3974b619f89..6e1484555eeceacf5a082ad16f1e7539
|
||||
return this.isShiftKeyDown();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 0bb285e50d7e327ad811d2d41a241928c5246774..268bbe892a70a829733bea8bf2a8b0f14ac70ad5 100644
|
||||
index a08fd99fb97d8c880c855e6af2a99afcfa8098b5..80efb900e37069f4ff39c35d39456959ca24bfe8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -744,5 +744,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -785,5 +785,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void setArrowsStuck(int arrows) {
|
||||
getHandle().setArrowCount(arrows);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent
|
||||
This event is called when an entity receives knockback by another entity.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 6e1484555eeceacf5a082ad16f1e7539f283fb8a..f7a535c35dde266e82369a8cee67c6e58c178731 100644
|
||||
index 3f2bf9e04b20b74a61d2cf1cadbecd36002d0edc..84b6c2f73e0f6f3ad3969e7d51f6617e172764ec 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1456,7 +1456,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@ -56,10 +56,10 @@ index 6e1484555eeceacf5a082ad16f1e7539f283fb8a..f7a535c35dde266e82369a8cee67c6e5
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 049a9c4547428d7306d82ed35bcd470ae6f3efc3..95b042aed945adc72238ebeb19369d9b9568dc8d 100644
|
||||
index 6d0d194aaababd91a26dffc07f547d60eadd098e..ea836c55bad8b897e0fe0cad6d297b9b52209d69 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1573,7 +1573,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1579,7 +1579,7 @@ public abstract class Mob extends LivingEntity {
|
||||
|
||||
if (flag) {
|
||||
if (f1 > 0.0F && target instanceof LivingEntity) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
||||
How long an entity has raised hands to charge an attack or use an item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 268bbe892a70a829733bea8bf2a8b0f14ac70ad5..4d4d42fa1bb813b7f977770bfb93e4bc5ba8c2db 100644
|
||||
index 80efb900e37069f4ff39c35d39456959ca24bfe8..04829ced2048b07aa4b2dcf98a601d1fdd9431fb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -754,5 +754,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -795,5 +795,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void setShieldBlockingDelay(int delay) {
|
||||
getHandle().setShieldBlockingDelay(delay);
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ index a214916ff80885af262165d5936b8bdf2056cbed..4b9af6ef008a297438bfc583025d235d
|
||||
this.doCloseContainer();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1dd0c9629d16bfaaebec61cbadf720d14902069d..1e6f3ea047c7cf94ee420c8c4eb3fe2f31d9b374 100644
|
||||
index 116dee1f1f9c489e6f85a8fa3b7f36267109d720..ea2f283634c8794bda3e531a20f39f8a17e3e41c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType;
|
||||
@ -86,7 +86,7 @@ index 1dd0c9629d16bfaaebec61cbadf720d14902069d..1e6f3ea047c7cf94ee420c8c4eb3fe2f
|
||||
import org.bukkit.event.inventory.InventoryCreativeEvent;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.inventory.SmithItemEvent;
|
||||
@@ -2774,10 +2775,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2782,10 +2783,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleContainerClose(ServerboundContainerClosePacket packet) {
|
||||
@ -144,10 +144,10 @@ index 702a5e524127f9655279a24b54b8d4248dec460e..2520ba136cf17392120f6187a73015f4
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 4ff81744b7c9113f57cf1fa89bb943902711b2dc..404ed5e8f54d70a50de4232c6ea0f6163b34c2ab 100644
|
||||
index 7ea4a2d4e691e0a0a4d9ef3189a29a4a4ca4374b..883b6245f44f3fb82d7678e1092177ca646d484a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -374,7 +374,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -377,7 +377,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
if (((ServerPlayer) this.getHandle()).connection == null) return;
|
||||
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {
|
||||
// fire INVENTORY_CLOSE if one already open
|
||||
@ -156,7 +156,7 @@ index 4ff81744b7c9113f57cf1fa89bb943902711b2dc..404ed5e8f54d70a50de4232c6ea0f616
|
||||
}
|
||||
ServerPlayer player = (ServerPlayer) this.getHandle();
|
||||
AbstractContainerMenu container;
|
||||
@@ -444,8 +444,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -447,8 +447,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
|
||||
cancelled to avoid this problem.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1e6f3ea047c7cf94ee420c8c4eb3fe2f31d9b374..60b29af5e48bed0b1d3749de8313e07b9d82e623 100644
|
||||
index ea2f283634c8794bda3e531a20f39f8a17e3e41c..a517eb45cd06c130cbfe6ff6565825c492079287 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2659,6 +2659,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2667,6 +2667,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
|
@ -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 81fd2e443de0b85b340b48e66bc5fb0acad5d60a..dd00721df47c84629cc5399dd558c531f6cea1cc 100644
|
||||
index be1b7014a745a3f7ce6cb690c494bbb876e40fcc..64261427c5f4abf1a4144eb88a6409560667f70b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2902,7 +2902,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2916,7 +2916,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public String toString() {
|
||||
String s = this.level == null ? "~NULL~" : this.level.toString();
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
index 98cd851cdc67ecd9296ec5a8e56141638e108109..4bfccf77d68e8bcfb9b7379bf04a70515b1ebbcd 100644
|
||||
index 3e8867c317f7018780f44b62d0bd40fc9fa9ce9f..40d033e8b7c29269a5e194f80c8bccc67836e28d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -508,6 +508,18 @@ public final class MCUtil {
|
||||
@ -28,10 +28,10 @@ index 98cd851cdc67ecd9296ec5a8e56141638e108109..4bfccf77d68e8bcfb9b7379bf04a7051
|
||||
switch (enumDirection) {
|
||||
case DOWN:
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index f7a535c35dde266e82369a8cee67c6e58c178731..75f1d666d7e15cfad3935ba3aff6b68b6b6f992a 100644
|
||||
index 84b6c2f73e0f6f3ad3969e7d51f6617e172764ec..a6010e8ddf640a7045f95be04dfce26918d9cd3e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3721,6 +3721,23 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3743,6 +3743,23 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@ -56,10 +56,10 @@ index f7a535c35dde266e82369a8cee67c6e58c178731..75f1d666d7e15cfad3935ba3aff6b68b
|
||||
|
||||
public int getShieldBlockingDelay() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 5c517025576461b426b4a73eea4369f00aeeee41..9c024b46522e2984ed662538302fbac68a77fd86 100644
|
||||
index 04829ced2048b07aa4b2dcf98a601d1fdd9431fb..40e777b859151d036ac7ec4e71ed896df4cd689b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -198,6 +198,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -200,6 +200,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return blocks.get(0);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ index 4b9af6ef008a297438bfc583025d235d07d9b780..6d95d572092ad50ffa92c2e1731fd59c
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 75f1d666d7e15cfad3935ba3aff6b68b6b6f992a..ef1cc74bd09afe7228a78146ff1b8f368874dc70 100644
|
||||
index a6010e8ddf640a7045f95be04dfce26918d9cd3e..15af85ec11e40337338696c51083aef91591681b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -262,6 +262,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@ -220,10 +220,10 @@ index 75f1d666d7e15cfad3935ba3aff6b68b6b6f992a..ef1cc74bd09afe7228a78146ff1b8f36
|
||||
// CraftBukkit start
|
||||
public int getExpReward() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 95b042aed945adc72238ebeb19369d9b9568dc8d..2ffc99730c3d5dbdec63881a1eca07d5fbb1754e 100644
|
||||
index ea836c55bad8b897e0fe0cad6d297b9b52209d69..37102e8cdaeb558e80889ff553656f14eaaeb650 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1012,7 +1012,13 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1018,7 +1018,13 @@ public abstract class Mob extends LivingEntity {
|
||||
}
|
||||
|
||||
this.spawnAtLocation(itemstack);
|
||||
|
@ -163,10 +163,10 @@ index 4ad2ac8d1e9111933fa58c47442fa1f5e8173fd3..2a335f277bd0e4b8ad0f60d8226eb8aa
|
||||
public Path(List<Node> nodes, BlockPos target, boolean reachesTarget) {
|
||||
this.nodes = nodes;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index 55c27a3d9b540c4c4d7701bd0cdf167bb7af3dd4..28d6e31bfdf31d3e56024c731b833c4424313307 100644
|
||||
index 659ccb6532506b2a8c9feb55dc5aee962f6da795..f3e277dc79124d28e244d59e2a453748610e5ff9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
@@ -12,8 +12,11 @@ import org.bukkit.loot.LootTable;
|
||||
@@ -15,8 +15,11 @@ import org.bukkit.loot.LootTable;
|
||||
public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
public CraftMob(CraftServer server, net.minecraft.world.entity.Mob entity) {
|
||||
super(server, entity);
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index ef1cc74bd09afe7228a78146ff1b8f368874dc70..5dc45412d9251be9c8e516160b1aed9255968bbb 100644
|
||||
index 15af85ec11e40337338696c51083aef91591681b..369b2d92dbae896824b2e54cf30f8a607c43d451 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
|
||||
@ -16,7 +16,7 @@ index ef1cc74bd09afe7228a78146ff1b8f368874dc70..5dc45412d9251be9c8e516160b1aed92
|
||||
import net.minecraft.world.phys.HitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.scores.PlayerTeam;
|
||||
@@ -3784,6 +3785,38 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3806,6 +3807,38 @@ public abstract class LivingEntity extends Entity {
|
||||
return level.clip(raytrace);
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ index ef1cc74bd09afe7228a78146ff1b8f368874dc70..5dc45412d9251be9c8e516160b1aed92
|
||||
|
||||
public int getShieldBlockingDelay() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 9c024b46522e2984ed662538302fbac68a77fd86..fb0e0c629d16bc97efc3e91f7ba6fe9e87fc950b 100644
|
||||
index 40e777b859151d036ac7ec4e71ed896df4cd689b..fb92f55ae3c8c54edce7565b27fb84f50ee85702 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -66,7 +66,7 @@ index 9c024b46522e2984ed662538302fbac68a77fd86..fb0e0c629d16bc97efc3e91f7ba6fe9e
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Sets;
|
||||
import java.util.ArrayList;
|
||||
@@ -218,6 +219,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -220,6 +221,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().level, ((net.minecraft.world.phys.BlockHitResult)rayTrace).getBlockPos()),
|
||||
net.minecraft.server.MCUtil.toBukkitBlockFace(((net.minecraft.world.phys.BlockHitResult)rayTrace).getDirection()));
|
||||
}
|
||||
|
@ -23,10 +23,10 @@ index ef0bff86d3f5f0c404f66b3e2e0a4976006909ee..3aa2e80e7d30d8824fd7f009282adfd8
|
||||
public long getGameTime() {
|
||||
return world.levelData.getGameTime();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index 28d6e31bfdf31d3e56024c731b833c4424313307..881bb11507eafe87522ad4131ea7859f42918b3e 100644
|
||||
index f3e277dc79124d28e244d59e2a453748610e5ff9..206b4d187a486e2c8a3a36eacb2d33f9d2555fe8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
@@ -76,4 +76,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
@@ -85,4 +85,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
public long getSeed() {
|
||||
return this.getHandle().lootTableSeed;
|
||||
}
|
||||
|
@ -41,10 +41,10 @@ index 4c35529c7ed67c2432ac67e7d8ffe295892757ff..f91da5bc234a8f1c120261823a1a4e42
|
||||
|
||||
if (entity1 != entity && this.connection != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 29c71c951ce7114dfb24f0c99c3bf8c2a6f6144f..cb2b47df90386ffb1305062f3f34a63549151e8b 100644
|
||||
index 0282b575d4ff68a306053f86b47908dd44dc54ed..424eed2daa3a9574cf1179a7f970f1565ea5fc71 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2315,11 +2315,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2329,11 +2329,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void removeVehicle() {
|
||||
@ -62,7 +62,7 @@ index 29c71c951ce7114dfb24f0c99c3bf8c2a6f6144f..cb2b47df90386ffb1305062f3f34a635
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2382,7 +2387,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2396,7 +2401,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ index 29c71c951ce7114dfb24f0c99c3bf8c2a6f6144f..cb2b47df90386ffb1305062f3f34a635
|
||||
if (entity.getVehicle() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
@@ -2392,7 +2400,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2406,7 +2414,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||
VehicleExitEvent event = new VehicleExitEvent(
|
||||
(Vehicle) this.getBukkitEntity(),
|
||||
@ -83,7 +83,7 @@ index 29c71c951ce7114dfb24f0c99c3bf8c2a6f6144f..cb2b47df90386ffb1305062f3f34a635
|
||||
);
|
||||
// Suppress during worldgen
|
||||
if (this.valid) {
|
||||
@@ -2406,7 +2414,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2420,7 +2428,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
@ -93,10 +93,10 @@ index 29c71c951ce7114dfb24f0c99c3bf8c2a6f6144f..cb2b47df90386ffb1305062f3f34a635
|
||||
if (this.valid) {
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 5dc45412d9251be9c8e516160b1aed9255968bbb..3aebd9999b1e0dba3405117a8223c99b35c7db12 100644
|
||||
index 369b2d92dbae896824b2e54cf30f8a607c43d451..1b907ca310ee217c9496f1b9a63d9cc694c177f0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3382,9 +3382,15 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3404,9 +3404,15 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
@Override
|
||||
public void stopRiding() {
|
||||
|
@ -22,7 +22,7 @@ it only impacts data sent from the client.
|
||||
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c45910b192bcc6171a2ae98a525fdc7008c2185f..74d77d3dd5a7f05242d2105c8cfbe10b1a054a1f 100644
|
||||
index ac5f70ee86cc5a01b046e8e610434742448e3919..1c1ba459535296e029a8d39a5f78d60eb29cdb71 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@ -33,7 +33,7 @@ index c45910b192bcc6171a2ae98a525fdc7008c2185f..74d77d3dd5a7f05242d2105c8cfbe10b
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
@@ -3288,7 +3289,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3296,7 +3297,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
|
||||
|
@ -35,7 +35,7 @@ index 3cb257544d95e82f8de2d693f510c15980aa27c8..895d087fbdde840bd6b96b6c8d231fc9
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cb2b47df90386ffb1305062f3f34a63549151e8b..482efc1c544cdd846f7330f4be43cc3e6eb397fc 100644
|
||||
index 424eed2daa3a9574cf1179a7f970f1565ea5fc71..a2a607e6ae867a4cabe1c2280154c99e93d0e7e9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -74,6 +74,8 @@ import net.minecraft.world.InteractionHand;
|
||||
@ -55,7 +55,7 @@ index cb2b47df90386ffb1305062f3f34a63549151e8b..482efc1c544cdd846f7330f4be43cc3e
|
||||
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
private CraftEntity bukkitEntity;
|
||||
@@ -1957,6 +1960,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1971,6 +1974,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
@ -65,7 +65,7 @@ index cb2b47df90386ffb1305062f3f34a63549151e8b..482efc1c544cdd846f7330f4be43cc3e
|
||||
// Save entity's from mob spawner status
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbt.putBoolean("Paper.FromMobSpawner", true);
|
||||
@@ -2102,6 +2108,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2116,6 +2122,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
@ -105,10 +105,10 @@ index 0be0c7a323277093a6f8e476048eb9ee8712cbc9..c7e97263eee005fd673882e11c436542
|
||||
// Spigot Start
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index f70cc39d7fdd9308fd328007fcadbaab1780ad5f..cd958bc3c00f53ebaf9b3ae39564d3abb6c819a1 100644
|
||||
index 2a4f26c5bae66121c5c21d7f1013b3b7753608a4..3bda8128c2956d817677e28ff87c9c5ed61c8bd2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1249,5 +1249,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1266,5 +1266,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
public boolean fromMobSpawner() {
|
||||
return getHandle().spawnedViaMobSpawner;
|
||||
}
|
||||
|
@ -22,10 +22,10 @@ index d6f34adbdf45bbef4a39e629dd7cb6d7fcb5db0f..7881176a900daa3306c691454f688c1f
|
||||
this.broadcast.accept(packet);
|
||||
if (this.entity instanceof ServerPlayer) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 74d77d3dd5a7f05242d2105c8cfbe10b1a054a1f..a93297667485c27721b3ef45042ea0d2466d0a61 100644
|
||||
index 1c1ba459535296e029a8d39a5f78d60eb29cdb71..9f60c0786b4676726036ca56906663698d26aaea 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2724,7 +2724,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2732,7 +2732,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
if (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem) {
|
||||
// Refresh the current entity metadata
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 3aebd9999b1e0dba3405117a8223c99b35c7db12..590b8af46f8e060aa568dde50025b4f4c6bb162e 100644
|
||||
index 1b907ca310ee217c9496f1b9a63d9cc694c177f0..df35685a016376fa056a8ecbfda2c01b38350b3c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3599,9 +3599,14 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3621,9 +3621,14 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
public void startUsingItem(InteractionHand hand) {
|
||||
@ -24,7 +24,7 @@ index 3aebd9999b1e0dba3405117a8223c99b35c7db12..590b8af46f8e060aa568dde50025b4f4
|
||||
this.useItem = itemstack;
|
||||
this.useItemRemaining = itemstack.getUseDuration();
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -3681,6 +3686,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3703,6 +3708,7 @@ public abstract class LivingEntity extends Entity {
|
||||
this.releaseUsingItem();
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
@ -32,7 +32,7 @@ index 3aebd9999b1e0dba3405117a8223c99b35c7db12..590b8af46f8e060aa568dde50025b4f4
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@@ -3715,8 +3721,8 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3737,8 +3743,8 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Dont send unnecessary sign update
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 133d76c6a011d4c3f7ad037e535e8faa27f89874..ccd3ed84db4be3ee7b5d34de59a727c0c0ea677e 100644
|
||||
index 4ebae3246e3866bbdfa17e43bd0252d637885052..3af9f2d86cf2a9566e22865689101245647d05a5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3333,6 +3333,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3341,6 +3341,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
if (!tileentitysign.isEditable() || !this.player.getUUID().equals(tileentitysign.getPlayerWhoMayEdit())) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getName().getString());
|
||||
|
@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Lukasz Derlatka <toranktto@gmail.com>
|
||||
Date: Mon, 11 Nov 2019 16:08:13 +0100
|
||||
Subject: [PATCH] Fix AssertionError when player hand set to empty type
|
||||
|
||||
Fixes an AssertionError when setting the player's item in hand to null or a new ItemStack of Air in PlayerInteractEvent
|
||||
Fixes GH-2718
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9d3a88ed093c5eda7a11133ebc97226c544fbd18..0df93b204ddf55a2a3b8af33d6a3273697eea91e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1870,6 +1870,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524
|
||||
return;
|
||||
}
|
||||
+ // Paper start
|
||||
+ itemstack = this.player.getItemInHand(enumhand);
|
||||
+ if (itemstack.isEmpty()) return;
|
||||
+ // Paper end
|
||||
InteractionResult enuminteractionresult = this.player.gameMode.useItem(this.player, worldserver, itemstack, enumhand);
|
||||
|
||||
if (enuminteractionresult.shouldSwing()) {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user