public class NetworkedItemStackCache extends NetworkedObjectCache<ItemStackKey>
NetworkedObjectCache.ClientView, NetworkedObjectCache.Link, NetworkedObjectCache.ServerViewdefaultObject| Constructor and Description |
|---|
NetworkedItemStackCache() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getCacheName() |
protected ItemStackKey |
getCanonical(ItemStackKey obj)
Takes a specific object and turns it into its most basic form.
|
protected ItemStackKey |
readObject(PacketBufferBC buffer)
Reads the specified object from the buffer.
|
protected void |
writeObject(ItemStackKey obj,
PacketBufferBC buffer)
Writes the specified object out to the buffer.
|
client, serverprotected ItemStackKey getCanonical(ItemStackKey obj)
NetworkedObjectCacheItemStack's this will
should set the stack size to 1, and remove all non-rendered NBT tag components.getCanonical in class NetworkedObjectCache<ItemStackKey>obj - The object to canonicalized.protected void writeObject(ItemStackKey obj, PacketBufferBC buffer)
NetworkedObjectCachewriteObject in class NetworkedObjectCache<ItemStackKey>obj - The object to write. It will have already been passed through NetworkedObjectCache.getCanonical(Object)buffer - The buffer to write into.protected ItemStackKey readObject(PacketBufferBC buffer) throws java.io.IOException
NetworkedObjectCacheNetworkedObjectCache.getCanonical(Object) (so value.equals(getCanonical(value)) should return true.)readObject in class NetworkedObjectCache<ItemStackKey>buffer - The buffer to read fromjava.io.IOExceptionprotected java.lang.String getCacheName()
getCacheName in class NetworkedObjectCache<ItemStackKey>