Improved replacement system
This commit is contained in:
@@ -180,6 +180,7 @@ public class ItemModule extends BlockModule{
|
||||
return total > 0;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Item first(){
|
||||
for(int i = 0; i < items.length; i++){
|
||||
if(items[i] > 0){
|
||||
@@ -189,6 +190,7 @@ public class ItemModule extends BlockModule{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Item take(){
|
||||
for(int i = 0; i < items.length; i++){
|
||||
int index = (i + takeRotation);
|
||||
@@ -204,6 +206,7 @@ public class ItemModule extends BlockModule{
|
||||
}
|
||||
|
||||
/** Begins a speculative take operation. This returns the item that would be returned by #take(), but does not change state. */
|
||||
@Nullable
|
||||
public Item beginTake(){
|
||||
for(int i = 0; i < items.length; i++){
|
||||
int index = (i + takeRotation);
|
||||
|
||||
Reference in New Issue
Block a user