Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GuiElementBuilder setCallback #33

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.20.5-rc1
yarn_mappings=1.20.5-rc1+build.1
minecraft_version=1.20.5
yarn_mappings=1.20.5+build.1
loader_version=0.15.10

#Fabric api
fabric_version=0.97.3+1.20.5
fabric_version=0.97.8+1.20.5


# Mod Properties
mod_version = 1.5.0+1.20.5
mod_version = 1.5.1+1.20.5
maven_group = eu.pb4
archives_base_name = sgui

Expand Down
12 changes: 3 additions & 9 deletions src/main/java/eu/pb4/sgui/api/elements/GuiElementBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
*
* @see GuiElementBuilderInterface
*/
@SuppressWarnings({"unused", "rawtypes"})
public class GuiElementBuilder implements GuiElementBuilderInterface {
@SuppressWarnings({"unused"})
public class GuiElementBuilder implements GuiElementBuilderInterface<GuiElementBuilder> {
protected ItemStack itemStack = new ItemStack(Items.STONE);
protected GuiElement.ClickCallback callback = GuiElementInterface.EMPTY_CALLBACK;

Expand Down Expand Up @@ -345,13 +345,7 @@ public GuiElementBuilder setSkullOwner(String value, @Nullable String signature,
}

@Override
public GuiElementBuilder setCallback(GuiElement.ClickCallback callback) {
this.callback = callback;
return this;
}

@Override
public GuiElementBuilder setCallback(GuiElementInterface.ItemClickCallback callback) {
public GuiElementBuilder setCallback(GuiElementInterface.ClickCallback callback) {
this.callback = callback;
return this;
}
Expand Down
Loading