Skip to content

Commit c75fca4

Browse files
committed
chore: remove deprecated code
1 parent d550c03 commit c75fca4

File tree

3 files changed

+1
-211
lines changed

3 files changed

+1
-211
lines changed

src/main/java/net/uku3lig/ukulib/config/option/widget/WidgetCreatorList.java

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,6 @@
2020
* A list of {@link WidgetCreator}, used to construct a vertical list of widgets
2121
*/
2222
public class WidgetCreatorList extends ContainerObjectSelectionList<WidgetCreatorList.@NotNull ButtonEntry> {
23-
/**
24-
* Creates an empty widget list
25-
*
26-
* @param minecraftClient The Minecraft client instance
27-
* @param width The width of the list
28-
* @param height The height of the list
29-
* @param top The top position of the list
30-
* @param bottom UNUSED PARAMETER, USE OTHER CONSTRUCTOR
31-
* @param itemHeight The height of each widget, usually 20
32-
* @see WidgetCreatorList#WidgetCreatorList(Minecraft, int, int, int, int)
33-
* @deprecated Mojang (rightfully) removed the bottom in 1.20.3, use {@link WidgetCreatorList#WidgetCreatorList(Minecraft, int, int, int, int)} instead
34-
*/
35-
@Deprecated(since = "1.1.0", forRemoval = true)
36-
public WidgetCreatorList(Minecraft minecraftClient, int width, int height, int top, @SuppressWarnings("unused") int bottom, int itemHeight) {
37-
this(minecraftClient, width, height, top, itemHeight);
38-
}
39-
40-
/**
41-
* Creates an empty widget list
42-
*
43-
* @param minecraftClient The Minecraft client instance
44-
* @param width The width of the list
45-
* @param height The height of the list
46-
* @param top The top position of the list
47-
* @param itemHeight The height of each widget, usually 20
48-
* @see WidgetCreatorList#WidgetCreatorList(Minecraft, int, HeaderAndFooterLayout)
49-
* @deprecated You should be wrapping the widget in the body of a {@link HeaderAndFooterLayout}
50-
*/
51-
@Deprecated(since = "1.10.0", forRemoval = true)
52-
public WidgetCreatorList(Minecraft minecraftClient, int width, int height, int top, int itemHeight) {
53-
super(minecraftClient, width, height, top, itemHeight);
54-
this.centerListVertically = false;
55-
}
56-
5723
/**
5824
* Creates an empty widget list
5925
*
@@ -140,33 +106,6 @@ public ButtonEntry(WidgetCreator creator) {
140106
this.widgets = List.of(creator.createWidget(310, 20));
141107
}
142108

143-
/**
144-
* Creates an entry.
145-
*
146-
* @param width The width of the entry
147-
* @param first The first entry
148-
* @param other The second entry; nullable
149-
* @see ButtonEntry#ButtonEntry(WidgetCreator, WidgetCreator)
150-
* @deprecated The width is now computed automatically
151-
*/
152-
@Deprecated(since = "1.10.0", forRemoval = true)
153-
public ButtonEntry(@SuppressWarnings("unused") int width, WidgetCreator first, @Nullable WidgetCreator other) {
154-
this(first, other);
155-
}
156-
157-
/**
158-
* Creates a single, wide entry.
159-
*
160-
* @param width The width of the entry
161-
* @param creator The entry
162-
* @see ButtonEntry#ButtonEntry(WidgetCreator)
163-
* @deprecated The width is now computed automatically
164-
*/
165-
@Deprecated(since = "1.10.0", forRemoval = true)
166-
public ButtonEntry(@SuppressWarnings("unused") int width, WidgetCreator creator) {
167-
this(creator);
168-
}
169-
170109
@Override
171110
public @NotNull List<? extends NarratableEntry> narratables() {
172111
return widgets;

src/main/java/net/uku3lig/ukulib/utils/IconButton.java

Lines changed: 0 additions & 130 deletions
This file was deleted.

src/main/java/net/uku3lig/ukulib/utils/Ukutils.java

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import java.nio.file.Path;
2828
import java.util.HashMap;
29-
import java.util.Locale;
3029
import java.util.Map;
3130
import java.util.function.BooleanSupplier;
3231
import java.util.function.Consumer;
@@ -55,7 +54,7 @@ public class Ukutils {
5554
* @return The generated button
5655
*/
5756
public static Button doneButton(int width, int height, Screen parent) {
58-
return Button.builder(CommonComponents.GUI_DONE, button -> Minecraft.getInstance().setScreen(parent))
57+
return Button.builder(CommonComponents.GUI_DONE, _ -> Minecraft.getInstance().setScreen(parent))
5958
.bounds(width / 2 - 100, height - 27, 200, 20)
6059
.build();
6160
}
@@ -173,24 +172,6 @@ public static boolean textureExists(Identifier texture) {
173172
return texture != null && (textureManager.getByPath().containsKey(texture) || resourceManager.getResource(texture).isPresent());
174173
}
175174

176-
/**
177-
* Gets the texture of a player's head.
178-
*
179-
* @param username The username of the player
180-
* @return The texture of the player's head
181-
* @deprecated Originally meant for internal use, you should look at {@link net.minecraft.client.gui.components.PlayerFaceRenderer} instead which is more robust and actually tested by mojang
182-
*/
183-
@Nullable
184-
@Deprecated(since = "1.10.0", forRemoval = true)
185-
public static Identifier getHeadTex(String username) {
186-
if (Identifier.isValidPath(username)) {
187-
username = username.toLowerCase(Locale.ROOT);
188-
return Identifier.fromNamespaceAndPath("ukulib", "head_" + username);
189-
} else {
190-
return null;
191-
}
192-
}
193-
194175
/**
195176
* Register a keybinding.
196177
*

0 commit comments

Comments
 (0)