public class AdvancementDisplay extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
announceToChat |
private Identifier |
background |
private Text |
description |
private AdvancementFrame |
frame |
private boolean |
hidden |
private ItemStack |
icon |
private boolean |
showToast |
private Text |
title |
private float |
xPos |
private float |
yPos |
Constructor and Description |
---|
AdvancementDisplay(ItemStack icon,
Text title,
Text description,
Identifier background,
AdvancementFrame frame,
boolean showToast,
boolean announceToChat,
boolean hidden) |
Modifier and Type | Method and Description |
---|---|
static AdvancementDisplay |
fromJson(JsonObject obj) |
static AdvancementDisplay |
fromPacket(PacketByteBuf buf) |
Identifier |
getBackground() |
Text |
getDescription() |
AdvancementFrame |
getFrame() |
ItemStack |
getIcon() |
Text |
getTitle() |
float |
getX() |
float |
getY() |
private static ItemStack |
iconFromJson(JsonObject json) |
private JsonObject |
iconToJson() |
boolean |
isHidden() |
void |
setPosition(float xPos,
float yPos) |
boolean |
shouldAnnounceToChat() |
boolean |
shouldShowToast() |
JsonElement |
toJson() |
void |
toPacket(PacketByteBuf buf) |
private final Text title
private final Text description
private final ItemStack icon
private final Identifier background
private final AdvancementFrame frame
private final boolean showToast
private final boolean announceToChat
private final boolean hidden
private float xPos
private float yPos
public AdvancementDisplay(ItemStack icon, Text title, Text description, @Nullable Identifier background, AdvancementFrame frame, boolean showToast, boolean announceToChat, boolean hidden)
public void setPosition(float xPos, float yPos)
public Text getTitle()
public Text getDescription()
@Environment(value=CLIENT) public ItemStack getIcon()
@Environment(value=CLIENT) @Nullable public Identifier getBackground()
public AdvancementFrame getFrame()
@Environment(value=CLIENT) public float getX()
@Environment(value=CLIENT) public float getY()
@Environment(value=CLIENT) public boolean shouldShowToast()
public boolean shouldAnnounceToChat()
public boolean isHidden()
public static AdvancementDisplay fromJson(JsonObject obj)
private static ItemStack iconFromJson(JsonObject json)
public void toPacket(PacketByteBuf buf)
public static AdvancementDisplay fromPacket(PacketByteBuf buf)
public JsonElement toJson()
private JsonObject iconToJson()