@Environment(value=CLIENT) public class AdvancementTab extends DrawableHelper
Modifier and Type | Field and Description |
---|---|
private float |
alpha |
private MinecraftClient |
client |
private AdvancementDisplay |
display |
private ItemStack |
icon |
private int |
index |
private boolean |
initialized |
private int |
maxPanX |
private int |
maxPanY |
private int |
minPanX |
private int |
minPanY |
private double |
originX |
private double |
originY |
private Advancement |
root |
private AdvancementWidget |
rootWidget |
private AdvancementsScreen |
screen |
private String |
title |
private AdvancementTabType |
type |
private Map<Advancement,AdvancementWidget> |
widgets |
BACKGROUND_TEXTURE, GUI_ICONS_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
AdvancementTab(MinecraftClient client,
AdvancementsScreen screen,
AdvancementTabType type,
int index,
Advancement root,
AdvancementDisplay display) |
Modifier and Type | Method and Description |
---|---|
void |
addAdvancement(Advancement advancement) |
private void |
addWidget(AdvancementWidget widget,
Advancement advancement) |
static AdvancementTab |
create(MinecraftClient minecraft,
AdvancementsScreen screen,
int index,
Advancement root) |
void |
drawBackground(int x,
int y,
boolean selected) |
void |
drawIcon(int x,
int y,
ItemRenderer itemRenderer) |
void |
drawWidgetTooltip(int mouseX,
int mouseY,
int x,
int y) |
Advancement |
getRoot() |
AdvancementsScreen |
getScreen() |
String |
getTitle() |
AdvancementWidget |
getWidget(Advancement advancement) |
boolean |
isClickOnTab(int screenX,
int screenY,
double mouseX,
double mouseY) |
void |
move(double offsetX,
double offsetY) |
void |
render() |
drawCenteredString, drawHorizontalLine, drawSprite, drawString, drawTexture, drawTexture, drawTexture, drawTexture, drawTexturedQuad, drawVerticalLine, fill, fill, fillGradient, getZOffset, setZOffset
private final MinecraftClient client
private final AdvancementsScreen screen
private final AdvancementTabType type
private final int index
private final Advancement root
private final AdvancementDisplay display
private final ItemStack icon
private final String title
private final AdvancementWidget rootWidget
private final Map<Advancement,AdvancementWidget> widgets
private double originX
private double originY
private int minPanX
private int minPanY
private int maxPanX
private int maxPanY
private float alpha
private boolean initialized
public AdvancementTab(MinecraftClient client, AdvancementsScreen screen, AdvancementTabType type, int index, Advancement root, AdvancementDisplay display)
public Advancement getRoot()
public String getTitle()
public void drawBackground(int x, int y, boolean selected)
public void drawIcon(int x, int y, ItemRenderer itemRenderer)
public void render()
public void drawWidgetTooltip(int mouseX, int mouseY, int x, int y)
public boolean isClickOnTab(int screenX, int screenY, double mouseX, double mouseY)
@Nullable public static AdvancementTab create(MinecraftClient minecraft, AdvancementsScreen screen, int index, Advancement root)
public void move(double offsetX, double offsetY)
public void addAdvancement(Advancement advancement)
private void addWidget(AdvancementWidget widget, Advancement advancement)
@Nullable public AdvancementWidget getWidget(Advancement advancement)
public AdvancementsScreen getScreen()