From 54e5823fa04e58f94646fe0b004f3efc4e511406 Mon Sep 17 00:00:00 2001 From: Dxrmy Date: Mon, 6 Jul 2026 04:03:34 +0000 Subject: [PATCH] Update to Minecraft 26.2 --- gradle.properties | 2 +- gradle/libs.versions.toml | 4 +-- .../hydraulic/item/ArmorPackModule.java | 7 ++-- .../hydraulic/item/CreativeMappings.java | 35 ++++++++++--------- .../fabric/test/datagen/TagGeneration.java | 9 ++--- 5 files changed, 30 insertions(+), 27 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8d36657..d0b76e7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ group=org.geysermc.hydraulic version=1.0.0-SNAPSHOT description="A companion mod to Geyser which allows for Bedrock players to join modded Minecraft: Java Edition servers." -minecraft_version=26.1.2 +minecraft_version=26.2 common_runs_enabled=false common_client_run_name=Common Client common_server_run_name=Common Server diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a59c817..645316f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,10 +12,10 @@ asm = "5.2" # Fabric fabric-loader = "0.19.2" -fabric-api = "0.149.1+26.1.2" +fabric-api = "0.153.0+26.2" # NeoForge -neoforge-version = "26.1.2.65-beta" +neoforge-version = "26.2.0.8-beta" [libraries] mixin = { group = "org.spongepowered", name = "mixin", version.ref = "mixin" } diff --git a/shared/src/main/java/org/geysermc/hydraulic/item/ArmorPackModule.java b/shared/src/main/java/org/geysermc/hydraulic/item/ArmorPackModule.java index 5aa03b1..3829173 100644 --- a/shared/src/main/java/org/geysermc/hydraulic/item/ArmorPackModule.java +++ b/shared/src/main/java/org/geysermc/hydraulic/item/ArmorPackModule.java @@ -8,6 +8,7 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.resources.Identifier; import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.EntityTypes; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.item.Item; import net.minecraft.world.item.equipment.Equippable; @@ -65,11 +66,11 @@ private void postProcess(@NotNull PackPostProcessContext contex if (optionalEntityType.isPresent()) { HolderSet> entityTypeHolderSet = optionalEntityType.get(); - if (entityTypeHolderSet.contains(BuiltInRegistries.ENTITY_TYPE.wrapAsHolder(EntityType.HORSE))) { + if (entityTypeHolderSet.contains(BuiltInRegistries.ENTITY_TYPE.wrapAsHolder(EntityTypes.HORSE))) { layerType = EquipmentLayerType.HORSE_BODY; - } else if (entityTypeHolderSet.contains(BuiltInRegistries.ENTITY_TYPE.wrapAsHolder(EntityType.WOLF))) { + } else if (entityTypeHolderSet.contains(BuiltInRegistries.ENTITY_TYPE.wrapAsHolder(EntityTypes.WOLF))) { layerType = EquipmentLayerType.WOLF_BODY; - } else if (entityTypeHolderSet.contains(BuiltInRegistries.ENTITY_TYPE.wrapAsHolder(EntityType.LLAMA))) { + } else if (entityTypeHolderSet.contains(BuiltInRegistries.ENTITY_TYPE.wrapAsHolder(EntityTypes.LLAMA))) { layerType = EquipmentLayerType.LLAMA_BODY; } } diff --git a/shared/src/main/java/org/geysermc/hydraulic/item/CreativeMappings.java b/shared/src/main/java/org/geysermc/hydraulic/item/CreativeMappings.java index 2574b19..63939f2 100644 --- a/shared/src/main/java/org/geysermc/hydraulic/item/CreativeMappings.java +++ b/shared/src/main/java/org/geysermc/hydraulic/item/CreativeMappings.java @@ -1,6 +1,7 @@ package org.geysermc.hydraulic.item; import net.minecraft.tags.BlockTags; +import net.minecraft.tags.BlockItemTags; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.*; @@ -24,56 +25,56 @@ public class CreativeMappings { // region --- Construction --- put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.DOORS), + List.of(BlockItemTags.DOORS.item()), List.of(DoorBlock.class), List.of(BlockTags.DOORS) ), new CreativeMapping(ItemGroup.DOORS, CreativeCategory.CONSTRUCTION)); put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.FENCES), + List.of(BlockItemTags.FENCES.item()), List.of(FenceBlock.class), List.of(BlockTags.FENCES) ), new CreativeMapping(ItemGroup.FENCES, CreativeCategory.CONSTRUCTION)); put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.FENCE_GATES), + List.of(BlockItemTags.FENCE_GATES.item()), List.of(FenceGateBlock.class), List.of(BlockTags.FENCE_GATES) ), new CreativeMapping(ItemGroup.FENCE_GATES, CreativeCategory.CONSTRUCTION)); put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.PLANKS), + List.of(BlockItemTags.PLANKS.item()), List.of(), List.of(BlockTags.PLANKS) ), new CreativeMapping(ItemGroup.PLANKS, CreativeCategory.CONSTRUCTION)); put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.SLABS), + List.of(BlockItemTags.SLABS.item()), List.of(SlabBlock.class), List.of(BlockTags.SLABS) ), new CreativeMapping(ItemGroup.SLABS, CreativeCategory.CONSTRUCTION)); put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.STAIRS), + List.of(BlockItemTags.STAIRS.item()), List.of(StairBlock.class), List.of(BlockTags.STAIRS) ), new CreativeMapping(ItemGroup.STAIRS, CreativeCategory.CONSTRUCTION)); put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.TRAPDOORS), + List.of(BlockItemTags.TRAPDOORS.item()), List.of(TrapDoorBlock.class), List.of(BlockTags.TRAPDOORS) ), new CreativeMapping(ItemGroup.TRAPDOORS, CreativeCategory.CONSTRUCTION)); put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.WALLS), + List.of(BlockItemTags.WALLS.item()), List.of(WallBlock.class), List.of(BlockTags.WALLS) ), new CreativeMapping(ItemGroup.WALLS, CreativeCategory.CONSTRUCTION)); @@ -89,21 +90,21 @@ public class CreativeMappings { put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.FLOWERS), + List.of(BlockItemTags.FLOWERS.item()), List.of(FlowerBlock.class, TallFlowerBlock.class), List.of(BlockTags.FLOWERS, BlockTags.SMALL_FLOWERS) ), new CreativeMapping(ItemGroup.FLOWERS, CreativeCategory.NATURE)); put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.LEAVES), + List.of(BlockItemTags.LEAVES.item()), List.of(LeavesBlock.class), List.of(BlockTags.LEAVES) ), new CreativeMapping(ItemGroup.LEAVES, CreativeCategory.NATURE)); put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.LOGS), + List.of(BlockItemTags.LOGS.item()), List.of(), List.of(BlockTags.LOGS) ), new CreativeMapping(ItemGroup.LOGS, CreativeCategory.NATURE)); @@ -125,9 +126,9 @@ public class CreativeMappings { put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.SAPLINGS), + List.of(BlockItemTags.SAPLINGS.item()), List.of(SaplingBlock.class), - List.of(BlockTags.SAPLINGS) + List.of(BlockItemTags.SAPLINGS.block()) ), new CreativeMapping(ItemGroup.SAPLINGS, CreativeCategory.NATURE)); // endregion @@ -178,7 +179,7 @@ public class CreativeMappings { // region --- Items --- put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.ANVIL), + List.of(BlockItemTags.ANVIL.item()), List.of(AnvilBlock.class), List.of(BlockTags.ANVIL) ), new CreativeMapping(ItemGroup.ANVILS, CreativeCategory.ITEMS)); @@ -199,14 +200,14 @@ public class CreativeMappings { put(new CreativeMappingTarget( List.of(), - List.of(ItemTags.BUTTONS), + List.of(BlockItemTags.BUTTONS.item()), List.of(ButtonBlock.class), List.of(BlockTags.BUTTONS) ), new CreativeMapping(ItemGroup.BUTTONS, CreativeCategory.ITEMS)); put(new CreativeMappingTarget( List.of(HangingSignItem.class), - List.of(ItemTags.HANGING_SIGNS), + List.of(BlockItemTags.HANGING_SIGNS.item()), List.of(CeilingHangingSignBlock.class, WallHangingSignBlock.class), List.of(BlockTags.CEILING_HANGING_SIGNS, BlockTags.WALL_HANGING_SIGNS) ), new CreativeMapping(ItemGroup.HANGING_SIGNS, CreativeCategory.ITEMS)); @@ -227,7 +228,7 @@ public class CreativeMappings { put(new CreativeMappingTarget( List.of(SignItem.class), - List.of(ItemTags.SIGNS), + List.of(BlockItemTags.SIGNS.item()), List.of(SignBlock.class), List.of(BlockTags.WALL_SIGNS, BlockTags.STANDING_SIGNS) ), new CreativeMapping(ItemGroup.SIGNS, CreativeCategory.ITEMS)); diff --git a/test/src/main/java/org/geysermc/hydraulic/fabric/test/datagen/TagGeneration.java b/test/src/main/java/org/geysermc/hydraulic/fabric/test/datagen/TagGeneration.java index a32616e..50bc67a 100644 --- a/test/src/main/java/org/geysermc/hydraulic/fabric/test/datagen/TagGeneration.java +++ b/test/src/main/java/org/geysermc/hydraulic/fabric/test/datagen/TagGeneration.java @@ -3,6 +3,7 @@ import net.fabricmc.fabric.api.datagen.v1.FabricPackOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagsProvider; import net.minecraft.core.HolderLookup; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.tags.BlockTags; import org.geysermc.hydraulic.fabric.test.ModBlocks; @@ -16,11 +17,11 @@ public Blocks(FabricPackOutput output, CompletableFuture @Override protected void addTags(HolderLookup.Provider provider) { - valueLookupBuilder(BlockTags.NEEDS_IRON_TOOL) - .add(ModBlocks.GOLDEN_BARREL); + tag(BlockTags.NEEDS_IRON_TOOL) + .add(BuiltInRegistries.BLOCK.getResourceKey(ModBlocks.GOLDEN_BARREL).get()); - valueLookupBuilder(BlockTags.MINEABLE_WITH_PICKAXE) - .add(ModBlocks.GOLDEN_BARREL); + tag(BlockTags.MINEABLE_WITH_PICKAXE) + .add(BuiltInRegistries.BLOCK.getResourceKey(ModBlocks.GOLDEN_BARREL).get()); } }