Remove some patches
This commit is contained in:
parent
b32a34c71d
commit
d3f1bc04b4
788 changed files with 21 additions and 32 deletions
|
@ -70,7 +70,7 @@ index 9861cd23b07f8fbacb1d125af835dee58c2debbb..e6a47317eb24fc65ed02a4d4f9c4b19b
|
||||||
|
|
||||||
public boolean isEnchanted() {
|
public boolean isEnchanted() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
index 7278ac809eff364e8b838d63a2ec1291493869f8..ee5989e52ce0b55d8bf867ab10801ba3252c88a5 100644
|
index 7278ac809eff364e8b838d63a2ec1291493869f8..0003d6508b0bd75130a3e0e21e252c5dc23a903c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
@@ -188,28 +188,11 @@ public final class CraftItemStack extends ItemStack {
|
@@ -188,28 +188,11 @@ public final class CraftItemStack extends ItemStack {
|
||||||
|
@ -107,23 +107,12 @@ index 7278ac809eff364e8b838d63a2ec1291493869f8..ee5989e52ce0b55d8bf867ab10801ba3
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean makeTag(net.minecraft.world.item.ItemStack item) {
|
static boolean makeTag(net.minecraft.world.item.ItemStack item) {
|
||||||
@@ -235,57 +218,40 @@ public final class CraftItemStack extends ItemStack {
|
@@ -235,57 +218,29 @@ public final class CraftItemStack extends ItemStack {
|
||||||
if (this.handle == null) {
|
if (this.handle == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
- return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.bukkitToMinecraft(ench), this.handle);
|
- return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.bukkitToMinecraft(ench), this.handle);
|
||||||
+ // Paper start - replace to allow custom enchantments
|
+ return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.getRaw(ench), handle);
|
||||||
+ final ListTag enchantments = this.handle.getEnchantmentTags();
|
|
||||||
+ for (int i = 0; i < enchantments.size(); i++) {
|
|
||||||
+ final CompoundTag tag = enchantments.getCompound(i);
|
|
||||||
+ final String id = tag.getString(CraftMetaItem.ENCHANTMENTS_ID.NBT);
|
|
||||||
+ final Enchantment enchant = Enchantment.getByKey(CraftNamespacedKey.fromStringOrNull(id));
|
|
||||||
+ if (ench.equals(enchant)) {
|
|
||||||
+ return EnchantmentHelper.getEnchantmentLevel(tag);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return 0;
|
|
||||||
+ // Paper end - replace to allow custom enchantments
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set.
|
||||||
Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves.
|
Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
index 550d3290c974eebdeb4bf9b90987448c5d3d2999..93a9d53c29d9b359d9d8618254085b7fcebe8cdf 100644
|
index 36bc8d587ef39baf4c85b30578d3066cb36ded21..1cd7a7ab18dca87090e7aba9c0683f937fdb6188 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
@@ -681,7 +681,7 @@ public final class CraftItemStack extends ItemStack {
|
@@ -670,7 +670,7 @@ public final class CraftItemStack extends ItemStack {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasItemMeta() {
|
public boolean hasItemMeta() {
|
||||||
|
|
|
@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this
|
||||||
server-internal fix makes this change future-proof.
|
server-internal fix makes this change future-proof.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
index fec4897ffc07f71efb8725efea341ba2878a1462..621cb07c02cf318bf1b72c14724a42e0987d5b2f 100644
|
index 01a2c6c3ee4e1500b6ee9986943f84dbe8663860..444119c813af920eb25706341106f0fea27befa8 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
@@ -185,7 +185,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
@@ -173,7 +173,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||||
this.shoot((double) f5, (double) f6, (double) f7, speed, divergence);
|
this.shoot((double) f5, (double) f6, (double) f7, speed, divergence);
|
||||||
Vec3 vec3d = shooter.getDeltaMovement();
|
Vec3 vec3d = shooter.getDeltaMovement();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue