Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
SPIGOT-2790: Remove negative item ID filtering again
Dieser Commit ist enthalten in:
Ursprung
0805f60443
Commit
8095a750e7
@ -20,7 +20,7 @@
|
|||||||
public final class ItemStack {
|
public final class ItemStack {
|
||||||
|
|
||||||
public static final ItemStack a = new ItemStack((Item) null);
|
public static final ItemStack a = new ItemStack((Item) null);
|
||||||
@@ -46,6 +59,15 @@
|
@@ -46,28 +59,49 @@
|
||||||
this.item = item;
|
this.item = item;
|
||||||
this.damage = j;
|
this.damage = j;
|
||||||
this.count = i;
|
this.count = i;
|
||||||
@ -34,9 +34,11 @@
|
|||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
if (this.damage < 0) {
|
if (this.damage < 0) {
|
||||||
this.damage = 0;
|
- this.damage = 0;
|
||||||
|
+ // this.damage = 0; // CraftBukkit - remove this.
|
||||||
}
|
}
|
||||||
@@ -54,20 +76,32 @@
|
|
||||||
|
this.F();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void F() {
|
private void F() {
|
||||||
@ -52,7 +54,7 @@
|
|||||||
- this.damage = Math.max(0, nbttagcompound.getShort("Damage"));
|
- this.damage = Math.max(0, nbttagcompound.getShort("Damage"));
|
||||||
+ // CraftBukkit start - Route through setData for filtering
|
+ // CraftBukkit start - Route through setData for filtering
|
||||||
+ // this.damage = Math.max(0, nbttagcompound.getShort("Damage"));
|
+ // this.damage = Math.max(0, nbttagcompound.getShort("Damage"));
|
||||||
+ this.setData(Math.max(0, nbttagcompound.getShort("Damage")));
|
+ this.setData(nbttagcompound.getShort("Damage"));
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
if (nbttagcompound.hasKeyOfType("tag", 10)) {
|
if (nbttagcompound.hasKeyOfType("tag", 10)) {
|
||||||
@ -247,7 +249,8 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
this.damage = i;
|
this.damage = i;
|
||||||
if (this.damage < 0) {
|
if (this.damage < 0) {
|
||||||
this.damage = 0;
|
- this.damage = 0;
|
||||||
|
+ // this.damage = 0; // CraftBukkit - remove this.
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren