Documentation fixes

This commit is contained in:
Raoul Van den Berge
2016-06-05 15:42:39 +02:00
parent f7e7fd2c5e
commit f8d1daac23
2 changed files with 10 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ package refinedstorage.api.storage;
import java.util.List;
/**
* Should be implement as a capability on tile entities.
* Should be implemented as a capability on tile entities.
*/
public interface IStorageProvider {
/**

View File

@@ -29,6 +29,10 @@ public abstract class NBTStorage implements IStorage {
private List<ItemStack> stacks = new ArrayList<ItemStack>();
/**
* @param tag The NBT tag we are reading from and writing the amount stored to, has to be initialized with {@link NBTStorage#createNBT()}
* @param capacity The capacity of this storage
*/
public NBTStorage(NBTTagCompound tag, int capacity) {
this.tag = tag;
this.capacity = capacity;
@@ -56,6 +60,11 @@ public abstract class NBTStorage implements IStorage {
}
}
/**
* Writes the items to the NBT tag, check for {@link NBTStorage#isDirty()} before doing this to be efficient.
*
* @param tag The tag to write to
*/
public void writeToNBT(NBTTagCompound tag) {
NBTTagList list = new NBTTagList();