From 36891bb4f9e6aedacf8f79bc1b18b0402845f3a8 Mon Sep 17 00:00:00 2001 From: xander Date: Tue, 20 Sep 2022 21:50:48 +0100 Subject: 1.4.2 --- src/main/java/dev/isxander/yacl/impl/ButtonOptionImpl.java | 3 --- src/main/java/dev/isxander/yacl/impl/ConfigCategoryImpl.java | 2 -- src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java | 2 -- src/main/java/dev/isxander/yacl/impl/OptionImpl.java | 9 ++++----- .../java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java | 2 -- .../java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java | 2 -- 6 files changed, 4 insertions(+), 16 deletions(-) (limited to 'src/main/java/dev/isxander/yacl/impl') diff --git a/src/main/java/dev/isxander/yacl/impl/ButtonOptionImpl.java b/src/main/java/dev/isxander/yacl/impl/ButtonOptionImpl.java index f6c8b6d..7d856b0 100644 --- a/src/main/java/dev/isxander/yacl/impl/ButtonOptionImpl.java +++ b/src/main/java/dev/isxander/yacl/impl/ButtonOptionImpl.java @@ -4,15 +4,12 @@ import com.google.common.collect.ImmutableSet; import dev.isxander.yacl.api.*; import dev.isxander.yacl.gui.YACLScreen; import net.minecraft.text.Text; -import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.function.BiConsumer; -import java.util.function.Consumer; import java.util.function.Function; -@ApiStatus.Internal public class ButtonOptionImpl implements ButtonOption { private final Text name; private final Text tooltip; diff --git a/src/main/java/dev/isxander/yacl/impl/ConfigCategoryImpl.java b/src/main/java/dev/isxander/yacl/impl/ConfigCategoryImpl.java index 5a7c9b0..971fecf 100644 --- a/src/main/java/dev/isxander/yacl/impl/ConfigCategoryImpl.java +++ b/src/main/java/dev/isxander/yacl/impl/ConfigCategoryImpl.java @@ -4,9 +4,7 @@ import com.google.common.collect.ImmutableList; import dev.isxander.yacl.api.ConfigCategory; import dev.isxander.yacl.api.OptionGroup; import net.minecraft.text.Text; -import org.jetbrains.annotations.ApiStatus; -@ApiStatus.Internal public record ConfigCategoryImpl(Text name, ImmutableList groups, Text tooltip) implements ConfigCategory { } diff --git a/src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java b/src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java index 9dfe2b0..1867bb6 100644 --- a/src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java +++ b/src/main/java/dev/isxander/yacl/impl/GenericBindingImpl.java @@ -1,12 +1,10 @@ package dev.isxander.yacl.impl; import dev.isxander.yacl.api.Binding; -import org.jetbrains.annotations.ApiStatus; import java.util.function.Consumer; import java.util.function.Supplier; -@ApiStatus.Internal public class GenericBindingImpl implements Binding { private final T def; private final Supplier getter; diff --git a/src/main/java/dev/isxander/yacl/impl/OptionImpl.java b/src/main/java/dev/isxander/yacl/impl/OptionImpl.java index 36cb217..14cf6a8 100644 --- a/src/main/java/dev/isxander/yacl/impl/OptionImpl.java +++ b/src/main/java/dev/isxander/yacl/impl/OptionImpl.java @@ -11,15 +11,14 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.function.BiConsumer; import java.util.function.Function; -@ApiStatus.Internal public class OptionImpl implements Option { private final Text name; private Text tooltip; - private final Function tooltipGetter; private final Controller controller; private final Binding binding; private boolean available; @@ -39,16 +38,16 @@ public class OptionImpl implements Option { @NotNull Binding binding, boolean available, ImmutableSet flags, - @NotNull Class typeClass + @NotNull Class typeClass, + @NotNull Collection, T>> listeners ) { this.name = name; - this.tooltipGetter = tooltipGetter; this.controller = controlGetter.apply(this); this.binding = binding; this.available = available; this.flags = flags; this.typeClass = typeClass; - this.listeners = new ArrayList<>(); + this.listeners = new ArrayList<>(listeners); addListener((opt, pending) -> tooltip = tooltipGetter.apply(pending)); requestSet(binding().getValue()); diff --git a/src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java b/src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java index 5938bad..7e2afdb 100644 --- a/src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java +++ b/src/main/java/dev/isxander/yacl/impl/YetAnotherConfigLibImpl.java @@ -6,11 +6,9 @@ import dev.isxander.yacl.api.YetAnotherConfigLib; import dev.isxander.yacl.gui.YACLScreen; import net.minecraft.client.gui.screen.Screen; import net.minecraft.text.Text; -import org.jetbrains.annotations.ApiStatus; import java.util.function.Consumer; -@ApiStatus.Internal public record YetAnotherConfigLibImpl(Text title, ImmutableList categories, Runnable saveFunction, Consumer initConsumer) implements YetAnotherConfigLib { @Override public Screen generateScreen(Screen parent) { diff --git a/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java b/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java index 4cb1c0e..76a5868 100644 --- a/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java +++ b/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java @@ -1,9 +1,7 @@ package dev.isxander.yacl.impl.utils; import dev.isxander.yacl.api.utils.Dimension; -import org.jetbrains.annotations.ApiStatus; -@ApiStatus.Internal public class DimensionIntegerImpl implements Dimension { private int x, y; private int width, height; -- cgit