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 booleanannounceToChatprivate Identifierbackgroundprivate Textdescriptionprivate AdvancementFrameframeprivate booleanhiddenprivate ItemStackiconprivate booleanshowToastprivate Texttitleprivate floatxPosprivate floatyPos -
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 AdvancementDisplayfromJson(JsonObject obj)static AdvancementDisplayfromPacket(PacketByteBuf buf)IdentifiergetBackground()TextgetDescription()AdvancementFramegetFrame()ItemStackgetIcon()TextgetTitle()floatgetX()floatgetY()private static ItemStackiconFromJson(JsonObject json)private JsonObjecticonToJson()booleanisHidden()voidsetPosition(float xPos, float yPos)booleanshouldAnnounceToChat()booleanshouldShowToast()JsonElementtoJson()voidtoPacket(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
-