Skip to content

Commit 64b14c4

Browse files
committed
Simplify to a single version for this update, and remove methods added and deprecated in the same version
1 parent 81f7bb7 commit 64b14c4

17 files changed

+50
-218
lines changed

CommonApi/src/main/java/mezz/jei/api/gui/builder/IRecipeLayoutBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ default IRecipeSlotBuilder addInputSlot(int x, int y) {
3535
*
3636
* @return a {@link IRecipeSlotBuilder} that has further methods for adding ingredients, setting position, etc.
3737
*
38-
* @since 15.20.3
38+
* @since 15.20.0
3939
*/
4040
default IRecipeSlotBuilder addInputSlot() {
4141
return addSlot(RecipeIngredientRole.INPUT);
@@ -61,7 +61,7 @@ default IRecipeSlotBuilder addOutputSlot(int x, int y) {
6161
*
6262
* @return a {@link IRecipeSlotBuilder} that has further methods for adding ingredients, setting position, etc.
6363
*
64-
* @since 15.20.3
64+
* @since 15.20.0
6565
*/
6666
default IRecipeSlotBuilder addOutputSlot() {
6767
return addSlot(RecipeIngredientRole.OUTPUT);
@@ -88,7 +88,7 @@ default IRecipeSlotBuilder addSlot(RecipeIngredientRole role, int x, int y) {
8888
* @param role the {@link RecipeIngredientRole} of this slot (for lookups).
8989
* @return a {@link IRecipeSlotBuilder} that has further methods for adding ingredients, etc.
9090
*
91-
* @since 15.20.1
91+
* @since 15.20.0
9292
*/
9393
IRecipeSlotBuilder addSlot(RecipeIngredientRole role);
9494

@@ -101,7 +101,7 @@ default IRecipeSlotBuilder addSlot(RecipeIngredientRole role, int x, int y) {
101101
* @since 15.10.0
102102
* @deprecated there are easier ways to create slotted widgets now. Use {@link IRecipeExtrasBuilder#addSlottedWidget}.
103103
*/
104-
@Deprecated(since = "15.20.3", forRemoval = true)
104+
@Deprecated(since = "15.20.0", forRemoval = true)
105105
@SuppressWarnings("removal")
106106
IRecipeSlotBuilder addSlotToWidget(RecipeIngredientRole role, mezz.jei.api.gui.widgets.ISlottedWidgetFactory<?> widgetFactory);
107107

CommonApi/src/main/java/mezz/jei/api/gui/ingredient/IRecipeSlotDrawable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ default void addTooltipCallback(IRecipeSlotTooltipCallback tooltipCallback) {
112112
* Get the area that this recipe slot draws on, including the area covered by its background texture.
113113
* Useful for laying out other recipe elements relative to the slot.
114114
*
115-
* @since 15.20.3
115+
* @since 15.20.0
116116
*/
117117
Rect2i getAreaIncludingBackground();
118118
}

CommonApi/src/main/java/mezz/jei/api/gui/ingredient/IRecipeSlotDrawablesView.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
*
1616
* @see IRecipeSlotsView for a view with less access to drawable properties of the slots.
1717
*
18-
* @since 15.20.3
18+
* @since 15.20.0
1919
*/
2020
public interface IRecipeSlotDrawablesView {
2121
/**
2222
* Get all slots for a recipe.
2323
*
24-
* @since 15.20.3
24+
* @since 15.20.0
2525
*/
2626
@Unmodifiable
2727
List<IRecipeSlotDrawable> getSlots();
2828

2929
/**
3030
* Get the list of slots for the given {@link RecipeIngredientRole} for a recipe.
3131
*
32-
* @since 15.20.3
32+
* @since 15.20.0
3333
*/
3434
default List<IRecipeSlotDrawable> getSlots(RecipeIngredientRole role) {
3535
List<IRecipeSlotDrawable> list = new ArrayList<>();
@@ -44,7 +44,7 @@ default List<IRecipeSlotDrawable> getSlots(RecipeIngredientRole role) {
4444
/**
4545
* Get a recipe slot by its name set with {@link IRecipeSlotBuilder#setSlotName(String)}.
4646
*
47-
* @since 15.20.3
47+
* @since 15.20.0
4848
*/
4949
default Optional<IRecipeSlotDrawable> findSlotByName(String slotName) {
5050
return getSlots().stream()

CommonApi/src/main/java/mezz/jei/api/gui/placement/HorizontalAlignment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Represents a horizontal alignment of an element inside a larger area.
5-
* @since 15.20.1
5+
* @since 15.20.0
66
*/
77
public enum HorizontalAlignment {
88
LEFT {
@@ -26,7 +26,7 @@ public int getXPos(int availableWidth, int elementWidth) {
2626

2727
/**
2828
* Calculate the x position needed to align an element with the given width inside the availableArea.
29-
* @since 15.20.1
29+
* @since 15.20.0
3030
*/
3131
public abstract int getXPos(int availableWidth, int elementWidth);
3232
}

CommonApi/src/main/java/mezz/jei/api/gui/placement/IPlaceable.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
/**
44
* Interface for things that can have their position set, and be aligned vertically and horizontally in an area.
55
*
6-
* @since 15.20.1
6+
* @since 15.20.0
77
*/
88
public interface IPlaceable<THIS extends IPlaceable<THIS>> {
99
/**
1010
* Place this element at the given position.
11-
* @since 15.20.1
11+
* @since 15.20.0
1212
*/
1313
THIS setPosition(int xPos, int yPos);
1414

1515
/**
1616
* Place this element inside the given area, with the given alignment.
1717
*
18-
* @since 15.20.1
18+
* @since 15.20.0
1919
*/
2020
default THIS setPosition(int areaX, int areaY, int areaWidth, int areaHeight, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment) {
2121
int x = areaX + horizontalAlignment.getXPos(areaWidth, getWidth());
@@ -25,13 +25,13 @@ default THIS setPosition(int areaX, int areaY, int areaWidth, int areaHeight, Ho
2525

2626
/**
2727
* Get the width of this element.
28-
* @since 15.20.1
28+
* @since 15.20.0
2929
*/
3030
int getWidth();
3131

3232
/**
3333
* Get the height of this element.
34-
* @since 15.20.1
34+
* @since 15.20.0
3535
*/
3636
int getHeight();
3737
}

CommonApi/src/main/java/mezz/jei/api/gui/placement/VerticalAlignment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Represents a vertical alignment of an element inside a larger box (availableArea).
5-
* @since 15.20.1
5+
* @since 15.20.0
66
*/
77
public enum VerticalAlignment {
88
TOP {
@@ -26,7 +26,7 @@ public int getYPos(int availableHeight, int elementHeight) {
2626

2727
/**
2828
* Calculate the y position needed to align an element with the given height inside the availableArea.
29-
* @since 15.20.1
29+
* @since 15.20.0
3030
*/
3131
public abstract int getYPos(int availableHeight, int elementHeight);
3232
}

CommonApi/src/main/java/mezz/jei/api/gui/widgets/IRecipeExtrasBuilder.java

Lines changed: 7 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface IRecipeExtrasBuilder {
3232
/**
3333
* Get the recipe slots that were created in {@link IRecipeCategory#setRecipe}.
3434
*
35-
* @since 15.20.3
35+
* @since 15.20.0
3636
*/
3737
IRecipeSlotDrawablesView getRecipeSlots();
3838

@@ -46,7 +46,7 @@ public interface IRecipeExtrasBuilder {
4646
/**
4747
* Add a {@link IDrawable} for the recipe category, and place it after with {@link IPlaceable} methods.
4848
*
49-
* @since 15.20.1
49+
* @since 15.20.0
5050
*/
5151
IPlaceable<?> addDrawable(IDrawable drawable);
5252

@@ -61,7 +61,7 @@ public interface IRecipeExtrasBuilder {
6161
* Add a {@link ISlottedRecipeWidget} for the recipe category, and
6262
* mark that the slots are going to be handled by the slotted widget.
6363
*
64-
* @since 15.20.3
64+
* @since 15.20.0
6565
*/
6666
void addSlottedWidget(ISlottedRecipeWidget widget, List<IRecipeSlotDrawable> slots);
6767

@@ -85,7 +85,7 @@ public interface IRecipeExtrasBuilder {
8585
*
8686
* Set the contents by using the methods in {@link IScrollBoxWidget}.
8787
*
88-
* @since 15.19.6
88+
* @since 15.20.0
8989
*/
9090
IScrollBoxWidget addScrollBoxWidget(int width, int height, int xPos, int yPos);
9191

@@ -97,83 +97,35 @@ public interface IRecipeExtrasBuilder {
9797
*
9898
* You can move the resulting grid by using the {@link IScrollGridWidget}'s {@link IPlaceable} methods.
9999
*
100-
* @since 15.20.3
100+
* @since 15.20.0
101101
*/
102102
IScrollGridWidget addScrollGridWidget(List<IRecipeSlotDrawable> slots, int columns, int visibleRows);
103103

104104
/**
105105
* Add a vanilla-style recipe arrow to the recipe layout.
106106
*
107107
* @since 15.20.0
108-
* @deprecated use {@link #addRecipeArrow()} and then set the position with {@link IPlaceable} methods.
109-
*/
110-
@Deprecated(since = "15.20.1", forRemoval = true)
111-
default void addRecipeArrow(int xPos, int yPos) {
112-
addRecipeArrow()
113-
.setPosition(xPos, yPos);
114-
}
115-
116-
/**
117-
* Add a vanilla-style recipe arrow to the recipe layout.
118-
*
119-
* @since 15.20.1
120108
*/
121109
IPlaceable<?> addRecipeArrow();
122110

123111
/**
124112
* Add a vanilla-style recipe plus sign to the recipe layout.
125113
*
126114
* @since 15.20.0
127-
* @deprecated use {@link #addRecipePlusSign()} and then set the position with {@link IPlaceable} methods.
128-
*/
129-
@Deprecated(since = "15.20.1", forRemoval = true)
130-
default void addRecipePlusSign(int xPos, int yPos) {
131-
addRecipePlusSign()
132-
.setPosition(xPos, yPos);
133-
}
134-
135-
/**
136-
* Add a vanilla-style recipe plus sign to the recipe layout.
137-
*
138-
* @since 15.20.1
139115
*/
140116
IPlaceable<?> addRecipePlusSign();
141117

142118
/**
143119
* Add a vanilla-style recipe arrow that fills over time in a loop.
144120
*
145121
* @since 15.20.0
146-
* @deprecated use {@link #addAnimatedRecipeArrow(int)} and then set the position with {@link IPlaceable} methods.
147-
*/
148-
@Deprecated(since = "15.20.1", forRemoval = true)
149-
default void addAnimatedRecipeArrow(int ticksPerCycle, int xPos, int yPos) {
150-
addAnimatedRecipeArrow(ticksPerCycle)
151-
.setPosition(xPos, yPos);
152-
}
153-
154-
/**
155-
* Add a vanilla-style recipe arrow that fills over time in a loop.
156-
*
157-
* @since 15.20.1
158122
*/
159123
IPlaceable<?> addAnimatedRecipeArrow(int ticksPerCycle);
160124

161125
/**
162126
* Add a vanilla-style recipe flame that empties over time in a loop.
163127
*
164128
* @since 15.20.0
165-
* @deprecated use {@link #addAnimatedRecipeFlame(int)} and then set the position with {@link IPlaceable} methods.
166-
*/
167-
@Deprecated(since = "15.20.1", forRemoval = true)
168-
default void addAnimatedRecipeFlame(int cookTime, int xPos, int yPos) {
169-
addAnimatedRecipeFlame(cookTime)
170-
.setPosition(xPos, yPos);
171-
}
172-
173-
/**
174-
* Add a vanilla-style recipe flame that empties over time in a loop.
175-
*
176-
* @since 15.20.1
177129
*/
178130
IPlaceable<?> addAnimatedRecipeFlame(int cookTime);
179131

@@ -186,25 +138,12 @@ default void addAnimatedRecipeFlame(int cookTime, int xPos, int yPos) {
186138
* Text can be vertically and horizontally aligned using the methods in {@link ITextWidget}.
187139
* By default, text is vertically aligned "top" and horizontally aligned "left" inside the area given.
188140
*
189-
* @since 15.20.1
141+
* @since 15.20.0
190142
*/
191143
default ITextWidget addText(FormattedText text, int maxWidth, int maxHeight) {
192144
return addText(List.of(text), maxWidth, maxHeight);
193145
}
194146

195-
/**
196-
* Add text to the recipe layout.
197-
*
198-
* Automatically supports text wrapping and truncation of very long lines.
199-
* If text is truncated, it will be displayed with an ellipsis (...) and can be viewed fully with a tooltip.
200-
*
201-
* Text can be vertically and horizontally aligned using the methods in {@link ITextWidget}.
202-
* By default, text is vertically aligned "top" and horizontally aligned "left" inside the area given.
203-
*
204-
* @since 15.20.1
205-
*/
206-
ITextWidget addText(List<FormattedText> text, int maxWidth, int maxHeight);
207-
208147
/**
209148
* Add text to the recipe layout.
210149
*
@@ -215,30 +154,6 @@ default ITextWidget addText(FormattedText text, int maxWidth, int maxHeight) {
215154
* By default, text is vertically aligned "top" and horizontally aligned "left" inside the area given.
216155
*
217156
* @since 15.20.0
218-
* @deprecated use {@link #addText(FormattedText, int, int)} and then set the position.
219157
*/
220-
@Deprecated(since = "15.20.1", forRemoval = true)
221-
default ITextWidget addText(FormattedText text, int xPos, int yPos, int maxWidth, int maxHeight) {
222-
return addText(List.of(text), maxWidth, maxHeight)
223-
.setPosition(xPos, yPos);
224-
}
225-
226-
/**
227-
* Add text to the recipe layout.
228-
*
229-
* Automatically supports text wrapping and truncation of very long lines.
230-
* If text is truncated, it will be displayed with an ellipsis (...) and can be viewed fully with a tooltip.
231-
*
232-
* Text can be vertically and horizontally aligned using the methods in {@link ITextWidget}.
233-
* By default, text is vertically aligned "top" and horizontally aligned "left" inside the area given.
234-
*
235-
* @since 15.20.0
236-
* @deprecated use {@link #addText(List, int, int)} and then set the position.
237-
*/
238-
@Deprecated(since = "15.20.1", forRemoval = true)
239-
default ITextWidget addText(List<FormattedText> text, int xPos, int yPos, int maxWidth, int maxHeight) {
240-
return addText(text, maxWidth, maxHeight)
241-
.setPosition(xPos, yPos);
242-
}
243-
158+
ITextWidget addText(List<FormattedText> text, int maxWidth, int maxHeight);
244159
}

CommonApi/src/main/java/mezz/jei/api/gui/widgets/IScrollBoxWidget.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@ public interface IScrollBoxWidget extends IRecipeWidget, IJeiInputHandler {
1818
* Get the width available for displaying contents in the scroll box.
1919
* The scroll bar takes up some of the space, so this can be used in order to create accurately-sized contents.
2020
*
21-
* @since 15.19.6
21+
* @since 15.20.0
2222
*/
2323
int getContentAreaWidth();
2424

2525
/**
2626
* Get the visible height for displaying contents in the scroll box.
2727
* The actual height of the contents can be taller, because the box can scroll to show more.
2828
*
29-
* @since 15.19.6
29+
* @since 15.20.0
3030
*/
3131
int getContentAreaHeight();
3232

3333
/**
3434
* Set the contents to display inside the scroll box.
3535
* The drawable width should match {@link #getContentAreaWidth()}, and the height can be any height.
3636
*
37-
* @since 15.19.6
37+
* @since 15.20.0
3838
*/
3939
IScrollBoxWidget setContents(IDrawable contents);
4040

4141
/**
4242
* Display text in the scroll box.
4343
* Text will be automatically wrapped in order to fit inside of {@link #getContentAreaWidth()}.
4444
*
45-
* @since 15.19.6
45+
* @since 15.20.0
4646
*/
4747
IScrollBoxWidget setContents(List<FormattedText> text);
4848
}

CommonApi/src/main/java/mezz/jei/api/gui/widgets/IScrollGridWidget.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
* Modeled after the vanilla creative menu.
99
*
1010
* Create one with {@link IRecipeExtrasBuilder#addScrollGridWidget}.
11-
* @since 15.20.3
11+
* @since 15.20.0
1212
*/
1313
public interface IScrollGridWidget extends ISlottedRecipeWidget, IPlaceable<IScrollGridWidget> {
1414
/**
1515
* Get the position and size of this widget, relative to its parent element.
1616
*
17-
* @since 15.20.3
17+
* @since 15.20.0
1818
*/
1919
ScreenRectangle getScreenRectangle();
2020
}

CommonApi/src/main/java/mezz/jei/api/gui/widgets/IScrollGridWidgetFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* @deprecated use {@link IRecipeExtrasBuilder#addScrollGridWidget} instead, it's much simpler
1313
*/
1414
@SuppressWarnings({"DeprecatedIsStillUsed", "removal"})
15-
@Deprecated(since = "15.20.3", forRemoval = true)
15+
@Deprecated(since = "15.20.0", forRemoval = true)
1616
public interface IScrollGridWidgetFactory<R> extends ISlottedWidgetFactory<R> {
1717
/**
1818
* @since 15.10.0

0 commit comments

Comments
 (0)