From 2aee248d8aba81ec45c9808dd966872ade770a1c Mon Sep 17 00:00:00 2001 From: doctor4t <25477005+doctor4t@users.noreply.github.com> Date: Wed, 1 Dec 2021 11:14:59 +0100 Subject: [PATCH] Update to 1.18 --- CHANGELOG.md | 7 +++++++ build.gradle | 2 +- changelog.md | 11 ----------- gradle.properties | 16 ++++++++++------ gradle/wrapper/gradle-wrapper.properties | 2 +- src/CHANGELOG.md | 4 ---- .../common/enchantment/BetterLoyalty.java | 2 +- .../impaled/common/item/ElderTridentItem.java | 2 +- .../impaled/common/item/HellforkItem.java | 16 ++++++++-------- .../impaled/common/item/ImpaledTridentItem.java | 2 +- .../impaled/common/item/MaelstromItem.java | 2 +- .../ladysnake/sincereloyalty/LoyalTrident.java | 10 +++++----- .../ladysnake/sincereloyalty/SincereLoyalty.java | 4 ++-- .../sincereloyalty/mixin/ItemMixin.java | 2 +- .../mixin/ServerPlayNetworkHandlerMixin.java | 2 +- .../mixin/SmithingScreenHandlerMixin.java | 2 +- .../sincereloyalty/mixin/TridentItemMixin.java | 2 +- .../mixin/client/ItemStackMixin.java | 4 ++-- .../storage/InventoryTridentEntry.java | 2 +- 19 files changed, 45 insertions(+), 49 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 changelog.md delete mode 100644 src/CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f45e61d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Impaled - Changelog: + +### Impaled 1.0.2 - 1.18 +- Updated to Minecraft 1.18 + +### Impaled 1.0.1 - 1.17 +- Updated to Minecraft 1.17 \ No newline at end of file diff --git a/build.gradle b/build.gradle index c8839ad..2ff9f44 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.8-SNAPSHOT' + id 'fabric-loom' version '0.10-SNAPSHOT' id 'maven-publish' id 'com.matthewprenger.cursegradle' version '1.4.0' id 'org.ajoberstar.grgit' version '3.1.1' diff --git a/changelog.md b/changelog.md deleted file mode 100644 index 7a97bea..0000000 --- a/changelog.md +++ /dev/null @@ -1,11 +0,0 @@ ------------------------------------------------------- -Version 1.4.6 ------------------------------------------------------- -Additions -- None - -Changes -- None - -Bug Fixes -- None diff --git a/gradle.properties b/gradle.properties index 4bdec43..4f9d85e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,15 +2,19 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties -minecraft_version=1.17 -yarn_mappings=1.17+build.11 -loader_version=0.11.6 + + +minecraft_version=1.18 +yarn_mappings=1.18+build.1 +loader_version=0.12.8 #Fabric api -fabric_version=0.35.1+1.17 +fabric_version=0.43.1+1.18 + + # Mod Properties -mod_version = 1.0.1 +mod_version = 1.0.2 maven_group = io.github.ladysnake archives_base_name = impaled @@ -24,7 +28,7 @@ vanguard_version=1.0.+ owners = Ladysnake license_header = CC-BY-NC-SA+4.0 curseforge_id = 478843 -curseforge_versions = 1.17 +curseforge_versions = 1.18 cf_requirements = fabric-api release_type = release changelog_url = https://github.com/Ladysnake/Impaled/blob/main/CHANGELOG.md \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f371643..ffed3a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md deleted file mode 100644 index f711d1f..0000000 --- a/src/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -# Impaled - Changelog: - -### Impaled 1.0.1 - 1.17 -- Updated to Minecraft 1.17 \ No newline at end of file diff --git a/src/main/java/ladysnake/impaled/common/enchantment/BetterLoyalty.java b/src/main/java/ladysnake/impaled/common/enchantment/BetterLoyalty.java index dfeb81b..89fd236 100644 --- a/src/main/java/ladysnake/impaled/common/enchantment/BetterLoyalty.java +++ b/src/main/java/ladysnake/impaled/common/enchantment/BetterLoyalty.java @@ -10,7 +10,7 @@ public final class BetterLoyalty { public static boolean tryInsertTrident(ItemStack stack, PlayerEntity player) { - NbtCompound tag = stack.getSubTag(LoyalTrident.MOD_NBT_KEY); + NbtCompound tag = stack.getSubNbt(LoyalTrident.MOD_NBT_KEY); if (tag != null) { TridentRecaller caller = (TridentRecaller) player; diff --git a/src/main/java/ladysnake/impaled/common/item/ElderTridentItem.java b/src/main/java/ladysnake/impaled/common/item/ElderTridentItem.java index d44fab0..255fa6f 100644 --- a/src/main/java/ladysnake/impaled/common/item/ElderTridentItem.java +++ b/src/main/java/ladysnake/impaled/common/item/ElderTridentItem.java @@ -31,7 +31,7 @@ public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int trident.setTridentAttributes(world, user, stack); trident.setOwner(user); trident.setTridentStack(stack); - trident.setProperties(user, user.getPitch(), user.getYaw(), 0.0F, 2.5F, 1.0F); + trident.setVelocity(user, user.getPitch(), user.getYaw(), 0.0F, 2.5F, 1.0F); trident.updatePosition(user.getX()+user.getRandom().nextGaussian(), user.getEyeY()+user.getRandom().nextGaussian(), user.getZ()+user.getRandom().nextGaussian()); trident.addVelocity(user.getRandom().nextGaussian()/10, 0, user.getRandom().nextGaussian()/10); diff --git a/src/main/java/ladysnake/impaled/common/item/HellforkItem.java b/src/main/java/ladysnake/impaled/common/item/HellforkItem.java index 05592a3..c29b93c 100644 --- a/src/main/java/ladysnake/impaled/common/item/HellforkItem.java +++ b/src/main/java/ladysnake/impaled/common/item/HellforkItem.java @@ -71,14 +71,14 @@ public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, } if (hellfork != null) { - if (hellfork.getTag() != null && hellfork.getTag().contains("Heated")) { - if (hellfork.getTag().getBoolean("Heated")) { + if (hellfork.getNbt() != null && hellfork.getNbt().contains("Heated")) { + if (hellfork.getNbt().getBoolean("Heated")) { if (entity.getFireTicks() <= 0) { entity.setFireTicks(35); } } } else { - hellfork.getTag().putBoolean("Heated", false); + hellfork.getNbt().putBoolean("Heated", false); } } } @@ -86,8 +86,8 @@ public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, @Override public ActionResult useOnBlock(ItemUsageContext context) { - if (context.getWorld().getBlockState(context.getBlockPos()).getBlock() == Blocks.LAVA_CAULDRON && !context.getStack().getTag().getBoolean("Heated")) { - context.getStack().getTag().putBoolean("Heated", true); + if (context.getWorld().getBlockState(context.getBlockPos()).getBlock() == Blocks.LAVA_CAULDRON && !context.getStack().getNbt().getBoolean("Heated")) { + context.getStack().getNbt().putBoolean("Heated", true); context.getWorld().playSound(context.getPlayer().getX(), context.getPlayer().getY(), context.getPlayer().getZ(), SoundEvents.ITEM_FIRECHARGE_USE, SoundCategory.PLAYERS, 1.0f, 1.0f, false); context.getWorld().playSound(context.getPlayer().getX(), context.getPlayer().getY(), context.getPlayer().getZ(), SoundEvents.BLOCK_ENCHANTMENT_TABLE_USE, SoundCategory.PLAYERS, 1.0f, 1.0f, false); context.getWorld().setBlockState(context.getBlockPos(), Blocks.CAULDRON.getDefaultState()); @@ -95,8 +95,8 @@ public ActionResult useOnBlock(ItemUsageContext context) { context.getWorld().addParticle(ParticleTypes.LAVA, context.getBlockPos().getX()+.5+context.getWorld().getRandom().nextGaussian()/10, context.getBlockPos().getY()+.5+context.getWorld().getRandom().nextGaussian()/10, context.getBlockPos().getZ()+.5+context.getWorld().getRandom().nextGaussian()/10, 0, context.getWorld().getRandom().nextFloat()/10, 0); } return ActionResult.SUCCESS; - } else if ((context.getWorld().getBlockState(context.getBlockPos()).getBlock() == Blocks.WATER_CAULDRON || context.getWorld().getBlockState(context.getBlockPos()).getBlock() == Blocks.POWDER_SNOW_CAULDRON) && context.getStack().getTag().getBoolean("Heated")) { - context.getStack().getTag().putBoolean("Heated", false); + } else if ((context.getWorld().getBlockState(context.getBlockPos()).getBlock() == Blocks.WATER_CAULDRON || context.getWorld().getBlockState(context.getBlockPos()).getBlock() == Blocks.POWDER_SNOW_CAULDRON) && context.getStack().getNbt().getBoolean("Heated")) { + context.getStack().getNbt().putBoolean("Heated", false); context.getWorld().playSound(context.getPlayer().getX(), context.getPlayer().getY(), context.getPlayer().getZ(), SoundEvents.ENTITY_GENERIC_EXTINGUISH_FIRE, SoundCategory.PLAYERS, 1.0f, 1.0f, false); context.getWorld().playSound(context.getPlayer().getX(), context.getPlayer().getY(), context.getPlayer().getZ(), SoundEvents.BLOCK_ENCHANTMENT_TABLE_USE, SoundCategory.PLAYERS, 1.0f, 1.0f, false); context.getWorld().setBlockState(context.getBlockPos(), Blocks.CAULDRON.getDefaultState()); @@ -113,7 +113,7 @@ public ActionResult useOnBlock(ItemUsageContext context) { public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { super.appendTooltip(stack, world, tooltip, context); - if (stack.getTag().getBoolean("Heated")) { + if (stack.getNbt().getBoolean("Heated")) { tooltip.add(new TranslatableText("tooltip.impaled.heated").formatted(Formatting.GOLD)); } } diff --git a/src/main/java/ladysnake/impaled/common/item/ImpaledTridentItem.java b/src/main/java/ladysnake/impaled/common/item/ImpaledTridentItem.java index 8f6dec7..719a59c 100644 --- a/src/main/java/ladysnake/impaled/common/item/ImpaledTridentItem.java +++ b/src/main/java/ladysnake/impaled/common/item/ImpaledTridentItem.java @@ -105,7 +105,7 @@ protected boolean canRiptide(PlayerEntity playerEntity) { impaledTridentEntity.setTridentAttributes(world, user, stack); impaledTridentEntity.setOwner(user); impaledTridentEntity.setTridentStack(stack); - impaledTridentEntity.setProperties(user, user.getPitch(), user.getYaw(), 0.0F, 2.5F, 1.0F); + impaledTridentEntity.setVelocity(user, user.getPitch(), user.getYaw(), 0.0F, 2.5F, 1.0F); impaledTridentEntity.updatePosition(user.getX(), user.getEyeY() - 0.1, user.getZ()); return impaledTridentEntity; } diff --git a/src/main/java/ladysnake/impaled/common/item/MaelstromItem.java b/src/main/java/ladysnake/impaled/common/item/MaelstromItem.java index 6569867..211484e 100644 --- a/src/main/java/ladysnake/impaled/common/item/MaelstromItem.java +++ b/src/main/java/ladysnake/impaled/common/item/MaelstromItem.java @@ -67,7 +67,7 @@ public void usageTick(World world, LivingEntity user, ItemStack maelstromStack, trident = ((ImpaledTridentItem) stackToThrow.getItem()).createTrident(world, user, stackToThrow); } else if (stackToThrow.getItem() instanceof TridentItem) { trident = new TridentEntity(world, user, stackToThrow); - trident.setProperties(playerEntity, playerEntity.getPitch(), playerEntity.getYaw(), 0.0F, 2.5F, 1.0F); + trident.setVelocity(playerEntity, playerEntity.getPitch(), playerEntity.getYaw(), 0.0F, 2.5F, 1.0F); } if (trident != null) { diff --git a/src/main/java/ladysnake/sincereloyalty/LoyalTrident.java b/src/main/java/ladysnake/sincereloyalty/LoyalTrident.java index e58e184..adda805 100644 --- a/src/main/java/ladysnake/sincereloyalty/LoyalTrident.java +++ b/src/main/java/ladysnake/sincereloyalty/LoyalTrident.java @@ -45,7 +45,7 @@ static LoyalTrident of(TridentEntity trident) { @Nullable static UUID getTridentUuid(ItemStack stack) { - NbtCompound loyaltyData = stack.getSubTag(LoyalTrident.MOD_NBT_KEY); + NbtCompound loyaltyData = stack.getSubNbt(LoyalTrident.MOD_NBT_KEY); if (loyaltyData == null || !loyaltyData.containsUuid(TRIDENT_OWNER_NBT_KEY)) { return null; } @@ -56,12 +56,12 @@ static UUID getTridentUuid(ItemStack stack) { } static void setPreferredSlot(ItemStack tridentStack, int slot) { - tridentStack.getOrCreateSubTag(LoyalTrident.MOD_NBT_KEY).putInt(LoyalTrident.RETURN_SLOT_NBT_KEY, slot); + tridentStack.getOrCreateSubNbt(LoyalTrident.MOD_NBT_KEY).putInt(LoyalTrident.RETURN_SLOT_NBT_KEY, slot); } static boolean hasTrueOwner(ItemStack tridentStack) { if (SincereLoyalty.TRIDENTS.contains(tridentStack.getItem()) && EnchantmentHelper.getLoyalty(tridentStack) > 0) { - NbtCompound loyaltyNbt = tridentStack.getSubTag(MOD_NBT_KEY); + NbtCompound loyaltyNbt = tridentStack.getSubNbt(MOD_NBT_KEY); return loyaltyNbt != null && loyaltyNbt.containsUuid(TRIDENT_OWNER_NBT_KEY); } return false; @@ -69,12 +69,12 @@ static boolean hasTrueOwner(ItemStack tridentStack) { @Nullable static UUID getTrueOwner(ItemStack tridentStack) { - return hasTrueOwner(tridentStack) ? Objects.requireNonNull(tridentStack.getSubTag(MOD_NBT_KEY)).getUuid(TRIDENT_OWNER_NBT_KEY) : null; + return hasTrueOwner(tridentStack) ? Objects.requireNonNull(tridentStack.getSubNbt(MOD_NBT_KEY)).getUuid(TRIDENT_OWNER_NBT_KEY) : null; } @Nullable static TridentEntity spawnTridentForStack(Entity thrower, ItemStack tridentStack) { - NbtCompound loyaltyData = tridentStack.getSubTag(MOD_NBT_KEY); + NbtCompound loyaltyData = tridentStack.getSubNbt(MOD_NBT_KEY); if (loyaltyData != null) { UUID ownerUuid = loyaltyData.getUuid(TRIDENT_OWNER_NBT_KEY); if (ownerUuid != null) { diff --git a/src/main/java/ladysnake/sincereloyalty/SincereLoyalty.java b/src/main/java/ladysnake/sincereloyalty/SincereLoyalty.java index fabd451..5ad95e5 100644 --- a/src/main/java/ladysnake/sincereloyalty/SincereLoyalty.java +++ b/src/main/java/ladysnake/sincereloyalty/SincereLoyalty.java @@ -63,7 +63,7 @@ public void onInitialize() { return false; } - LoyalTridentStorage loyalTridentStorage = LoyalTridentStorage.get(player.getServerWorld()); + LoyalTridentStorage loyalTridentStorage = LoyalTridentStorage.get(player.getWorld()); TridentRecaller.RecallStatus newRecallStatus; if (loyalTridentStorage.recallTridents(player)) { newRecallStatus = TridentRecaller.RecallStatus.RECALLING; @@ -79,7 +79,7 @@ public void onInitialize() { TridentRecaller.RecallStatus requested = buf.readEnumConstant(TridentRecaller.RecallStatus.class); server.execute(() -> { - LoyalTridentStorage loyalTridentStorage = LoyalTridentStorage.get(player.getServerWorld()); + LoyalTridentStorage loyalTridentStorage = LoyalTridentStorage.get(player.getWorld()); TridentRecaller.RecallStatus currentRecallStatus = ((TridentRecaller) player).getCurrentRecallStatus(); TridentRecaller.RecallStatus newRecallStatus; diff --git a/src/main/java/ladysnake/sincereloyalty/mixin/ItemMixin.java b/src/main/java/ladysnake/sincereloyalty/mixin/ItemMixin.java index d743103..ad259bb 100644 --- a/src/main/java/ladysnake/sincereloyalty/mixin/ItemMixin.java +++ b/src/main/java/ladysnake/sincereloyalty/mixin/ItemMixin.java @@ -41,7 +41,7 @@ private void updateTridentInInventory(ItemStack stack, World world, Entity entit if (entity.age % 10 == 0 && !entity.world.isClient && entity instanceof PlayerEntity) { UUID trueOwner = LoyalTrident.getTrueOwner(stack); if (Objects.equals(trueOwner, entity.getUuid())) { - NbtCompound loyaltyData = Objects.requireNonNull(stack.getSubTag(LoyalTrident.MOD_NBT_KEY)); + NbtCompound loyaltyData = Objects.requireNonNull(stack.getSubNbt(LoyalTrident.MOD_NBT_KEY)); if (!Objects.equals(entity.getEntityName(), loyaltyData.getString(LoyalTrident.OWNER_NAME_NBT_KEY))) { loyaltyData.putString(LoyalTrident.OWNER_NAME_NBT_KEY, entity.getEntityName()); } diff --git a/src/main/java/ladysnake/sincereloyalty/mixin/ServerPlayNetworkHandlerMixin.java b/src/main/java/ladysnake/sincereloyalty/mixin/ServerPlayNetworkHandlerMixin.java index 4689b36..d10dada 100644 --- a/src/main/java/ladysnake/sincereloyalty/mixin/ServerPlayNetworkHandlerMixin.java +++ b/src/main/java/ladysnake/sincereloyalty/mixin/ServerPlayNetworkHandlerMixin.java @@ -29,7 +29,7 @@ public abstract class ServerPlayNetworkHandlerMixin { @ModifyVariable(method = "onCreativeInventoryAction", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/network/packet/c2s/play/CreativeInventoryActionC2SPacket;getItemStack()Lnet/minecraft/item/ItemStack;")) private ItemStack removeTridentUuid(ItemStack copiedStack) { - NbtCompound NbtCompound = copiedStack.getSubTag(LoyalTrident.MOD_NBT_KEY); + NbtCompound NbtCompound = copiedStack.getSubNbt(LoyalTrident.MOD_NBT_KEY); if (NbtCompound != null) { NbtCompound.remove(LoyalTrident.TRIDENT_UUID_NBT_KEY); // prevent stupid copies of the exact same trident } diff --git a/src/main/java/ladysnake/sincereloyalty/mixin/SmithingScreenHandlerMixin.java b/src/main/java/ladysnake/sincereloyalty/mixin/SmithingScreenHandlerMixin.java index 6075a1f..8034ded 100644 --- a/src/main/java/ladysnake/sincereloyalty/mixin/SmithingScreenHandlerMixin.java +++ b/src/main/java/ladysnake/sincereloyalty/mixin/SmithingScreenHandlerMixin.java @@ -74,7 +74,7 @@ private ItemStack updateResult(ItemStack initialResult) { // we can mutate the map as it is recreated with every call to getEnchantments enchantments.put(Enchantments.LOYALTY, Enchantments.LOYALTY.getMaxLevel() + 1); EnchantmentHelper.set(enchantments, result); - NbtCompound loyaltyData = result.getOrCreateSubTag(LoyalTrident.MOD_NBT_KEY); + NbtCompound loyaltyData = result.getOrCreateSubNbt(LoyalTrident.MOD_NBT_KEY); loyaltyData.putUuid(LoyalTrident.TRIDENT_OWNER_NBT_KEY, this.player.getUuid()); loyaltyData.putString(LoyalTrident.OWNER_NAME_NBT_KEY, this.player.getEntityName()); return result; diff --git a/src/main/java/ladysnake/sincereloyalty/mixin/TridentItemMixin.java b/src/main/java/ladysnake/sincereloyalty/mixin/TridentItemMixin.java index 3bfa8f4..a948d49 100644 --- a/src/main/java/ladysnake/sincereloyalty/mixin/TridentItemMixin.java +++ b/src/main/java/ladysnake/sincereloyalty/mixin/TridentItemMixin.java @@ -31,7 +31,7 @@ @Mixin(TridentItem.class) public abstract class TridentItemMixin { - @ModifyVariable(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/projectile/TridentEntity;setProperties(Lnet/minecraft/entity/Entity;FFFFF)V")) + @ModifyVariable(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/projectile/TridentEntity;setVelocity(Lnet/minecraft/entity/Entity;FFFFF)V")) private TridentEntity setTridentReturnSlot(TridentEntity trident, ItemStack stack, World world, LivingEntity user) { LoyalTrident.of(trident).loyaltrident_setReturnSlot(user.getActiveHand() == Hand.OFF_HAND ? -1 : ((PlayerEntity) user).getInventory().selectedSlot); return trident; diff --git a/src/main/java/ladysnake/sincereloyalty/mixin/client/ItemStackMixin.java b/src/main/java/ladysnake/sincereloyalty/mixin/client/ItemStackMixin.java index 4eed622..b4ae115 100644 --- a/src/main/java/ladysnake/sincereloyalty/mixin/client/ItemStackMixin.java +++ b/src/main/java/ladysnake/sincereloyalty/mixin/client/ItemStackMixin.java @@ -46,7 +46,7 @@ public abstract class ItemStackMixin { @Shadow - public abstract NbtCompound getSubTag(String key); + public abstract NbtCompound getSubNbt(String key); @Nullable @Unique @@ -55,7 +55,7 @@ public abstract class ItemStackMixin { @Inject(method = "getTooltip", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;appendEnchantments(Ljava/util/List;Lnet/minecraft/nbt/NbtList;)V")) private void captureThis(PlayerEntity player, TooltipContext context, CallbackInfoReturnable> cir) { - NbtCompound loyaltyNbt = this.getSubTag(LoyalTrident.MOD_NBT_KEY); + NbtCompound loyaltyNbt = this.getSubNbt(LoyalTrident.MOD_NBT_KEY); if (loyaltyNbt != null && loyaltyNbt.contains(LoyalTrident.OWNER_NAME_NBT_KEY)) { impaled$trueOwnerName = loyaltyNbt.getString(LoyalTrident.OWNER_NAME_NBT_KEY); impaled$riptide = EnchantmentHelper.getRiptide((ItemStack) (Object) this) > 0; diff --git a/src/main/java/ladysnake/sincereloyalty/storage/InventoryTridentEntry.java b/src/main/java/ladysnake/sincereloyalty/storage/InventoryTridentEntry.java index 57d31f1..e3a97d2 100644 --- a/src/main/java/ladysnake/sincereloyalty/storage/InventoryTridentEntry.java +++ b/src/main/java/ladysnake/sincereloyalty/storage/InventoryTridentEntry.java @@ -58,7 +58,7 @@ public TridentEntity findTrident() { if (player != null) { for (int slot = 0; slot < player.getInventory().size(); slot++) { ItemStack stack = player.getInventory().getStack(slot); - NbtCompound loyaltyData = stack.getSubTag(LoyalTrident.MOD_NBT_KEY); + NbtCompound loyaltyData = stack.getSubNbt(LoyalTrident.MOD_NBT_KEY); if (loyaltyData != null && loyaltyData.containsUuid(LoyalTrident.TRIDENT_UUID_NBT_KEY)) { if (loyaltyData.getUuid(LoyalTrident.TRIDENT_UUID_NBT_KEY).equals(this.tridentUuid)) { TridentEntity tridentEntity = LoyalTrident.spawnTridentForStack(player, stack);