mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
Make it compile again
This commit is contained in:
parent
a2b6275487
commit
c833571526
@ -70,7 +70,7 @@ index 9861cd23b07f8fbacb1d125af835dee58c2debbb..e6a47317eb24fc65ed02a4d4f9c4b19b
|
||||
|
||||
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
|
||||
index 7278ac809eff364e8b838d63a2ec1291493869f8..0003d6508b0bd75130a3e0e21e252c5dc23a903c 100644
|
||||
index 7278ac809eff364e8b838d63a2ec1291493869f8..7dd0c000fa7f363997178ffa6de7d39e17702348 100644
|
||||
--- a/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 {
|
||||
@ -107,15 +107,7 @@ index 7278ac809eff364e8b838d63a2ec1291493869f8..0003d6508b0bd75130a3e0e21e252c5d
|
||||
}
|
||||
|
||||
static boolean makeTag(net.minecraft.world.item.ItemStack item) {
|
||||
@@ -235,57 +218,29 @@ public final class CraftItemStack extends ItemStack {
|
||||
if (this.handle == null) {
|
||||
return 0;
|
||||
}
|
||||
- return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.bukkitToMinecraft(ench), this.handle);
|
||||
+ return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.getRaw(ench), handle);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -242,50 +225,22 @@ public final class CraftItemStack extends ItemStack {
|
||||
public int removeEnchantment(Enchantment ench) {
|
||||
Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nassim Jahnke <nassim@njahnke.dev>
|
||||
Date: Wed, 6 Dec 2023 21:24:54 +0100
|
||||
Subject: [PATCH] HACK id string codec in hover event
|
||||
|
||||
Temporary hack to remove serialization to the int array, since adventure has not been updated to deserialize this format
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/HoverEvent.java b/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
||||
index 7fd85ae2ebd7225f06d874aa7e37fbdb89e3ea92..7ff694a3dd492224dedfa00b4ff0ff3015b50d1c 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
||||
@@ -134,7 +134,7 @@ public class HoverEvent {
|
||||
public static final Codec<HoverEvent.EntityTooltipInfo> CODEC = RecordCodecBuilder.create((instance) -> {
|
||||
return instance.group(BuiltInRegistries.ENTITY_TYPE.byNameCodec().fieldOf("type").forGetter((content) -> {
|
||||
return content.type;
|
||||
- }), UUIDUtil.LENIENT_CODEC.fieldOf("id").forGetter((content) -> {
|
||||
+ }), UUIDUtil.STRING_CODEC.fieldOf("id").forGetter((content) -> {
|
||||
return content.id;
|
||||
}), ExtraCodecs.strictOptionalField(ComponentSerialization.CODEC, "name").forGetter((content) -> {
|
||||
return content.name;
|
Loading…
Reference in New Issue
Block a user