Skip to content

Commit

Permalink
remove previously deprecated APIs
Browse files Browse the repository at this point in the history
 - BaseParentComponent#mountChild
 - NinePatchRenderer, OwoNinePatchRenderers
 - OwoItemGroup#setSelectedTab, OwoItemGroup#getSelectedTab, OwoItemGroup#getSelectedTabIndex
 - ParentComponent#collectChildren
  • Loading branch information
gliscowo committed Dec 9, 2023
1 parent f2f021b commit 01f824c
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 136 deletions.
4 changes: 0 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 0 additions & 26 deletions src/main/java/io/wispforest/owo/itemgroup/OwoItemGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/io/wispforest/owo/ui/base/BaseParentComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Component> 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
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/io/wispforest/owo/ui/core/ParentComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,19 +256,6 @@ default <T extends Component> T childById(@NotNull Class<T> 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<Component> into) {
this.forEachDescendant(into::add);
}

/**
* Collect the entire component hierarchy below the given component
* into the given list
Expand Down
22 changes: 0 additions & 22 deletions src/main/java/io/wispforest/owo/ui/util/NinePatchRenderer.java

This file was deleted.

57 changes: 0 additions & 57 deletions src/main/java/io/wispforest/owo/ui/util/OwoNinePatchRenderers.java

This file was deleted.

0 comments on commit 01f824c

Please sign in to comment.