aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2023-09-09 12:30:07 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2023-09-09 12:30:07 +0300
commit88b3763b65cfc5ed68a95a500a0c82a32185c15c (patch)
treed2e599307874bf3cd140bb10eeed89a75e4e9257
parentcdb98f881e59677841edd612a853f3959c6443de (diff)
downloadLibGui-88b3763b65cfc5ed68a95a500a0c82a32185c15c.tar.gz
LibGui-88b3763b65cfc5ed68a95a500a0c82a32185c15c.tar.bz2
LibGui-88b3763b65cfc5ed68a95a500a0c82a32185c15c.zip
Add since tags and make all deprecations forRemoval=true
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java8
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java8
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java8
3 files changed, 17 insertions, 7 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java b/src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java
index 31cb59f..0c69255 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/ValidatedSlot.java
@@ -120,6 +120,7 @@ public class ValidatedSlot extends Slot {
* Gets the item stack input filter of this slot.
*
* @return the item input filter
+ * @since 8.1.0
*/
public Predicate<ItemStack> getInputFilter() {
return inputFilter;
@@ -129,6 +130,7 @@ public class ValidatedSlot extends Slot {
* Sets the item stack input filter of this slot.
*
* @param inputFilter the new item input filter
+ * @since 8.1.0
*/
public void setInputFilter(Predicate<ItemStack> inputFilter) {
this.inputFilter = inputFilter;
@@ -138,6 +140,7 @@ public class ValidatedSlot extends Slot {
* Gets the item stack output filter of this slot.
*
* @return the item output filter
+ * @since 8.1.0
*/
public Predicate<ItemStack> getOutputFilter() {
return outputFilter;
@@ -147,6 +150,7 @@ public class ValidatedSlot extends Slot {
* Sets the item stack output filter of this slot.
*
* @param outputFilter the new item output filter
+ * @since 8.1.0
*/
public void setOutputFilter(Predicate<ItemStack> outputFilter) {
this.outputFilter = outputFilter;
@@ -159,7 +163,7 @@ public class ValidatedSlot extends Slot {
* @deprecated Replaced by {@link #getInputFilter()}
* @since 2.0.0
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
public Predicate<ItemStack> getFilter() {
return inputFilter;
}
@@ -171,7 +175,7 @@ public class ValidatedSlot extends Slot {
* @deprecated Replaced by {@link #setInputFilter(Predicate)}
* @since 2.0.0
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
public void setFilter(Predicate<ItemStack> filter) {
setInputFilter(filter);
}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
index 11542a4..4da52cc 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WItemSlot.java
@@ -409,6 +409,7 @@ public class WItemSlot extends WWidget {
* Gets the item stack input filter of this slot.
*
* @return the item input filter
+ * @since 8.1.0
*/
public Predicate<ItemStack> getInputFilter() {
return inputFilter;
@@ -419,6 +420,7 @@ public class WItemSlot extends WWidget {
*
* @param inputFilter the new item input filter
* @return this item slot
+ * @since 8.1.0
*/
public WItemSlot setInputFilter(Predicate<ItemStack> inputFilter) {
this.inputFilter = inputFilter;
@@ -432,6 +434,7 @@ public class WItemSlot extends WWidget {
* Gets the item stack output filter of this slot.
*
* @return the item output filter
+ * @since 8.1.0
*/
public Predicate<ItemStack> getOutputFilter() {
return outputFilter;
@@ -442,6 +445,7 @@ public class WItemSlot extends WWidget {
*
* @param outputFilter the new item output filter
* @return this item slot
+ * @since 8.1.0
*/
public WItemSlot setOutputFilter(Predicate<ItemStack> outputFilter) {
this.outputFilter = outputFilter;
@@ -458,7 +462,7 @@ public class WItemSlot extends WWidget {
* @deprecated Replaced by {@link #getInputFilter()}
* @since 2.0.0
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
public Predicate<ItemStack> getFilter() {
return inputFilter;
}
@@ -471,7 +475,7 @@ public class WItemSlot extends WWidget {
* @deprecated Replaced by {@link #setInputFilter(Predicate)}
* @since 2.0.0
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
public WItemSlot setFilter(Predicate<ItemStack> filter) {
return setInputFilter(filter);
}
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java
index 9411164..f5655b4 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WPlayerInvPanel.java
@@ -6,7 +6,6 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.text.Text;
import io.github.cottonmc.cotton.gui.GuiDescription;
-import io.github.cottonmc.cotton.gui.SyncedGuiDescription;
import io.github.cottonmc.cotton.gui.client.BackgroundPainter;
import io.github.cottonmc.cotton.gui.impl.client.NarrationMessages;
import org.jetbrains.annotations.Nullable;
@@ -14,19 +13,21 @@ import org.jetbrains.annotations.Nullable;
/**
* A player inventory widget that has a visually separate hotbar.
*
- * @see SyncedGuiDescription#createPlayerInventoryPanel()
+ * @see io.github.cottonmc.cotton.gui.SyncedGuiDescription#createPlayerInventoryPanel()
*/
public class WPlayerInvPanel extends WPlainPanel {
/**
* A 9 by 3 {@link WItemSlot} that represents the player's inventory.
*
* @see PlayerInventory
+ * @since 8.1.0
*/
protected final WItemSlot inventory;
/**
* A 9 by 1 {@link WItemSlot} that represents the player's hotbar.
*
* @see PlayerInventory
+ * @since 8.1.0
*/
protected final WItemSlot hotbar;
/**
@@ -34,7 +35,8 @@ public class WPlayerInvPanel extends WPlainPanel {
*
* <p> In vanilla and {@link WPlayerInvPanel#WPlayerInvPanel(PlayerInventory)}, this label is always 'Inventory'
*
- * @see #createInventoryLabel(PlayerInventory)
+ * @see #createInventoryLabel(PlayerInventory)
+ * @since 8.1.0
*/
@Nullable
protected final WWidget label;