diff --git a/src/main/java/net/zepalesque/redux/item/VeridiumItem.java b/src/main/java/net/zepalesque/redux/item/VeridiumItem.java index a10c1eec9..e4ee77f6b 100644 --- a/src/main/java/net/zepalesque/redux/item/VeridiumItem.java +++ b/src/main/java/net/zepalesque/redux/item/VeridiumItem.java @@ -66,17 +66,16 @@ default ItemStack deplete(ItemStack stack, @Nullable LivingEntity user, int amou if (user != null && user.level().isClientSide()) { return stack; } - if (stack.getItem() instanceof VeridiumItem vi) { - CompoundTag tag = stack.getOrCreateTag(); - if (tag.getByte(NBT_KEY) > amount) { - byte infusion = (byte) (tag.getByte(NBT_KEY) - amount); - stack.addTagElement(NBT_KEY, ByteTag.valueOf(infusion)); - } else { - if (user != null && !user.level().isClientSide() && user instanceof ServerPlayer sp) { - sp.connection.send(new ClientboundSoundPacket(getUninfuseSound(), SoundSource.PLAYERS, sp.getX(), sp.getY(), sp.getZ(), 0.8F, 0.8F + sp.level().getRandom().nextFloat() * 0.4F, sp.level().getRandom().nextLong())); - } - return vi.getUninfusedStack(stack); + + CompoundTag tag = stack.getOrCreateTag(); + if (tag.getByte(NBT_KEY) > amount) { + byte infusion = (byte) (tag.getByte(NBT_KEY) - amount); + stack.addTagElement(NBT_KEY, ByteTag.valueOf(infusion)); + } else { + if (user != null && !user.level().isClientSide() && user instanceof ServerPlayer sp) { + sp.connection.send(new ClientboundSoundPacket(getUninfuseSound(), SoundSource.PLAYERS, sp.getX(), sp.getY(), sp.getZ(), 0.8F, 0.8F + sp.level().getRandom().nextFloat() * 0.4F, sp.level().getRandom().nextLong())); } + return this.getUninfusedStack(stack); } return null; }