Package net.minecraft.advancement
Class AdvancementDisplay
java.lang.Object
net.minecraft.advancement.AdvancementDisplay
public class AdvancementDisplay extends Object
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description AdvancementDisplay(ItemStack icon, Text title, Text description, Identifier background, AdvancementFrame frame, boolean showToast, boolean announceToChat, boolean hidden)
-
Method Summary
Modifier and Type Method 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)
-
Field Details
-
title
-
description
-
icon
-
background
-
frame
-
showToast
private final boolean showToast -
announceToChat
private final boolean announceToChat -
xPos
private float xPos -
yPos
private float yPos
-
-
Constructor Details
-
AdvancementDisplay
public AdvancementDisplay(ItemStack icon, Text title, Text description, @Nullable Identifier background, AdvancementFrame frame, boolean showToast, boolean announceToChat, boolean hidden)
-
-
Method Details
-
setPosition
public void setPosition(float xPos, float yPos) -
getTitle
-
getDescription
-
getIcon
-
getBackground
-
getFrame
-
getX
@Environment(CLIENT) public float getX() -
getY
@Environment(CLIENT) public float getY() -
shouldShowToast
@Environment(CLIENT) public boolean shouldShowToast() -
shouldAnnounceToChat
public boolean shouldAnnounceToChat() -
isHidden
public boolean isHidden() -
fromJson
-
iconFromJson
-
toPacket
-
fromPacket
-
toJson
-
iconToJson
-