Package alexiil.mc.lib.net
Class NetObjectCache<T>
java.lang.Object
alexiil.mc.lib.net.NetObjectCache<T>
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionNetObjectCache
(ParentNetId parent, it.unimi.dsi.fastutil.Hash.Strategy<T> equality, NetObjectCache.IEntrySerialiser<T> serialiser) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> NetObjectCache<T>
createMappedIdentifier
(ParentNetId parent, Function<T, net.minecraft.util.Identifier> nameGetter, Function<net.minecraft.util.Identifier, T> objectGetter) static <T> NetObjectCache<T>
createMappedIdentifier
(ParentNetId parent, Function<T, net.minecraft.util.Identifier> nameGetter, Map<net.minecraft.util.Identifier, T> map) int
getId
(ActiveConnection connection, T obj) getObj
(ActiveConnection connection, int id) void
-
Constructor Details
-
NetObjectCache
public NetObjectCache(ParentNetId parent, it.unimi.dsi.fastutil.Hash.Strategy<T> equality, NetObjectCache.IEntrySerialiser<T> serialiser)
-
-
Method Details
-
notBuffered
public void notBuffered()- See Also:
-
createMappedIdentifier
public static <T> NetObjectCache<T> createMappedIdentifier(ParentNetId parent, Function<T, net.minecraft.util.Identifier> nameGetter, Function<net.minecraft.util.Identifier, T> objectGetter) -
createMappedIdentifier
public static <T> NetObjectCache<T> createMappedIdentifier(ParentNetId parent, Function<T, net.minecraft.util.Identifier> nameGetter, Map<net.minecraft.util.Identifier, T> map) -
getId
-
getObj
-