Skip to content

Commit

Permalink
Fix #29
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusKube committed Sep 20, 2018
1 parent 90b4312 commit 6d0a1d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/fr/minuskube/inv/content/InventoryContents.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public SlotIterator newIterator(SlotIterator.Type type, SlotPos startPos) {

@Override
public Optional<SlotPos> firstEmpty() {
for(int column = 0; column < contents[0].length; column++) {
for (int row = 0; row < contents.length; row++) {
for (int row = 0; row < contents.length; row++) {
for(int column = 0; column < contents[0].length; column++) {
if(!this.get(row, column).isPresent())
return Optional.of(new SlotPos(row, column));
}
Expand Down Expand Up @@ -147,8 +147,8 @@ public InventoryContents set(SlotPos slotPos, ClickableItem item) {

@Override
public InventoryContents add(ClickableItem item) {
for(int column = 0; column < contents[0].length; column++) {
for(int row = 0; row < contents.length; row++) {
for(int row = 0; row < contents.length; row++) {
for(int column = 0; column < contents[0].length; column++) {
if(contents[row][column] == null) {
set(row, column, item);
return this;
Expand Down

0 comments on commit 6d0a1d8

Please sign in to comment.