3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Update upstream

Dieser Commit ist enthalten in:
Aikar 2018-07-23 18:57:54 -04:00
Ursprung 4608731dca
Commit 9a17bddf12
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
16 geänderte Dateien mit 70 neuen und 70 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From b02d5605bac4c8543b6f9fb6935a997cb2fe4149 Mon Sep 17 00:00:00 2001
From 913761361c5a2b8da0f5eaa0ddfd7b6a18cc9ecc Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:55:48 -0400
Subject: [PATCH] ensureServerConversions API
@ -28,10 +28,10 @@ index 762c43d6..045c26d9 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 73f79b22..14b6b6b3 100644
index 41a43053..24a45189 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -487,7 +487,12 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
@@ -488,7 +488,12 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
}
}
@ -45,7 +45,7 @@ index 73f79b22..14b6b6b3 100644
}
/**
@@ -545,4 +550,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
@@ -546,4 +551,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
return true;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 5576e3c1a73f5a51ee3e041d001a827252a8d724 Mon Sep 17 00:00:00 2001
From 3f49c33bedc491bb19580f5713bf536f366b931a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:55:48 -0400
Subject: [PATCH] Add getI18NDisplayName API
@ -28,10 +28,10 @@ index 045c26d9..47bbc0f9 100644
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 14b6b6b3..ca7a958f 100644
index 24a45189..b1d0778f 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -563,5 +563,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
@@ -564,5 +564,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
public ItemStack ensureServerConversions() {
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
}

Datei anzeigen

@ -1,4 +1,4 @@
From 34ff6fed0aafab40ec06d9c768117a5c1b4f2d4e Mon Sep 17 00:00:00 2001
From 02c74afa96de75233566264502c5989c25f93eef Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Jun 2018 22:59:50 -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/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index ca7a958f..a240311e 100644
index b1d0778f..4385ca79 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -574,5 +574,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
@@ -575,5 +575,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
public String getI18NDisplayName() {
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
}

Datei anzeigen

@ -1,11 +1,11 @@
From 7cce1cf01bc05d8bbdbe79d43c1427c0acb7831d Mon Sep 17 00:00:00 2001
From ba60c4fe16615ca60be690c7bf4bb2bf30fd175f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 22 Jun 2018 22:59:18 -0400
Subject: [PATCH] ItemStack API additions for quantity/flags/lore
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index a240311e..c5befd8c 100644
index 4385ca79..7eb00104 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -2,7 +2,9 @@ package org.bukkit.inventory;
@ -27,7 +27,7 @@ index a240311e..c5befd8c 100644
/**
* Represents a stack of items
*/
@@ -582,5 +586,133 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
@@ -583,5 +587,133 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
// Requires access to NMS
return ensureServerConversions().getMaxItemUseDuration();
}

Datei anzeigen

