Use switch statement
This commit is contained in:
@@ -355,12 +355,13 @@ public class TileGrid extends TileMachine implements IGrid {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IInventory getDroppedInventory() {
|
public IInventory getDroppedInventory() {
|
||||||
if (getType() == EnumGridType.CRAFTING) {
|
switch (getType()) {
|
||||||
|
case CRAFTING:
|
||||||
return craftingInventory;
|
return craftingInventory;
|
||||||
} else if (getType() == EnumGridType.PATTERN) {
|
case PATTERN:
|
||||||
return patternsInventory;
|
return patternsInventory;
|
||||||
}
|
default:
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user