Package net.minecraft.util.palette
Class IdentityPalette<T>
- java.lang.Object
-
- net.minecraft.util.palette.IdentityPalette<T>
-
-
Field Summary
Fields Modifier and Type Field Description private T
defaultValue
private ObjectIntIdentityMap<T>
registry
-
Constructor Summary
Constructors Constructor Description IdentityPalette(ObjectIntIdentityMap<T> p_i48965_1_, T p_i48965_2_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSerializedSize()
int
idFor(T p_186041_1_)
boolean
maybeHas(java.util.function.Predicate<T> p_230341_1_)
void
read(ListNBT p_196968_1_)
void
read(PacketBuffer p_186038_1_)
T
valueFor(int p_186039_1_)
void
write(PacketBuffer p_186037_1_)
-
-
-
Field Detail
-
registry
private final ObjectIntIdentityMap<T> registry
-
defaultValue
private final T defaultValue
-
-
Constructor Detail
-
IdentityPalette
public IdentityPalette(ObjectIntIdentityMap<T> p_i48965_1_, T p_i48965_2_)
-
-
Method Detail
-
maybeHas
public boolean maybeHas(java.util.function.Predicate<T> p_230341_1_)
-
read
public void read(PacketBuffer p_186038_1_)
-
write
public void write(PacketBuffer p_186037_1_)
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfaceIPalette<T>
-
-