@ -1,11 +1,11 @@
From 196e3b344fb42d27702bca99fd7e635d140d9d24 Mon Sep 17 00:00:00 2001
From fd30fe93ea2f20e2adb5e501d8646deabc046fcf 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
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index c3e990bdff..e2a7b4be2c 100644
index c3e990bdf..e2a7b4be2 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -93,7 +93,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
@ -18,7 +18,7 @@ index c3e990bdff..e2a7b4be2c 100644
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 121a137f3b..279045e499 100644
index 121a137f3..279045e49 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -10,7 +10,6 @@ import org.apache.logging.log4j.Logger;
@ -54,7 +54,7 @@ index 121a137f3b..279045e499 100644
return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 411ab6061b..cd4fbee0ca 100644
index 411ab6061..cd4fbee0c 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -28,7 +28,7 @@ import com.google.common.collect.Lists; // CraftBukkit
@ -75,7 +75,7 @@ index 411ab6061b..cd4fbee0ca 100644
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
index 00a530c51c..2947d9ff6a 100644
index 00a530c51..2947d9ff6 100644
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
@@ -24,6 +24,8 @@ public class ChunkCoordIntPair {
@ -88,7 +88,7 @@ index 00a530c51c..2947d9ff6a 100644
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
}
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index ca2a14d7ac..9a513b4e3a 100644
index ca2a14d7a..9a513b4e3 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -3,6 +3,7 @@ package net.minecraft.server;
@ -131,7 +131,7 @@ index ca2a14d7ac..9a513b4e3a 100644
private boolean c = true;
private boolean d = true;
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 1e27433b90..c973397898 100644
index f5e311f2a..cf679df7b 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -25,6 +25,7 @@ import org.bukkit.Location;
@ -142,7 +142,7 @@ index 1e27433b90..c973397898 100644
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.entity.Player;
import org.bukkit.event.world.StructureGrowEvent;
@@ -563,6 +564,17 @@ public final class ItemStack {
@@ -551,6 +552,17 @@ public final class ItemStack {
return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList();
}
@ -161,7 +161,7 @@ index 1e27433b90..c973397898 100644
this.tag = nbttagcompound;
}
diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
index a540167d6d..add618866b 100644
index a540167d6..add618866 100644
--- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java
+++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
@@ -85,11 +85,11 @@ public abstract class LotoSelectorEntry {
@ -180,7 +180,7 @@ index a540167d6d..add618866b 100644
}
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
new file mode 100644
index 0000000000..70cdc3f102
index 000000000..70cdc3f10
--- /dev/null
+++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -0,0 +1,292 @@
@ -477,7 +477,7 @@ index 0000000000..70cdc3f102
+ }
+}
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
index 8170a84280..e21e60b003 100644
index 8170a8428..e21e60b00 100644
--- a/src/main/java/net/minecraft/server/NBTBase.java
+++ b/src/main/java/net/minecraft/server/NBTBase.java
@@ -20,7 +20,7 @@ public interface NBTBase {
@ -499,7 +499,7 @@ index 8170a84280..e21e60b003 100644
case 0:
return "TAG_End";
diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java
index 1a81d8e5f6..057c2077a0 100644
index 1a81d8e5f..057c2077a 100644
--- a/src/main/java/net/minecraft/server/NBTList.java
+++ b/src/main/java/net/minecraft/server/NBTList.java
@@ -13,7 +13,7 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
@ -525,7 +525,7 @@ index 1a81d8e5f6..057c2077a0 100644
+ public abstract NBTList<T> clone(); // Paper - decompile fix
}
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
index 11ffa6c342..3ff3a29835 100644
index 11ffa6c34..3ff3a2983 100644
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
@@ -66,7 +66,8 @@ public class NBTTagByteArray extends NBTList<NBTTagByte> {
@ -539,7 +539,7 @@ index 11ffa6c342..3ff3a29835 100644
System.arraycopy(this.data, 0, abyte, 0, this.data.length);
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
index 7fc9b5ff32..e658816c24 100644
index 7fc9b5ff3..e658816c2 100644
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
@@ -24,7 +24,7 @@ public class NBTTagCompound implements NBTBase {
@ -575,7 +575,7 @@ index 7fc9b5ff32..e658816c24 100644
- }
}
diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java
index f5c9b97d5c..d121ad4f7a 100644
index f5c9b97d5..d121ad4f7 100644
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
@@ -132,7 +132,7 @@ public class NBTTagIntArray extends NBTList<NBTTagInt> {
@ -588,7 +588,7 @@ index f5c9b97d5c..d121ad4f7a 100644
}
}
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index b3c944d701..a8280acf94 100644
index b3c944d70..a8280acf9 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
@ -626,7 +626,7 @@ index b3c944d701..a8280acf94 100644
- }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 2f2f4c6c60..556989f603 100644
index 0618962e7..42e0630e6 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -66,9 +66,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@ -643,7 +643,7 @@ index 2f2f4c6c60..556989f603 100644
private volatile int chatThrottle;
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
index ef332d6517..7cc7eb7735 100644
index ef332d651..7cc7eb773 100644
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
@@ -8,7 +8,7 @@ import java.util.Iterator;
@ -665,7 +665,7 @@ index ef332d6517..7cc7eb7735 100644
this.c.set(i, t0);
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
index 2179664a0c..d7e1ecc031 100644
index 2179664a0..d7e1ecc03 100644
--- a/src/main/java/net/minecraft/server/ServerPing.java
+++ b/src/main/java/net/minecraft/server/ServerPing.java
@@ -102,11 +102,11 @@ public class ServerPing {

Datei anzeigen

@ -1,11 +1,11 @@
From 522f622aa3d885d5b3bd892b89dec52866b0a273 Mon Sep 17 00:00:00 2001
From b76742efb1e1fbab724579730c3790783c0e0b49 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Wed, 2 Mar 2016 23:42:37 -0600
Subject: [PATCH] Use UserCache for player heads
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 4cfc70aa7..52de1439e 100644
index e5b9310ea..e9e2c1445 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -6,6 +6,7 @@ import net.minecraft.server.GameProfileSerializer;
@ -16,7 +16,7 @@ index 4cfc70aa7..52de1439e 100644
import org.bukkit.Bukkit;
import org.bukkit.Material;
@@ -153,7 +154,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -152,7 +153,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
if (name == null) {
profile = null;
} else {

Datei anzeigen

@ -1,14 +1,14 @@
From 54b195686cf6fb4e7669f2f823b5da49e7bf7155 Mon Sep 17 00:00:00 2001
From 383cb078929132e57e648249639e8fc7cd507ea4 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:33:53 -0600
Subject: [PATCH] Ensure inv drag is in bounds
diff --git a/src/main/java/net/minecraft/server/Container.java b/src/main/java/net/minecraft/server/Container.java
index e86ffb4dc..0bf14b671 100644
index 0ae0b5ed8..1573c0559 100644
--- a/src/main/java/net/minecraft/server/Container.java
+++ b/src/main/java/net/minecraft/server/Container.java
@@ -141,7 +141,7 @@ public abstract class Container {
@@ -139,7 +139,7 @@ public abstract class Container {
this.c();
}
} else if (this.g == 1) {

Datei anzeigen

@ -1,4 +1,4 @@
From a796eafbb7a903319071385b8f6aef1a0c9bcb4b Mon Sep 17 00:00:00 2001
From fd32275617a0d2891d8c394d86851638933edbb3 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 c973397898..e120521611 100644
index cf679df7b..405b867fe 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 c973397898..e120521611 100644
this.getItem().a(this.tag);
// CraftBukkit end
}
@@ -577,6 +596,7 @@ public final class ItemStack {
@@ -565,6 +584,7 @@ public final class ItemStack {
// Paper end
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
this.tag = nbttagcompound;
@ -69,7 +69,7 @@ index c973397898..e120521611 100644
}
public IChatBaseComponent getName() {
@@ -653,6 +673,7 @@ public final class ItemStack {
@@ -641,6 +661,7 @@ public final class ItemStack {
nbttagcompound.setString("id", String.valueOf(Enchantment.enchantments.b(enchantment)));
nbttagcompound.setShort("lvl", (short) ((byte) i));
nbttaglist.add((NBTBase) nbttagcompound);
@ -78,7 +78,7 @@ index c973397898..e120521611 100644
public boolean hasEnchantments() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index d41459ef01..cadff64bfb 100644
index f4672b9a4..e2699564a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS;
@ -89,7 +89,7 @@ index d41459ef01..cadff64bfb 100644
import java.util.Map;
import net.minecraft.server.EnchantmentManager;
@@ -185,28 +186,11 @@ public final class CraftItemStack extends ItemStack {
@@ -186,28 +187,11 @@ public final class CraftItemStack extends ItemStack {
public void addUnsafeEnchantment(Enchantment ench, int level) {
Validate.notNull(ench, "Cannot add null enchantment");
@ -123,7 +123,7 @@ index d41459ef01..cadff64bfb 100644
}
static boolean makeTag(net.minecraft.server.ItemStack item) {
@@ -223,66 +207,35 @@ public final class CraftItemStack extends ItemStack {
@@ -224,66 +208,35 @@ public final class CraftItemStack extends ItemStack {
@Override
public boolean containsEnchantment(Enchantment ench) {
@ -204,7 +204,7 @@ index d41459ef01..cadff64bfb 100644
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index b2190b01d4..f1430d226f 100644
index b2190b01d..f1430d226 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -8,12 +8,14 @@ import java.lang.reflect.Constructor;

Datei anzeigen

@ -1,4 +1,4 @@
From ed06a3f52e0a0fd9899b4f5c9082bab768bc7c60 Mon Sep 17 00:00:00 2001
From 27d25274373a6f4533ce86ef73351e049c0f127b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 22:43:12 -0400
Subject: [PATCH] Implement ensureServerConversions API
@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
to ensure it meets latest minecraft expectations.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 59d2685dc8..27a264f549 100644
index 0fb3c238a..e98e1ed72 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -288,4 +288,10 @@ public final class CraftItemFactory implements ItemFactory {
@@ -287,4 +287,10 @@ public final class CraftItemFactory implements ItemFactory {
public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException {
return ((CraftMetaItem) meta).updateMaterial(material);
}

Datei anzeigen

@ -1,4 +1,4 @@
From e093780dd2f3014b31a6baacb6cafe05c05c50f7 Mon Sep 17 00:00:00 2001
From 570da01a74b273d367daa8ffbd4e4c38ed323aee Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:59:38 -0400
Subject: [PATCH] Implement getI18NDisplayName
@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 27a264f549..1cdbdf6d07 100644
index e98e1ed72..1df2b463a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -293,5 +293,18 @@ public final class CraftItemFactory implements ItemFactory {
@@ -292,5 +292,18 @@ public final class CraftItemFactory implements ItemFactory {
public ItemStack ensureServerConversions(ItemStack item) {
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
}

Datei anzeigen

@ -1,4 +1,4 @@
From ca32eb428518822c63a80eaee3602dad31fea886 Mon Sep 17 00:00:00 2001
From 5419d733dfcb2453954fa596166dd20e45ca00ef Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 19 Jan 2018 00:36:25 -0500
Subject: [PATCH] Add SkullMeta.setPlayerProfile API
@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo
which commonly cause rate limit issues with Mojang API
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 52de1439e7..960ae59ae1 100644
index e9e2c1445..d894fadef 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -2,6 +2,8 @@ package org.bukkit.craftbukkit.inventory;
@ -28,7 +28,7 @@ index 52de1439e7..960ae59ae1 100644
@DelegateDeserialization(SerializableMeta.class)
class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -131,6 +135,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -130,6 +134,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
return hasOwner() ? profile.getName() : null;
}

Datei anzeigen

@ -1,4 +1,4 @@
From 73d8cb3ae3e2d449ea00aaa96463effced959b27 Mon Sep 17 00:00:00 2001
From df8e9629b712132122452369684018f4c3926421 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 27 Jan 2018 17:04:14 -0500
Subject: [PATCH] Add ArmorStand Item Meta
@ -13,10 +13,10 @@ starting point for future additions in this area.
Fixes GH-559
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 1cdbdf6d07..da109e35a8 100644
index 1df2b463a..abdbd4989 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -184,6 +184,8 @@ public final class CraftItemFactory implements ItemFactory {
@@ -183,6 +183,8 @@ public final class CraftItemFactory implements ItemFactory {
return meta instanceof CraftMetaSpawnEgg ? meta : new CraftMetaSpawnEgg(meta);
case KNOWLEDGE_BOOK:
return meta instanceof CraftMetaKnowledgeBook ? meta : new CraftMetaKnowledgeBook(meta);
@ -26,7 +26,7 @@ index 1cdbdf6d07..da109e35a8 100644
case CHEST:
case TRAPPED_CHEST:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index cadff64bfb..b1e0d61856 100644
index e2699564a..aad380c3b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -395,6 +395,8 @@ public final class CraftItemStack extends ItemStack {
@ -40,7 +40,7 @@ index cadff64bfb..b1e0d61856 100644
case TRAPPED_CHEST:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
new file mode 100644
index 0000000000..30941c7b0c
index 000000000..30941c7b0
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
@@ -0,0 +1,309 @@
@ -354,7 +354,7 @@ index 0000000000..30941c7b0c
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index f1430d226f..a3f293e4cc 100644
index f1430d226..a3f293e4c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -136,6 +136,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@ -383,7 +383,7 @@ index f1430d226f..a3f293e4cc 100644
}
return HANDLED_TAGS;
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index f66cc81d9e..eb6cf1bb33 100644
index f66cc81d9..eb6cf1bb3 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
@@ -6,6 +6,7 @@ import static org.hamcrest.Matchers.*;

Datei anzeigen

@ -1,4 +1,4 @@
From 425c25691fe2dd228b01f6e4b20eb050440a85c5 Mon Sep 17 00:00:00 2001
From 2e865fce8dd06dc0afb86b40b01167f00593e59e 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 023dd48a23..00691f6de9 100644
index e71d75a77..3c7a40c23 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -524,6 +524,7 @@ public final class ItemStack {
@@ -512,6 +512,7 @@ public final class ItemStack {
this.getItem().b(this, world, entityhuman);
}
@ -18,10 +18,10 @@ index 023dd48a23..00691f6de9 100644
return this.getItem().c(this);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index b1e0d61856..03f6115181 100644
index aad380c3b..5f3331de1 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -182,6 +182,13 @@ public final class CraftItemStack extends ItemStack {
@@ -183,6 +183,13 @@ public final class CraftItemStack extends ItemStack {
return (handle == null) ? Material.AIR.getMaxStackSize() : handle.getItem().getMaxStackSize();
}

@ -1 +1 @@
Subproject commit b7b10ad1c3cd0c03c041e2958a37895ce6990f65
Subproject commit 0f4e33e9c7a5b3fc9912c67265b725db43fc92cb

@ -1 +1 @@
Subproject commit 587014503baa1ccdfb835404e1a88f1c0e1915d5
Subproject commit ea7b61290a39f0ab355d7a723907ed312f713b05

@ -1 +1 @@
Subproject commit a85f7ec0de6263efed322bb8527c6360ea1109a7
Subproject commit 0b44fa0bd4ed14ac6ae791d7f9a486d31382a0c7