Changed formatting to have bracing on a new line

This commit is contained in:
WayofTime 2015-12-30 15:34:40 -05:00
parent e5eddd6c45
commit e48eedb874
189 changed files with 6092 additions and 4041 deletions

View file

@ -13,7 +13,8 @@ import net.minecraft.util.ResourceLocation;
import javax.annotation.Nonnull;
public class AlchemyArrayCraftingCategory implements IRecipeCategory {
public class AlchemyArrayCraftingCategory implements IRecipeCategory
{
private static final int INPUT_SLOT = 0;
private static final int CATALYST_SLOT = 1;
@ -26,41 +27,48 @@ public class AlchemyArrayCraftingCategory implements IRecipeCategory {
@Nonnull
@Override
public String getUid() {
public String getUid()
{
return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY;
}
@Nonnull
@Override
public String getTitle() {
public String getTitle()
{
return localizedName;
}
@Nonnull
@Override
public IDrawable getBackground() {
public IDrawable getBackground()
{
return background;
}
@Override
public void drawExtras(Minecraft minecraft) {
public void drawExtras(Minecraft minecraft)
{
}
@Override
public void drawAnimations(Minecraft minecraft) {
public void drawAnimations(Minecraft minecraft)
{
}
@Override
@SuppressWarnings("unchecked")
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper)
{
recipeLayout.getItemStacks().init(INPUT_SLOT, true, 0, 5);
recipeLayout.getItemStacks().init(CATALYST_SLOT, true, 50, 5);
recipeLayout.getItemStacks().init(OUTPUT_SLOT, false, 73, 5);
if (recipeWrapper instanceof AlchemyArrayCraftingRecipeJEI) {
if (recipeWrapper instanceof AlchemyArrayCraftingRecipeJEI)
{
AlchemyArrayCraftingRecipeJEI alchemyArrayWrapper = (AlchemyArrayCraftingRecipeJEI) recipeWrapper;
recipeLayout.getItemStacks().set(INPUT_SLOT, (ItemStack) alchemyArrayWrapper.getInputs().get(0));
recipeLayout.getItemStacks().set(CATALYST_SLOT, (ItemStack) alchemyArrayWrapper.getInputs().get(1));
@ -68,4 +76,3 @@ public class AlchemyArrayCraftingCategory implements IRecipeCategory {
}
}
}

View file

@ -6,28 +6,33 @@ import mezz.jei.api.recipe.IRecipeWrapper;
import javax.annotation.Nonnull;
public class AlchemyArrayCraftingRecipeHandler implements IRecipeHandler<AlchemyArrayCraftingRecipeJEI> {
public class AlchemyArrayCraftingRecipeHandler implements IRecipeHandler<AlchemyArrayCraftingRecipeJEI>
{
@Nonnull
@Override
public Class<AlchemyArrayCraftingRecipeJEI> getRecipeClass() {
public Class<AlchemyArrayCraftingRecipeJEI> getRecipeClass()
{
return AlchemyArrayCraftingRecipeJEI.class;
}
@Nonnull
@Override
public String getRecipeCategoryUid() {
public String getRecipeCategoryUid()
{
return Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY;
}
@Nonnull
@Override
public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyArrayCraftingRecipeJEI recipe) {
public IRecipeWrapper getRecipeWrapper(@Nonnull AlchemyArrayCraftingRecipeJEI recipe)
{
return recipe;
}
@Override
public boolean isRecipeValid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe) {
public boolean isRecipeValid(@Nonnull AlchemyArrayCraftingRecipeJEI recipe)
{
return recipe.getInputs().size() > 0 && recipe.getOutputs().size() > 0;
}
}

View file

@ -10,7 +10,8 @@ import javax.annotation.Nullable;
import java.util.Collections;
import java.util.List;
public class AlchemyArrayCraftingRecipeJEI extends BloodMagicRecipeWrapper {
public class AlchemyArrayCraftingRecipeJEI extends BloodMagicRecipeWrapper
{
@Nonnull
private final List<ItemStack> inputs;
@ -19,28 +20,33 @@ public class AlchemyArrayCraftingRecipeJEI extends BloodMagicRecipeWrapper {
private final ItemStack output;
@SuppressWarnings("unchecked")
public AlchemyArrayCraftingRecipeJEI(@Nonnull ItemStack input, @Nullable ItemStack catalyst, @Nonnull ItemStack output) {
this.inputs = Arrays.asList(new ItemStack[] {input, catalyst});
public AlchemyArrayCraftingRecipeJEI(@Nonnull ItemStack input, @Nullable ItemStack catalyst, @Nonnull ItemStack output)
{
this.inputs = Arrays.asList(new ItemStack[] { input, catalyst });
this.output = output;
}
@Override
public List getInputs() {
public List getInputs()
{
return inputs;
}
@Override
public List getOutputs() {
public List getOutputs()
{
return Collections.singletonList(output);
}
@Override
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight)
{
}
@Override
public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight) {
public void drawAnimations(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight)
{
}
}

View file

@ -12,21 +12,26 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class AlchemyArrayCraftingRecipeMaker {
public class AlchemyArrayCraftingRecipeMaker
{
@Nonnull
public static List<AlchemyArrayCraftingRecipeJEI> getRecipes() {
public static List<AlchemyArrayCraftingRecipeJEI> getRecipes()
{
Map<ItemStackWrapper, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> alchemyArrayRecipeMap = AlchemyArrayRecipeRegistry.getRecipes();
ArrayList<AlchemyArrayCraftingRecipeJEI> recipes = new ArrayList<AlchemyArrayCraftingRecipeJEI>();
for (Map.Entry<ItemStackWrapper, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet()) {
for (Map.Entry<ItemStackWrapper, AlchemyArrayRecipeRegistry.AlchemyArrayRecipe> itemStackAlchemyArrayRecipeEntry : alchemyArrayRecipeMap.entrySet())
{
ItemStack input = itemStackAlchemyArrayRecipeEntry.getValue().getInputStack();
BiMap<ItemStackWrapper, AlchemyArrayEffect> catalystMap = itemStackAlchemyArrayRecipeEntry.getValue().catalystMap;
for(Map.Entry<ItemStackWrapper, AlchemyArrayEffect> entry : catalystMap.entrySet()) {
for (Map.Entry<ItemStackWrapper, AlchemyArrayEffect> entry : catalystMap.entrySet())
{
ItemStack catalyst = entry.getKey().toStack();
if (AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(input, catalyst) instanceof AlchemyArrayEffectCrafting) {
if (AlchemyArrayRecipeRegistry.getAlchemyArrayEffect(input, catalyst) instanceof AlchemyArrayEffectCrafting)
{
ItemStack output = ((AlchemyArrayEffectCrafting) itemStackAlchemyArrayRecipeEntry.getValue().getAlchemyArrayEffectForCatalyst(catalyst)).getOutputStack();
AlchemyArrayCraftingRecipeJEI recipe = new AlchemyArrayCraftingRecipeJEI(input, catalyst, output);