diff --git a/build.gradle b/build.gradle index 2c705c1..87a54ec 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ dependencies { include "io.wispforest:owo-sentinel:${project.owo_version}" // gson - implementation "com.google.code.gson:gson:2.8.6" + implementation 'com.google.code.gson:gson:2.8.9' // Uncomment the following line to enable the deprecated Fabric API modules. // These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time. @@ -54,7 +54,7 @@ processResources { } tasks.withType(JavaCompile).configureEach { - it.options.release = 17 + it.options.release = 21 } java { @@ -63,8 +63,8 @@ java { // If you remove this line, sources will not be generated. withSourcesJar() - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } jar { diff --git a/gradle.properties b/gradle.properties index 0e650eb..e90aa16 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,17 +4,17 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.6 -yarn_mappings=1.20.6+build.1 +minecraft_version=1.21 +yarn_mappings=1.21+build.2 loader_version=0.15.11 # Fabric API -fabric_version=0.98.0+1.20.6 +fabric_version=0.100.3+1.21 # Mod Properties -mod_version=1.2.3 +mod_version=1.2.4 maven_group=xyz.imcodist.quickmenu archives_base_name=quick-menu # owo-lib -owo_version=0.12.8+1.20.5 \ No newline at end of file +owo_version=0.12.10+1.21 \ No newline at end of file diff --git a/src/main/java/xyz/imcodist/quickmenu/data/ActionButtonData.java b/src/main/java/xyz/imcodist/quickmenu/data/ActionButtonData.java index 0c54744..a703540 100644 --- a/src/main/java/xyz/imcodist/quickmenu/data/ActionButtonData.java +++ b/src/main/java/xyz/imcodist/quickmenu/data/ActionButtonData.java @@ -65,7 +65,7 @@ public static ActionButtonData fromJSON(ActionButtonDataJSON json) { }); if (json.icon != null) { - data.icon = new ItemStack(Registries.ITEM.get(new Identifier(json.icon))); + data.icon = new ItemStack(Registries.ITEM.get(Identifier.of(json.icon))); data.icon.set(DataComponentTypes.CUSTOM_MODEL_DATA, new CustomModelDataComponent(json.customModelData)); } diff --git a/src/main/java/xyz/imcodist/quickmenu/ui/components/QuickMenuButton.java b/src/main/java/xyz/imcodist/quickmenu/ui/components/QuickMenuButton.java index 52b509e..07374e5 100644 --- a/src/main/java/xyz/imcodist/quickmenu/ui/components/QuickMenuButton.java +++ b/src/main/java/xyz/imcodist/quickmenu/ui/components/QuickMenuButton.java @@ -23,7 +23,7 @@ public QuickMenuButton(ItemStack icon, Consumer onPress, Consum sizing(Sizing.fixed(26), Sizing.fixed(26)); renderer(ButtonComponent.Renderer.texture( - new Identifier("quickmenu", "textures/switcher_buttons.png"), + Identifier.of("quickmenu", "textures/switcher_buttons.png"), 0, 0, 64, 64 )); diff --git a/src/main/java/xyz/imcodist/quickmenu/ui/popups/ItemPickerUI.java b/src/main/java/xyz/imcodist/quickmenu/ui/popups/ItemPickerUI.java index 0068f38..ce788af 100644 --- a/src/main/java/xyz/imcodist/quickmenu/ui/popups/ItemPickerUI.java +++ b/src/main/java/xyz/imcodist/quickmenu/ui/popups/ItemPickerUI.java @@ -52,7 +52,7 @@ public ItemPickerUI() { mainLayout.child(searchBoxLayout); TextureComponent textureComponent = Components.texture( - new Identifier("quickmenu", "textures/search_icon.png"), + Identifier.of("quickmenu", "textures/search_icon.png"), 0, 0, 12, 12, 12, 12 diff --git a/src/main/java/xyz/imcodist/quickmenu/ui/surfaces/SwitcherSurface.java b/src/main/java/xyz/imcodist/quickmenu/ui/surfaces/SwitcherSurface.java index 9d66f71..26c6ff0 100644 --- a/src/main/java/xyz/imcodist/quickmenu/ui/surfaces/SwitcherSurface.java +++ b/src/main/java/xyz/imcodist/quickmenu/ui/surfaces/SwitcherSurface.java @@ -58,7 +58,7 @@ public void drawNineSlicedTexture(OwoUIDrawContext context, int x, int y, int wi } public void drawTexture(OwoUIDrawContext context, int x, int y, int sourceX, int sourceY, int sourceWidth, int sourceHeight, int textureWidth, int textureHeight) { - context.drawTexture(new Identifier("quickmenu", "textures/switcher_textures.png"), x, y, sourceX, sourceY, sourceWidth, sourceHeight, textureWidth, textureHeight); + context.drawTexture(Identifier.of("quickmenu", "textures/switcher_textures.png"), x, y, sourceX, sourceY, sourceWidth, sourceHeight, textureWidth, textureHeight); } public void drawRepeatingTexture(OwoUIDrawContext context, int x, int y, int sourceX, int sourceY, int sourceWidth, int sourceHeight, int textureWidth, int textureHeight, int width, int height) { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 96751ac..43ce422 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -30,7 +30,7 @@ ], "depends": { "fabricloader": ">=0.15.11", - "minecraft": "~1.20.5", + "minecraft": "~1.21", "java": ">=21", "fabric-api": "*",