aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/utils/container/AbstractSlotTextAdder.java
blob: 5e13c644871055c3af9861efa8a015804873be88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package de.hysky.skyblocker.utils.container;

import de.hysky.skyblocker.skyblock.item.slottext.SlotText;
import net.minecraft.item.ItemStack;
import org.jetbrains.annotations.NotNull;

import java.util.List;

public interface AbstractSlotTextAdder extends ContainerMatcher {

	/**
	 * This method will be called for each rendered slot. Consider using a switch statement on {@code slotId} if you wish to limit the text to specific slots.
	 *
	 * @return A list of positioned text to be rendered. Return {@link List#of()} if no text should be rendered.
	 * @implNote By minecraft's design, scaled text inexplicably moves around.
	 *           It's also not anti-aliased, so it looks horribly jagged and unreadable when scaled down too much.
	 *           So, limit your text to 3 characters (or roughly less than 20 width) if you want it to not look horrible.
	 */
	@NotNull
	List<SlotText> getText(@NotNull ItemStack itemStack, int slotId);
}