public class DisplayInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
announceToChat |
private ResourceLocation |
background |
private ITextComponent |
description |
private FrameType |
frame |
private boolean |
hidden |
private ItemStack |
icon |
private boolean |
showToast |
private ITextComponent |
title |
private float |
x |
private float |
y |
Constructor and Description |
---|
DisplayInfo(ItemStack icon,
ITextComponent title,
ITextComponent description,
ResourceLocation background,
FrameType frame,
boolean showToast,
boolean announceToChat,
boolean hidden) |
Modifier and Type | Method and Description |
---|---|
static DisplayInfo |
deserialize(com.google.gson.JsonObject object,
com.google.gson.JsonDeserializationContext context) |
private static ItemStack |
deserializeIcon(com.google.gson.JsonObject object) |
ResourceLocation |
getBackground() |
ITextComponent |
getDescription() |
FrameType |
getFrame() |
ItemStack |
getIcon() |
ITextComponent |
getTitle() |
float |
getX() |
float |
getY() |
boolean |
isHidden() |
static DisplayInfo |
read(PacketBuffer buf) |
void |
setPosition(float x,
float y) |
boolean |
shouldAnnounceToChat() |
boolean |
shouldShowToast() |
void |
write(PacketBuffer buf) |
private final ITextComponent title
private final ITextComponent description
private final ItemStack icon
private final ResourceLocation background
private final FrameType frame
private final boolean showToast
private final boolean announceToChat
private final boolean hidden
private float x
private float y
public DisplayInfo(ItemStack icon, ITextComponent title, ITextComponent description, @Nullable ResourceLocation background, FrameType frame, boolean showToast, boolean announceToChat, boolean hidden)
public void setPosition(float x, float y)
public ITextComponent getTitle()
public ITextComponent getDescription()
public ItemStack getIcon()
@Nullable public ResourceLocation getBackground()
public FrameType getFrame()
public float getX()
public float getY()
public boolean shouldShowToast()
public boolean shouldAnnounceToChat()
public boolean isHidden()
public static DisplayInfo deserialize(com.google.gson.JsonObject object, com.google.gson.JsonDeserializationContext context)
private static ItemStack deserializeIcon(com.google.gson.JsonObject object)
public void write(PacketBuffer buf)
public static DisplayInfo read(PacketBuffer buf) throws java.io.IOException
java.io.IOException