Skip to content

Commit

Permalink
fix merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Nov 5, 2024
1 parent 79687ff commit 1ad8df7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public static boolean isProbablyAdminSword(@Nullable ItemStack stack) {
}

@Contract("null, _ -> null")
public static @Nullable NBTBase getTag(@Nullable ItemStack stack, @NotNull String key) {
public static @Nullable Tag getTag(@Nullable ItemStack stack, @NotNull String key) {
if (stack == null || stack.getType().isAir()) return null;
NBTTagCompound tag = CraftItemStack.asNMSCopy(stack).getTag();
CompoundTag tag = CraftItemStack.asNMSCopy(stack).getTag();
if (tag == null) return null;
return tag.get(key);
}
Expand All @@ -59,7 +59,7 @@ public static boolean isProbablyAdminSword(@Nullable ItemStack stack) {

public static int getIntTag(@Nullable ItemStack stack, @NotNull String key) {
if (stack == null || stack.getType().isAir()) return 0;
NBTTagCompound tag = CraftItemStack.asNMSCopy(stack).getTag();
CompoundTag tag = CraftItemStack.asNMSCopy(stack).getTag();
if (tag == null) return 0;
return tag.getInt(key);
}
Expand Down Expand Up @@ -179,7 +179,7 @@ public static ItemStack restoreTag(@Nullable ItemStack stack) {
ItemStack newStack = setTag(stack, null, backup);
for (String bypassTag : RESTORE_BYPASS_SET) {
if (containsTag(stack, bypassTag)) {
NBTBase value = getTag(stack, bypassTag);
Tag value = getTag(stack, bypassTag);
assert value != null;
newStack = setTag(newStack, bypassTag, value);
}
Expand Down

0 comments on commit 1ad8df7

Please sign in to comment.