Modifier and Type | Field and Description |
---|---|
private T |
defaultValue |
private IdList<T> |
idList |
Constructor and Description |
---|
IdListPalette(IdList<T> idList,
T defaultValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(Predicate<T> predicate) |
void |
fromPacket(PacketByteBuf buf) |
void |
fromTag(ListTag tag) |
T |
getByIndex(int index) |
int |
getIndex(T object) |
int |
getPacketSize() |
void |
toPacket(PacketByteBuf buf) |
public T getByIndex(int index)
getByIndex
in interface Palette<T>
@Environment(value=CLIENT) public void fromPacket(PacketByteBuf buf)
fromPacket
in interface Palette<T>
public void toPacket(PacketByteBuf buf)
public int getPacketSize()
getPacketSize
in interface Palette<T>