Class AnvilStorage
java.lang.Object
com.hammy275.immersivemc.common.immersive.storage.dual.impl.ItemStorage
com.hammy275.immersivemc.common.immersive.storage.dual.impl.AnvilStorage
- All Implemented Interfaces:
NetworkStorage
,WorldStorage
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hammy275.immersivemc.common.immersive.storage.dual.impl.ItemStorage
ItemStorage.PlayerItemCounts
-
Field Summary
Fields inherited from class com.hammy275.immersivemc.common.immersive.storage.dual.impl.ItemStorage
itemCounts, items, maxInputIndex
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
decode
(net.minecraft.network.FriendlyByteBuf buffer) Decode the buffer into this object.void
encode
(net.minecraft.network.FriendlyByteBuf buffer) Encode this storage into a buffer.void
load
(net.minecraft.nbt.CompoundTag nbt, int lastVanillaDataVersion) Load from the NBT tag into this object.net.minecraft.nbt.CompoundTag
save
(net.minecraft.nbt.CompoundTag nbtIn) Save this object into the NBT tag.Methods inherited from class com.hammy275.immersivemc.common.immersive.storage.dual.impl.ItemStorage
addSlotsToEnd, copyFromOld, getItem, getItemsRaw, getNumItems, isDirtyForClientSync, moveSlot, placeItem, returnItems, setDirty, setItem, setNoLongerDirtyForClientSync, shrinkCountsOnly, shrinkSlot
-
Field Details
-
xpLevels
public int xpLevels
-
-
Constructor Details
-
AnvilStorage
public AnvilStorage()
-
-
Method Details
-
getHandler
- Returns:
- Handler for this type of WorldStorage.
-
load
public void load(net.minecraft.nbt.CompoundTag nbt, int lastVanillaDataVersion) Description copied from interface:WorldStorage
Load from the NBT tag into this object.- Specified by:
load
in interfaceWorldStorage
- Overrides:
load
in classItemStorage
- Parameters:
nbt
- NBT tag to load from.lastVanillaDataVersion
- The last vanilla data version this storage was loaded in.
-
save
public net.minecraft.nbt.CompoundTag save(net.minecraft.nbt.CompoundTag nbtIn) Description copied from interface:WorldStorage
Save this object into the NBT tag.- Specified by:
save
in interfaceWorldStorage
- Overrides:
save
in classItemStorage
- Parameters:
nbtIn
- NBT tag to save to.- Returns:
- The same NBT tag as provided to this method.
-
encode
public void encode(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:NetworkStorage
Encode this storage into a buffer.- Specified by:
encode
in interfaceNetworkStorage
- Overrides:
encode
in classItemStorage
- Parameters:
buffer
- Buffer to encode storage into.
-
decode
public void decode(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:NetworkStorage
Decode the buffer into this object.- Specified by:
decode
in interfaceNetworkStorage
- Overrides:
decode
in classItemStorage
- Parameters:
buffer
- Buffer to decode from.
-