From e4c1e86962279f651a05ad5536e26cf17d271cd8 Mon Sep 17 00:00:00 2001 From: mezz Date: Tue, 10 Sep 2024 11:11:43 +0900 Subject: [PATCH] update for deprecations --- .../quark/addons/oddities/module/TotemOfHoldingModule.java | 2 +- .../quark/content/building/module/HedgesModule.java | 4 ++-- .../quark/content/building/module/LeafCarpetModule.java | 4 ++-- .../quark/content/building/module/ShearVinesModule.java | 6 +++--- .../content/building/module/VariantBookshelvesModule.java | 2 +- .../quark/content/building/module/VariantLaddersModule.java | 2 +- .../quark/content/client/module/ChestSearchingModule.java | 2 +- .../quark/content/client/module/ElytraIndicatorModule.java | 2 +- .../quark/content/mobs/module/FoxhoundModule.java | 2 +- .../content/tweaks/module/BetterElytraRocketModule.java | 4 ++-- .../quark/content/world/module/NewStoneTypesModule.java | 4 ++-- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/violetmoon/quark/addons/oddities/module/TotemOfHoldingModule.java b/src/main/java/org/violetmoon/quark/addons/oddities/module/TotemOfHoldingModule.java index 20b5ef38d6..55f10413e0 100644 --- a/src/main/java/org/violetmoon/quark/addons/oddities/module/TotemOfHoldingModule.java +++ b/src/main/java/org/violetmoon/quark/addons/oddities/module/TotemOfHoldingModule.java @@ -88,7 +88,7 @@ public void onPlayerDrops(ZLivingDrops.Lowest event) { .map(ItemEntity::getItem) .filter(stack -> !stack.isEmpty()) .forEach(totem::addItem); - if (zeta.isModLoaded("curios")) + if (zeta().isModLoaded("curios")) TotemOfHoldingCuriosCompat.saveCurios(player, totem); if(!player.level().isClientSide) player.level().addFreshEntity(totem); diff --git a/src/main/java/org/violetmoon/quark/content/building/module/HedgesModule.java b/src/main/java/org/violetmoon/quark/content/building/module/HedgesModule.java index 69341b9816..0ae5a449f9 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/HedgesModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/HedgesModule.java @@ -54,12 +54,12 @@ public static class Client extends HedgesModule { @LoadEvent public void blockColorProviders(ZAddBlockColorHandlers event) { - event.registerNamed(zeta, b -> new AlikeColorHandler((HedgeBlock) b, HedgeBlock::getLeaf), "hedge"); + event.registerNamed(zeta(), b -> new AlikeColorHandler((HedgeBlock) b, HedgeBlock::getLeaf), "hedge"); } @LoadEvent public void itemColorProviders(ZAddItemColorHandlers event) { - event.registerNamed(zeta, i -> new AlikeColorHandler(i, HedgeBlock::getLeaf), "hedge"); + event.registerNamed(zeta(), i -> new AlikeColorHandler(i, HedgeBlock::getLeaf), "hedge"); } } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/LeafCarpetModule.java b/src/main/java/org/violetmoon/quark/content/building/module/LeafCarpetModule.java index 8139653803..0f06344dcb 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/LeafCarpetModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/LeafCarpetModule.java @@ -73,12 +73,12 @@ public static class Client extends LeafCarpetModule { @LoadEvent public void blockColorHandlers(ZAddBlockColorHandlers event) { - event.registerNamed(zeta,b -> new AlikeColorHandler((LeafCarpetBlock) b, LeafCarpetBlock::getBaseState), "leaf_carpet"); + event.registerNamed(zeta(), b -> new AlikeColorHandler((LeafCarpetBlock) b, LeafCarpetBlock::getBaseState), "leaf_carpet"); } @LoadEvent public void itemColorHandlers(ZAddItemColorHandlers event) { - event.registerNamed(zeta, i -> new AlikeColorHandler(i, LeafCarpetBlock::getBaseState), "leaf_carpet"); + event.registerNamed(zeta(), i -> new AlikeColorHandler(i, LeafCarpetBlock::getBaseState), "leaf_carpet"); } } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/ShearVinesModule.java b/src/main/java/org/violetmoon/quark/content/building/module/ShearVinesModule.java index 740be0daf4..644a437b5c 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/ShearVinesModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/ShearVinesModule.java @@ -47,7 +47,7 @@ public final void register(ZRegister event) { @PlayEvent public void onRightClick(ZRightClickBlock event) { ItemStack stack = event.getItemStack(); - if(zeta.itemExtensions.get(stack).canShearZeta(stack)) { + if(zeta().itemExtensions.get(stack).canShearZeta(stack)) { BlockPos pos = event.getPos(); Level world = event.getLevel(); BlockState state = world.getBlockState(pos); @@ -88,12 +88,12 @@ public static class Client extends ShearVinesModule { @LoadEvent public void blockColors(ZAddBlockColorHandlers event) { - event.registerNamed(zeta, b -> LIKE_VINE, "vine"); + event.registerNamed(zeta(), b -> LIKE_VINE, "vine"); } @LoadEvent public void itemColors(ZAddItemColorHandlers event) { - event.registerNamed(zeta, i -> LIKE_VINE, "vine"); + event.registerNamed(zeta(), i -> LIKE_VINE, "vine"); } } } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/VariantBookshelvesModule.java b/src/main/java/org/violetmoon/quark/content/building/module/VariantBookshelvesModule.java index 20abbb0f65..03d094938a 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/VariantBookshelvesModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/VariantBookshelvesModule.java @@ -29,6 +29,6 @@ public final void register(ZRegister event) { @LoadEvent public final void configChanged(ZConfigChanged event) { - zeta.nameChanger.changeBlock(Blocks.BOOKSHELF, "block.quark.oak_bookshelf", changeNames && enabled); + zeta().nameChanger.changeBlock(Blocks.BOOKSHELF, "block.quark.oak_bookshelf", changeNames && enabled); } } diff --git a/src/main/java/org/violetmoon/quark/content/building/module/VariantLaddersModule.java b/src/main/java/org/violetmoon/quark/content/building/module/VariantLaddersModule.java index 2125401d1b..f7aca8bdaf 100644 --- a/src/main/java/org/violetmoon/quark/content/building/module/VariantLaddersModule.java +++ b/src/main/java/org/violetmoon/quark/content/building/module/VariantLaddersModule.java @@ -45,7 +45,7 @@ public void loadComplete(ZLoadComplete e) { @LoadEvent public final void configChanged(ZConfigChanged event) { moduleEnabled = this.enabled; - zeta.nameChanger.changeBlock(Blocks.LADDER, "block.quark.oak_ladder", changeNames && enabled); + zeta().nameChanger.changeBlock(Blocks.LADDER, "block.quark.oak_ladder", changeNames && enabled); } } diff --git a/src/main/java/org/violetmoon/quark/content/client/module/ChestSearchingModule.java b/src/main/java/org/violetmoon/quark/content/client/module/ChestSearchingModule.java index 53d8fe822c..4f286d5427 100644 --- a/src/main/java/org/violetmoon/quark/content/client/module/ChestSearchingModule.java +++ b/src/main/java/org/violetmoon/quark/content/client/module/ChestSearchingModule.java @@ -296,7 +296,7 @@ public boolean namesMatch(ItemStack stack, String search) { ResourceLocation itemName = BuiltInRegistries.ITEM.getKey(item); @Nullable - String modDisplayName = zeta.getModDisplayName(itemName.getNamespace()); + String modDisplayName = zeta().getModDisplayName(itemName.getNamespace()); if(modDisplayName != null && matcher.test(modDisplayName.toLowerCase(Locale.ROOT), search)) return true; diff --git a/src/main/java/org/violetmoon/quark/content/client/module/ElytraIndicatorModule.java b/src/main/java/org/violetmoon/quark/content/client/module/ElytraIndicatorModule.java index b3570bf411..cc9b8b0870 100644 --- a/src/main/java/org/violetmoon/quark/content/client/module/ElytraIndicatorModule.java +++ b/src/main/java/org/violetmoon/quark/content/client/module/ElytraIndicatorModule.java @@ -37,7 +37,7 @@ public void hudPre(ZRenderGuiOverlay.ArmorLevel.Pre event) { Player player = mc.player; ItemStack itemstack = player.getItemBySlot(EquipmentSlot.CHEST); - if(zeta.itemExtensions.get(itemstack).canElytraFlyZeta(itemstack, player)) { + if(zeta().itemExtensions.get(itemstack).canElytraFlyZeta(itemstack, player)) { int armor = player.getArmorValue(); shift = (armor >= 20 ? 0 : 9); diff --git a/src/main/java/org/violetmoon/quark/content/mobs/module/FoxhoundModule.java b/src/main/java/org/violetmoon/quark/content/mobs/module/FoxhoundModule.java index c7604865ac..cc54d3dfa6 100644 --- a/src/main/java/org/violetmoon/quark/content/mobs/module/FoxhoundModule.java +++ b/src/main/java/org/violetmoon/quark/content/mobs/module/FoxhoundModule.java @@ -116,7 +116,7 @@ public void onSleepCheck(ZSleepingLocationCheck event) { BlockPos below = pos.below(); BlockState belowState = world.getBlockState(below); - int light = zeta.blockExtensions.get(belowState).getLightEmissionZeta(belowState, world, below); + int light = zeta().blockExtensions.get(belowState).getLightEmissionZeta(belowState, world, below); if(light > 2) event.setResult(ZResult.ALLOW); } diff --git a/src/main/java/org/violetmoon/quark/content/tweaks/module/BetterElytraRocketModule.java b/src/main/java/org/violetmoon/quark/content/tweaks/module/BetterElytraRocketModule.java index ffae7574b8..b073bc1537 100644 --- a/src/main/java/org/violetmoon/quark/content/tweaks/module/BetterElytraRocketModule.java +++ b/src/main/java/org/violetmoon/quark/content/tweaks/module/BetterElytraRocketModule.java @@ -20,9 +20,9 @@ public void onUseRocket(ZRightClickItem event) { Player player = event.getEntity(); ItemStack chest = player.getItemBySlot(EquipmentSlot.CHEST); - boolean curiosCheck = zeta.isModLoaded("curios") && BetterElytraRocketCuriosCompat.hasCuriosElytra(player); + boolean curiosCheck = zeta().isModLoaded("curios") && BetterElytraRocketCuriosCompat.hasCuriosElytra(player); - if (!player.isFallFlying() && (zeta.itemExtensions.get(chest).canElytraFlyZeta(chest, player) || curiosCheck)) { + if (!player.isFallFlying() && (zeta().itemExtensions.get(chest).canElytraFlyZeta(chest, player) || curiosCheck)) { Level world = player.level(); ItemStack itemstack = event.getItemStack(); diff --git a/src/main/java/org/violetmoon/quark/content/world/module/NewStoneTypesModule.java b/src/main/java/org/violetmoon/quark/content/world/module/NewStoneTypesModule.java index 6b4eabf700..4dd0a32576 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/NewStoneTypesModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/NewStoneTypesModule.java @@ -188,12 +188,12 @@ public static class Client extends NewStoneTypesModule { @LoadEvent public void blockColorProviders(ZAddBlockColorHandlers event) { - event.registerNamed(zeta, block -> MyaliteColorHandler.INSTANCE, "myalite"); + event.registerNamed(zeta(), block -> MyaliteColorHandler.INSTANCE, "myalite"); } @LoadEvent public void itemColorProviders(ZAddItemColorHandlers event) { - event.registerNamed(zeta, item -> MyaliteColorHandler.INSTANCE, "myalite"); + event.registerNamed(zeta(), item -> MyaliteColorHandler.INSTANCE, "myalite"); } private static class MyaliteColorHandler implements BlockColor, ItemColor {