Auto-format spaces to tabs (#2)

This commit is contained in:
mezz committed 2016-10-27 02:49:49 -07:00
1 parent 25be7fd254
commit 5bb4b5d9a5
756 files changed
+49198 -48489

No files matched your search

@@ -12,62 +12,62 @@ import java.util.ArrayList;
import java.util.List;
public class CeramicTileRecipe implements IRecipe {
ItemStack cached;
ItemStack cached;
@Override
public boolean matches(final InventoryCrafting inv, final World world) {
this.cached = this.getCraftingResult(inv);
return this.cached != null;
}
@Override
public boolean matches(final InventoryCrafting inv, final World world) {
this.cached = this.getCraftingResult(inv);
return this.cached != null;
}
@Override
public ItemStack getCraftingResult(final InventoryCrafting inv) {
final Item ceramicBlock = Item.getItemFromBlock(Botany.ceramic);
final Item ceramicTile = Item.getItemFromBlock(Botany.ceramicTile);
final Item ceramicBrick = Item.getItemFromBlock(Botany.ceramicBrick);
final Item mortar = Botany.misc;
final List<ItemStack> stacks = new ArrayList<>();
int ix = -1;
int iy = -1;
for (int i = 0; i < inv.getSizeInventory(); ++i) {
final ItemStack stack = inv.getStackInSlot(i);
if (stack != null) {
final int x = i / 3;
final int y = i % 3;
if (ix == -1) {
ix = x;
iy = y;
}
if (x - ix >= 2 || y - iy >= 2 || y < iy || x < ix) {
return null;
}
if (stack.getItem() != ceramicBlock && stack.getItem() != ceramicTile && stack.getItem() != ceramicBrick && stack.getItem() != mortar) {
return null;
}
stacks.add(stack);
}
}
for (final BlockCeramicBrick.TileType type : BlockCeramicBrick.TileType.values()) {
final ItemStack stack2 = type.getRecipe(stacks);
if (stack2 != null) {
return stack2;
}
}
return null;
}
@Override
public ItemStack getCraftingResult(final InventoryCrafting inv) {
final Item ceramicBlock = Item.getItemFromBlock(Botany.ceramic);
final Item ceramicTile = Item.getItemFromBlock(Botany.ceramicTile);
final Item ceramicBrick = Item.getItemFromBlock(Botany.ceramicBrick);
final Item mortar = Botany.misc;
final List<ItemStack> stacks = new ArrayList<>();
int ix = -1;
int iy = -1;
for (int i = 0; i < inv.getSizeInventory(); ++i) {
final ItemStack stack = inv.getStackInSlot(i);
if (stack != null) {
final int x = i / 3;
final int y = i % 3;
if (ix == -1) {
ix = x;
iy = y;
}
if (x - ix >= 2 || y - iy >= 2 || y < iy || x < ix) {
return null;
}
if (stack.getItem() != ceramicBlock && stack.getItem() != ceramicTile && stack.getItem() != ceramicBrick && stack.getItem() != mortar) {
return null;
}
stacks.add(stack);
}
}
for (final BlockCeramicBrick.TileType type : BlockCeramicBrick.TileType.values()) {
final ItemStack stack2 = type.getRecipe(stacks);
if (stack2 != null) {
return stack2;
}
}
return null;
}
@Override
public int getRecipeSize() {
return 2;
}
@Override
public int getRecipeSize() {
return 2;
}
@Override
public ItemStack getRecipeOutput() {
return this.cached;
}
@Override
public ItemStack getRecipeOutput() {
return this.cached;
}
@Override
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
@Override
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
}