Package alexiil.mc.lib.net
Class NetObjectCacheSimple<T>
java.lang.Object
alexiil.mc.lib.net.NetObjectCacheSimple<T>
-
Constructor Summary
ConstructorDescriptionNetObjectCacheSimple(it.unimi.dsi.fastutil.Hash.Strategy<T> equality, NetObjectCache.IEntrySerialiser<T> serialiser)
-
Method Summary
Modifier and TypeMethodDescriptionstatic NetObjectCacheSimple<net.minecraft.util.Identifier>
createIdentifierSet(Set<net.minecraft.util.Identifier> set)
static <T> NetObjectCacheSimple<T>
createMappedIdentifier(Map<net.minecraft.util.Identifier,T> map, Function<T,net.minecraft.util.Identifier> reverse)
static <T> NetObjectCacheSimple<T>
createPartiallyMappedIdentifier(Map<net.minecraft.util.Identifier,T> map, Function<T,net.minecraft.util.Identifier> reverse)
read(NetByteBuf buffer, IMsgReadCtx ctx)
void
write(T obj, NetByteBuf buffer, IMsgWriteCtx ctx)
-
Constructor Details
-
NetObjectCacheSimple
public NetObjectCacheSimple(it.unimi.dsi.fastutil.Hash.Strategy<T> equality, NetObjectCache.IEntrySerialiser<T> serialiser) -
NetObjectCacheSimple
-
-
Method Details
-
createMappedIdentifier
public static <T> NetObjectCacheSimple<T> createMappedIdentifier(Map<net.minecraft.util.Identifier,T> map, Function<T,net.minecraft.util.Identifier> reverse) -
createPartiallyMappedIdentifier
public static <T> NetObjectCacheSimple<T> createPartiallyMappedIdentifier(Map<net.minecraft.util.Identifier,T> map, Function<T,net.minecraft.util.Identifier> reverse) -
createIdentifierSet
public static NetObjectCacheSimple<net.minecraft.util.Identifier> createIdentifierSet(Set<net.minecraft.util.Identifier> set) -
write
-
read
- Throws:
InvalidInputDataException
-