mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-21 20:52:22 +00:00
Feature/refactoring (#211)
* Some code improve readability for botany.ceramic package * Code improvement for botany.core package * Code improvement for botany.craftgui package * Fixed TextJustification from all code files * Code improvement for botany.farm package * Code improvement for botany.flower * Code improvement for root botany package Code improvement for botany.network package Code improvement for botany.proxypackage * Code improvement for botany.gargdening package Added missed localization for Soil Meter * Code improvement for botany.genetic package * Code improvement for botany.items package * Removed "// TODO fix deprecated" comment * Reformatted code by Forestry format settings * Reformat code with new format settings
This commit is contained in:
1 parent
0aa9853da2
commit
9e1ec59b86
114 files changed
+1901
-1624
No files matched your search
@@ -19,25 +19,25 @@ public class CeramicTileRecipe implements IRecipe {
|
||||
private ItemStack cached = ItemStack.EMPTY;
|
||||
|
||||
@Override
|
||||
public boolean matches(final InventoryCrafting inv, final World world) {
|
||||
this.cached = this.getCraftingResult(inv);
|
||||
return !this.cached.isEmpty();
|
||||
public boolean matches(InventoryCrafting inv, World world) {
|
||||
cached = getCraftingResult(inv);
|
||||
return !cached.isEmpty();
|
||||
}
|
||||
|
||||
@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<>();
|
||||
public ItemStack getCraftingResult(InventoryCrafting inv) {
|
||||
Item ceramicBlock = Item.getItemFromBlock(Botany.ceramic);
|
||||
Item ceramicTile = Item.getItemFromBlock(Botany.ceramicTile);
|
||||
Item ceramicBrick = Item.getItemFromBlock(Botany.ceramicBrick);
|
||||
Item mortar = Botany.misc;
|
||||
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);
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if (!stack.isEmpty()) {
|
||||
final int x = i / 3;
|
||||
final int y = i % 3;
|
||||
int x = i / 3;
|
||||
int y = i % 3;
|
||||
if (ix == -1) {
|
||||
ix = x;
|
||||
iy = y;
|
||||
@@ -67,7 +67,7 @@ public class CeramicTileRecipe implements IRecipe {
|
||||
|
||||
@Override
|
||||
public ItemStack getRecipeOutput() {
|
||||
return this.cached;
|
||||
return cached;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user