Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: 84f3da35 SPIGOT-5054: Prevent issue with invalid hanging entities dfa7583f SPIGOT-4734: Sign placement fails when looking at grass
Dieser Commit ist enthalten in:
Ursprung
a0a6ab18b7
Commit
df9c322286
@ -1,4 +1,4 @@
|
||||
From acf9c715648075076c1438814a611103748ec3a0 Mon Sep 17 00:00:00 2001
|
||||
From 92fe4db1e3d4ad1435ad12587ccf2af74c0a515d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
||||
Subject: [PATCH] MC Utils
|
||||
@ -277,7 +277,7 @@ index b8abd6363f..a07ee150c2 100644
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 9e763b6e39..a7fc148591 100644
|
||||
index 3e9621aea2..6a85fecb79 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -36,10 +36,19 @@ import org.bukkit.event.world.StructureGrowEvent;
|
||||
@ -301,7 +301,7 @@ index 9e763b6e39..a7fc148591 100644
|
||||
@Deprecated
|
||||
private Item item;
|
||||
private NBTTagCompound tag;
|
||||
@@ -590,6 +599,17 @@ public final class ItemStack {
|
||||
@@ -593,6 +602,17 @@ public final class ItemStack {
|
||||
return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList();
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ index 9e763b6e39..a7fc148591 100644
|
||||
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
|
||||
this.tag = nbttagcompound;
|
||||
}
|
||||
@@ -674,6 +694,7 @@ public final class ItemStack {
|
||||
@@ -677,6 +697,7 @@ public final class ItemStack {
|
||||
return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false;
|
||||
}
|
||||
|
||||
@ -327,7 +327,7 @@ index 9e763b6e39..a7fc148591 100644
|
||||
public void a(String s, NBTBase nbtbase) {
|
||||
this.getOrCreateTag().set(s, nbtbase);
|
||||
}
|
||||
@@ -747,6 +768,7 @@ public final class ItemStack {
|
||||
@@ -750,6 +771,7 @@ public final class ItemStack {
|
||||
// CraftBukkit start
|
||||
@Deprecated
|
||||
public void setItem(Item item) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 08653afb00866b63ce45e73d12eac4be100fe9f9 Mon Sep 17 00:00:00 2001
|
||||
From c66fe6923ac746798de73d909fe6c62d8352bd06 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 28 May 2015 23:00:19 -0400
|
||||
Subject: [PATCH] Handle Item Meta Inconsistencies
|
||||
@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
|
||||
ItemMeta API equivalents, and should deprecate the old API's.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index a7fc148591..37d37f1f64 100644
|
||||
index 6a85fecb79..d8a5a78bdf 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
|
||||
@ -61,7 +61,7 @@ index a7fc148591..37d37f1f64 100644
|
||||
this.getItem().a(this.tag);
|
||||
// CraftBukkit end
|
||||
}
|
||||
@@ -612,6 +631,7 @@ public final class ItemStack {
|
||||
@@ -615,6 +634,7 @@ public final class ItemStack {
|
||||
// Paper end
|
||||
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
|
||||
this.tag = nbttagcompound;
|
||||
@ -69,7 +69,7 @@ index a7fc148591..37d37f1f64 100644
|
||||
}
|
||||
|
||||
public IChatBaseComponent getName() {
|
||||
@@ -688,6 +708,7 @@ public final class ItemStack {
|
||||
@@ -691,6 +711,7 @@ public final class ItemStack {
|
||||
nbttagcompound.setString("id", String.valueOf(IRegistry.ENCHANTMENT.getKey(enchantment)));
|
||||
nbttagcompound.setShort("lvl", (short) ((byte) i));
|
||||
nbttaglist.add((NBTBase) nbttagcompound);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c386a2b894d68b0d9cc0cd0710b616de0585cf4b Mon Sep 17 00:00:00 2001
|
||||
From 0ca047e7ba84c89d31537209fd94925619ae983a Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 5 Jun 2018 23:00:29 -0400
|
||||
Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 927394333a..c1b6eb52bf 100644
|
||||
index 7ef3a0d878..3926a57aad 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -548,6 +548,7 @@ public final class ItemStack {
|
||||
@@ -551,6 +551,7 @@ public final class ItemStack {
|
||||
this.getItem().b(this, world, entityhuman);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 299cee7fed5ab4af4ff1096312c690260696221f Mon Sep 17 00:00:00 2001
|
||||
From 151a5ecc03482e3ee9139f96edb6baeed604bff1 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 27 Apr 2016 22:09:52 -0400
|
||||
Subject: [PATCH] Optimize Hoppers
|
||||
@ -31,10 +31,10 @@ index 0b60ca82ce..e87fb94c06 100644
|
||||
private void disableSprintInterruptionOnAttack() {
|
||||
disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 0420589faa..0d06db9355 100644
|
||||
index 8347264daf..8b0172838f 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -485,8 +485,9 @@ public final class ItemStack {
|
||||
@@ -488,8 +488,9 @@ public final class ItemStack {
|
||||
return this.getItem().a(this, entityhuman, entityliving, enumhand);
|
||||
}
|
||||
|
||||
|
@ -1,55 +0,0 @@
|
||||
From 5101cc45bfa0c0bfe7b10ec48a179486dda609b0 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Wed, 17 Apr 2019 00:48:59 +0100
|
||||
Subject: [PATCH] Fix NPE from sign placement
|
||||
|
||||
This fixes issues with upstreams changes to solve a private issue on
|
||||
their side, as signs are placed, they may replace existing blocks, e.g.
|
||||
grass, which breaks upstreams assumption that the sign is always placed
|
||||
adjacent to a surface
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index f5d9b4abc2..fdbe9a2adc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -70,6 +70,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
public EntityFishingHook hookedFish;
|
||||
// Paper start
|
||||
public boolean affectsSpawning = true;
|
||||
+ public BlockPosition openingSign = null; // Paper - fix NPE when opening signs
|
||||
// Paper end
|
||||
// Paper start - Player view distance API
|
||||
private int viewDistance = -1;
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemSign.java b/src/main/java/net/minecraft/server/ItemSign.java
|
||||
index 11045ee1e1..7808aed0c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemSign.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemSign.java
|
||||
@@ -16,6 +16,7 @@ public class ItemSign extends ItemBlockWallable {
|
||||
if (!world.isClientSide && !flag && entityhuman != null) {
|
||||
// CraftBukkit start - SPIGOT-4678
|
||||
// entityhuman.openSign((TileEntitySign) world.getTileEntity(blockposition));
|
||||
+ entityhuman.openingSign = blockposition; // Paper - fix NPE when opening signs
|
||||
ItemSign.openSign = true;
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index f8d82a0276..ccc0826bc6 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -305,7 +305,12 @@ public final class ItemStack {
|
||||
// SPIGOT-4678
|
||||
if (this.item instanceof ItemSign && ItemSign.openSign) {
|
||||
ItemSign.openSign = false;
|
||||
- entityhuman.openSign((TileEntitySign) world.getTileEntity(new BlockActionContext(itemactioncontext).getClickPosition()));
|
||||
+ // Paper start - fix NPE when opening signs
|
||||
+ if (entityhuman.openingSign != null) {
|
||||
+ entityhuman.openSign((TileEntitySign) world.getTileEntity(entityhuman.openingSign));
|
||||
+ entityhuman.openingSign = null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
// SPIGOT-1288 - play sound stripped from ItemBlock
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a22319f1c97b10ac0fc4e94467a2502c10e1c859 Mon Sep 17 00:00:00 2001
|
||||
From bd170d71d97e59ff334f4f6291dc32e207ec8942 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 19 Apr 2019 12:41:13 -0500
|
||||
Subject: [PATCH] Mob Spawner API Enhancements
|
@ -1,4 +1,4 @@
|
||||
From 701880fb5c0094c2569b8c7340cf0fa4277433ac Mon Sep 17 00:00:00 2001
|
||||
From 23fe4c38f7f9259bf6d1f325a771d796c752dc62 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Mon, 22 Apr 2019 19:51:14 +0100
|
||||
Subject: [PATCH] don't NPE on dimensionmanager toString
|
||||
@ -14,7 +14,7 @@ this is not super elegant, but is the only route that promises not to
|
||||
break stuff.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9c5b79920f..e5242f9f87 100644
|
||||
index c41422a0a5..9fb6c09907 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -999,7 +999,14 @@ public final class CraftServer implements Server {
|
@ -1,4 +1,4 @@
|
||||
From 273c93317bcf0f5acd823b31eae7e1f2da65a0d8 Mon Sep 17 00:00:00 2001
|
||||
From 9ec941d0e530370963068c7ec2591959f01a3bcd Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Sat, 27 Apr 2019 20:00:43 +0100
|
||||
Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
|
@ -1,4 +1,4 @@
|
||||
From 4aaab5e21ab07136668aa409b8e2a2691c4f1c2b Mon Sep 17 00:00:00 2001
|
||||
From e614a03a2ad21fdf3e18965cdb4ade849a9a3fd4 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Mon, 10 Jun 2019 09:36:40 +0100
|
||||
Subject: [PATCH] Catch exceptions from dispenser entity spawns
|
@ -1 +1 @@
|
||||
Subproject commit a46fdbc62c828e3f038cacbad9b32607dcc5a2f4
|
||||
Subproject commit 84f3da353f467a940c6f889b5516a73c62da1f9e
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren