Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Feb 26, 2015
1 parent d403a0b commit 5e4f57f
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 18 deletions.
33 changes: 28 additions & 5 deletions api/buildcraft/api/recipes/IProgrammingRecipe.java
Expand Up @@ -4,11 +4,34 @@
import net.minecraft.item.ItemStack;

public interface IProgrammingRecipe {
public String getId();
String getId();

public List<ItemStack> getOptions(int width, int height);
public int getEnergyCost(ItemStack option);
/**
* Get a list (size at least width*height) of ItemStacks representing options.
* @param width The width of the Programming Table panel.
* @param height The height of the Programming Table panel.
* @return
*/
List<ItemStack> getOptions(int width, int height);

public boolean canCraft(ItemStack input);
public ItemStack craft(ItemStack input, ItemStack option);
/**
* Get the energy cost of a given option ItemStack.
* @param option
* @return
*/
int getEnergyCost(ItemStack option);

/**
* @param input The input stack.
* @return Whether this recipe applies to the given input stack.
*/
boolean canCraft(ItemStack input);

/**
* Craft the input ItemStack with the given option into an output ItemStack.
* @param input
* @param option
* @return The output ItemStack.
*/
ItemStack craft(ItemStack input, ItemStack option);
}
3 changes: 2 additions & 1 deletion common/buildcraft/BuildCraftEnergy.java
Expand Up @@ -230,7 +230,8 @@ public void preInit(FMLPreInitializationEvent evt) {

if (fluidRedPlasma.getBlock() == null) {
blockRedPlasma = new BlockBuildcraftFluid(fluidRedPlasma, Material.water, MapColor.redColor).setFlammable(
false).setParticleColor(0.9F, 0, 0);blockRedPlasma.setBlockName("blockRedPlasma");
false).setParticleColor(0.9F, 0, 0);
blockRedPlasma.setBlockName("blockRedPlasma");
CoreProxy.proxy.registerBlock(blockRedPlasma);
fluidRedPlasma.setBlock(blockRedPlasma);
} else {
Expand Down
2 changes: 0 additions & 2 deletions common/buildcraft/core/statements/TriggerEnergy.java
Expand Up @@ -21,11 +21,9 @@
import cofh.api.energy.IEnergyProvider;
import cofh.api.energy.IEnergyReceiver;

import buildcraft.api.gates.IGate;
import buildcraft.api.statements.IStatementContainer;
import buildcraft.api.statements.IStatementParameter;
import buildcraft.api.statements.ITriggerExternal;
import buildcraft.api.statements.ITriggerInternal;
import buildcraft.core.utils.StringUtils;

public class TriggerEnergy extends BCStatement implements ITriggerExternal {
Expand Down
2 changes: 1 addition & 1 deletion common/buildcraft/silicon/TileProgrammingTable.java
Expand Up @@ -226,7 +226,7 @@ public boolean canCraft() {

@Override
public boolean isItemValidForSlot(int slot, ItemStack stack) {
return (slot == 0 || stack == null);
return slot == 0 || stack == null;
}

@Override
Expand Down
6 changes: 1 addition & 5 deletions common/buildcraft/silicon/boards/BoardProgrammingRecipe.java
Expand Up @@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import buildcraft.BuildCraftSilicon;
import buildcraft.api.boards.RedstoneBoardNBT;
Expand All @@ -12,9 +11,6 @@
import buildcraft.core.utils.NBTUtils;
import buildcraft.silicon.ItemRedstoneBoard;

/**
* Created by asie on 2/24/15.
*/
public class BoardProgrammingRecipe implements IProgrammingRecipe {
private class BoardSorter implements Comparator<ItemStack> {
private BoardProgrammingRecipe recipe;
Expand Down Expand Up @@ -55,7 +51,7 @@ public int getEnergyCost(ItemStack option) {

@Override
public boolean canCraft(ItemStack input) {
return (input.getItem() instanceof ItemRedstoneBoard);
return input.getItem() instanceof ItemRedstoneBoard;
}

@Override
Expand Down
2 changes: 0 additions & 2 deletions common/buildcraft/silicon/gui/GuiProgrammingTable.java
Expand Up @@ -9,15 +9,13 @@
package buildcraft.silicon.gui;

import java.util.Iterator;
import java.util.List;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import buildcraft.BuildCraftCore;
import buildcraft.api.recipes.CraftingResult;
import buildcraft.core.CoreIconProvider;
import buildcraft.core.DefaultProps;
import buildcraft.core.gui.AdvancedSlot;
Expand Down
2 changes: 0 additions & 2 deletions common/buildcraft/transport/PipeTriggerProvider.java
Expand Up @@ -21,11 +21,9 @@
import buildcraft.api.statements.ITriggerExternal;
import buildcraft.api.statements.ITriggerInternal;
import buildcraft.api.statements.ITriggerProvider;
import buildcraft.transport.pipes.PipePowerWood;
import buildcraft.transport.statements.TriggerPipeContents;

public class PipeTriggerProvider implements ITriggerProvider {

@Override
public LinkedList<ITriggerInternal> getInternalTriggers(IStatementContainer container) {
LinkedList<ITriggerInternal> result = new LinkedList<ITriggerInternal>();
Expand Down

0 comments on commit 5e4f57f

Please sign in to comment.