mmb.engine.inv.NoSuchInventory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multimachinebuilder Show documentation
Show all versions of multimachinebuilder Show documentation
Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world.
THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<
The newest version!
/**
*
*/
package mmb.engine.inv;
import java.util.Collections;
import java.util.Iterator;
import mmb.NN;
import mmb.engine.item.ItemEntry;
import mmb.engine.recipe.RecipeOutput;
/**
* A non-existent inventory
* @author oskar
*/
public class NoSuchInventory implements Inventory{
/** The only instance of this inventory*/
@NN public static final NoSuchInventory INSTANCE = new NoSuchInventory();
@NN private static final NoSuchItemRecord nsir = new NoSuchItemRecord(INSTANCE);
private NoSuchInventory() {}
@SuppressWarnings("null")
@Override
public Iterator iterator() {
return Collections.emptyIterator();
}
@Override
public boolean exists() {
return false;
}
@Override
public boolean canExtract() {
return false;
}
@Override
public boolean canInsert() {
return false;
}
@Override
public ItemRecord get(ItemEntry entry) {
return nsir;
}
@Override
public int insert(ItemEntry ent, int amount) {
return 0;
}
@Override
public int extract(ItemEntry ent, int amount) {
return 0;
}
@Override
public double capacity() {
return 0;
}
@Override
public double volume() {
return 0;
}
@Override
public ItemRecord nget(ItemEntry entry) {
return nsir;
}
@Override
public boolean isEmpty() {
return true;
}
@Override
public int size() {
return 0;
}
@Override
public int bulkInsert(RecipeOutput ent, int amount) {
return 0;
}
@Override
public boolean test(ItemEntry e) {
return false;
}
@Override
public int insertibleRemainBulk(int amount, RecipeOutput ent) {
return 0;
}
}