Package alexiil.mc.lib.net
Class NetObjectCacheSimple<T>
java.lang.Object
alexiil.mc.lib.net.NetObjectCacheSimple<T>
public class NetObjectCacheSimple<T>
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description NetObjectCacheSimple(it.unimi.dsi.fastutil.Hash.Strategy<T> equality, NetObjectCache.IEntrySerialiser<T> serialiser)
NetObjectCacheSimple(java.util.Map<java.lang.String,T> map, java.util.function.Function<T,java.lang.String> reverse)
-
Method Summary
Modifier and Type Method Description static NetObjectCacheSimple<net.minecraft.util.Identifier>
createIdentifierSet(java.util.Set<net.minecraft.util.Identifier> set)
static <T> NetObjectCacheSimple<T>
createMappedIdentifier(java.util.Map<net.minecraft.util.Identifier,T> map, java.util.function.Function<T,net.minecraft.util.Identifier> reverse)
static <T> NetObjectCacheSimple<T>
createPartiallyMappedIdentifier(java.util.Map<net.minecraft.util.Identifier,T> map, java.util.function.Function<T,net.minecraft.util.Identifier> reverse)
T
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(java.util.Map<net.minecraft.util.Identifier,T> map, java.util.function.Function<T,net.minecraft.util.Identifier> reverse) -
createPartiallyMappedIdentifier
public static <T> NetObjectCacheSimple<T> createPartiallyMappedIdentifier(java.util.Map<net.minecraft.util.Identifier,T> map, java.util.function.Function<T,net.minecraft.util.Identifier> reverse) -
createIdentifierSet
public static NetObjectCacheSimple<net.minecraft.util.Identifier> createIdentifierSet(java.util.Set<net.minecraft.util.Identifier> set) -
write
-
read
- Throws:
InvalidInputDataException
-