From 4248ebbfb27d4df59c6f0b92519dd198c5b655e6 Mon Sep 17 00:00:00 2001 From: Siroshun09 Date: Tue, 23 Apr 2024 23:14:24 +0900 Subject: [PATCH] format(version-common): move #goatHorn up in LegacyVersionPatches --- .../common/item/LegacyVersionPatches.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/versions/common/src/main/java/net/okocraft/box/version/common/item/LegacyVersionPatches.java b/versions/common/src/main/java/net/okocraft/box/version/common/item/LegacyVersionPatches.java index 0068be82ab..4b3dfa1515 100644 --- a/versions/common/src/main/java/net/okocraft/box/version/common/item/LegacyVersionPatches.java +++ b/versions/common/src/main/java/net/okocraft/box/version/common/item/LegacyVersionPatches.java @@ -23,6 +23,17 @@ public static boolean shouldPatchGoatHorn(@NotNull ItemVersion version) { return original.equals("GOAT_HORN") ? "PONDER_GOAT_HORN" : original; } + public static @NotNull ItemData goatHorn(@NotNull ItemData itemData) { + if (itemData.plainName().equals("GOAT_HORN")) { + var goatHorn = new ItemStack(Material.GOAT_HORN); + goatHorn.editMeta(MusicInstrumentMeta.class, meta -> meta.setInstrument(MusicInstrument.PONDER)); + + return new ItemData(itemData.internalId(), "PONDER_GOAT_HORN", goatHorn.serializeAsBytes()); + } else { + return itemData; + } + } + public static boolean shouldPatchShortGrassName(@NotNull ItemVersion starting, @NotNull ItemVersion current) { return starting.dataVersion().isBefore(MC_1_20_3) && current.dataVersion().isAfterOrSame(MC_1_20_3); } @@ -105,17 +116,6 @@ public static boolean shouldPatchTurtleScuteName(@NotNull ItemVersion starting, return original.equals("SCUTE") ? "TURTLE_SCUTE" : original; } - public static @NotNull ItemData goatHorn(@NotNull ItemData itemData) { - if (itemData.plainName().equals("GOAT_HORN")) { - var goatHorn = new ItemStack(Material.GOAT_HORN); - goatHorn.editMeta(MusicInstrumentMeta.class, meta -> meta.setInstrument(MusicInstrument.PONDER)); - - return new ItemData(itemData.internalId(), "PONDER_GOAT_HORN", goatHorn.serializeAsBytes()); - } else { - return itemData; - } - } - private LegacyVersionPatches() { throw new UnsupportedOperationException(); }