diff --git a/build.gradle b/build.gradle index 0da27719..6a264db7 100644 --- a/build.gradle +++ b/build.gradle @@ -14,10 +14,6 @@ allprojects { version = "${project.mod_version}+${rootProject.minecraft_base_version}" group = rootProject.maven_group - tasks.withType(JavaCompile) { - options.compilerArgs << "-Xlint:unchecked" - } - dependencies { minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}:v2" diff --git a/gradle.properties b/gradle.properties index f9518171..863fabef 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ minecraft_version=1.20.3 yarn_mappings=1.20.3+build.1 loader_version=0.15.0 # Mod Properties -mod_version=0.12.0-pre.2 +mod_version=0.12.0-pre.3 maven_group=io.wispforest archives_base_name=owo-lib # Dependencies diff --git a/src/main/java/io/wispforest/owo/itemgroup/OwoItemGroup.java b/src/main/java/io/wispforest/owo/itemgroup/OwoItemGroup.java index 85d5e217..74d0d2ce 100644 --- a/src/main/java/io/wispforest/owo/itemgroup/OwoItemGroup.java +++ b/src/main/java/io/wispforest/owo/itemgroup/OwoItemGroup.java @@ -214,32 +214,6 @@ protected void collectItemsFromRegistry(Entries entries, int tab) { // Getters and setters - /** - * @deprecated Use {@link #selectSingleTab(int, DisplayContext)} instead - */ - @Deprecated(forRemoval = true) - public void setSelectedTab(int selectedTab, DisplayContext context) { - this.selectSingleTab(selectedTab, context); - } - - /** - * @deprecated On an item group which allows multiple selection, this - * returns the first selected tab only. Instead, call {@link #selectedTabs()} - */ - @Deprecated(forRemoval = true) - public ItemGroupTab getSelectedTab() { - return this.tabs.get(this.getSelectedTabIndex()); - } - - /** - * @deprecated On an item group which allows multiple selection, this - * returns the index of the first selected tab only. Instead, call {@link #selectedTabs()} - */ - @Deprecated(forRemoval = true) - public int getSelectedTabIndex() { - return this.activeTabs.iterator().nextInt(); - } - /** * Select only {@code tab}, deselecting all other tabs, * using {@code context} for re-population diff --git a/src/main/java/io/wispforest/owo/ui/base/BaseParentComponent.java b/src/main/java/io/wispforest/owo/ui/base/BaseParentComponent.java index a3133939..c44a5f8a 100644 --- a/src/main/java/io/wispforest/owo/ui/base/BaseParentComponent.java +++ b/src/main/java/io/wispforest/owo/ui/base/BaseParentComponent.java @@ -295,19 +295,6 @@ protected Size childMountingOffset() { return Size.of(padding.left(), padding.top()); } - /** - * @deprecated Use {@link #mountChild(Component, Consumer)} instead. This new - * overload no longer inflates the child prior to mounting, as that is - * rarely ever necessary and was simply causing unnecessary calculations - */ - @Deprecated(forRemoval = true) - protected void mountChild(@Nullable Component child, Size space, Consumer layoutFunc) { - if (child == null) return; - - child.inflate(space); - this.mountChild(child, layoutFunc); - } - /** * Mount a child using the given mounting function if its positioning * is equal to {@link Positioning#layout()}, or according to its diff --git a/src/main/java/io/wispforest/owo/ui/core/ParentComponent.java b/src/main/java/io/wispforest/owo/ui/core/ParentComponent.java index d977813e..14dfaffc 100644 --- a/src/main/java/io/wispforest/owo/ui/core/ParentComponent.java +++ b/src/main/java/io/wispforest/owo/ui/core/ParentComponent.java @@ -256,19 +256,6 @@ default T childById(@NotNull Class expectedClass, @NotN return this.isInBoundingBox(x, y) ? this : null; } - /** - * Collect the entire component hierarchy below the given component - * into the given list - * - * @param into The list into which to collect the hierarchy - * @deprecated Use {@link #collectDescendants(ArrayList)} instead, it has - * a much clearer name - */ - @Deprecated(forRemoval = true) - default void collectChildren(ArrayList into) { - this.forEachDescendant(into::add); - } - /** * Collect the entire component hierarchy below the given component * into the given list diff --git a/src/main/java/io/wispforest/owo/ui/util/NinePatchRenderer.java b/src/main/java/io/wispforest/owo/ui/util/NinePatchRenderer.java deleted file mode 100644 index ccc2f9bb..00000000 --- a/src/main/java/io/wispforest/owo/ui/util/NinePatchRenderer.java +++ /dev/null @@ -1,22 +0,0 @@ -package io.wispforest.owo.ui.util; - -import io.wispforest.owo.ui.core.Size; -import net.minecraft.util.Identifier; - -/** - * @deprecated Use the more appropriately named {@link NinePatchTexture} instead - */ -@Deprecated(forRemoval = true) -public class NinePatchRenderer extends NinePatchTexture { - public NinePatchRenderer(Identifier texture, int u, int v, Size cornerPatchSize, Size centerPatchSize, Size textureSize, boolean repeat) { - super(texture, u, v, cornerPatchSize, centerPatchSize, textureSize, repeat); - } - - public NinePatchRenderer(Identifier texture, int u, int v, Size patchSize, Size textureSize, boolean repeat) { - super(texture, u, v, patchSize, textureSize, repeat); - } - - public NinePatchRenderer(Identifier texture, Size patchSize, Size textureSize, boolean repeat) { - super(texture, patchSize, textureSize, repeat); - } -} diff --git a/src/main/java/io/wispforest/owo/ui/util/OwoNinePatchRenderers.java b/src/main/java/io/wispforest/owo/ui/util/OwoNinePatchRenderers.java deleted file mode 100644 index 0cad3425..00000000 --- a/src/main/java/io/wispforest/owo/ui/util/OwoNinePatchRenderers.java +++ /dev/null @@ -1,57 +0,0 @@ -package io.wispforest.owo.ui.util; - -import io.wispforest.owo.ui.core.OwoUIDrawContext; -import io.wispforest.owo.ui.core.Size; -import net.minecraft.util.Identifier; - -/** - * @deprecated Use the texture identifiers placed directly in the relevant classes, - * namely {@link io.wispforest.owo.ui.container.ScrollContainer}, {@link Drawer} - * and {@link io.wispforest.owo.ui.component.ButtonComponent} - */ -@Deprecated(forRemoval = true) -public final class OwoNinePatchRenderers { - - private OwoNinePatchRenderers() {} - - // Scrollbar central - - private static final Identifier SCROLLBAR_TEXTURE = new Identifier("owo", "textures/gui/scrollbar.png"); - - public static final NinePatchRenderer VERTICAL_VANILLA_SCROLLBAR - = new NinePatchRenderer(SCROLLBAR_TEXTURE, 0, 0, Size.square(2), Size.of(8, 12), Size.of(64, 32), true); - - public static final NinePatchRenderer DISABLED_VERTICAL_VANILLA_SCROLLBAR - = new NinePatchRenderer(SCROLLBAR_TEXTURE, 13, 0, Size.square(2), Size.of(8, 12), Size.of(64, 32), true); - - public static final NinePatchRenderer HORIZONTAL_VANILLA_SCROLLBAR - = new NinePatchRenderer(SCROLLBAR_TEXTURE, 0, 16, Size.square(2), Size.of(8, 12), Size.of(64, 32), true); - - public static final NinePatchRenderer DISABLED_HORIZONTAL_VANILLA_SCROLLBAR - = new NinePatchRenderer(SCROLLBAR_TEXTURE, 13, 16, Size.square(2), Size.of(8, 12), Size.of(64, 32), true); - - public static final NinePatchRenderer VANILLA_SCROLLBAR_TRACK - = new NinePatchRenderer(SCROLLBAR_TEXTURE, 26, 0, Size.square(1), Size.of(4, 30), Size.of(64, 32), false); - - public static final NinePatchRenderer FLAT_VANILLA_SCROLLBAR - = new NinePatchRenderer(SCROLLBAR_TEXTURE, 33, 0, Size.square(1), Size.of(14, 30), Size.of(64, 32), false); - - // Panel outpost - - public static final NinePatchRenderer LIGHT_PANEL = new NinePatchRenderer(OwoUIDrawContext.PANEL_TEXTURE, Size.square(5), Size.square(16), false); - public static final NinePatchRenderer DARK_PANEL = new NinePatchRenderer(OwoUIDrawContext.DARK_PANEL_TEXTURE, Size.square(5), Size.square(16), false); - public static final NinePatchRenderer PANEL_INSET = new NinePatchRenderer(OwoUIDrawContext.PANEL_INSET_TEXTURE, Size.square(5), Size.square(16), false); - - // Button Headquarters - - private static final Identifier BUTTON_TEXTURE = new Identifier("owo", "textures/gui/buttons.png"); - - public static final NinePatchRenderer ACTIVE_BUTTON - = new NinePatchRenderer(BUTTON_TEXTURE, 0, 0, Size.square(3), Size.square(58), Size.of(64, 192), true); - - public static final NinePatchRenderer HOVERED_BUTTON - = new NinePatchRenderer(BUTTON_TEXTURE, 0, 64, Size.square(3), Size.square(58), Size.of(64, 192), true); - - public static final NinePatchRenderer BUTTON_DISABLED - = new NinePatchRenderer(BUTTON_TEXTURE, 0, 128, Size.square(3), Size.square(58), Size.of(64, 192), true); -}