Added spotless back and reformatted

This commit is contained in:
Sebastian Hartte
2020-07-27 20:07:27 +02:00
parent 49296915c9
commit 780f68952b
593 changed files with 4192 additions and 3969 deletions
@@ -18,6 +18,21 @@
package appeng.recipes.game;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nonnull;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.RecipeSerializer;
import net.minecraft.recipe.SpecialCraftingRecipe;
import net.minecraft.recipe.SpecialRecipeSerializer;
import net.minecraft.util.Identifier;
import net.minecraft.world.World;
import appeng.api.definitions.IBlocks;
import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.IItemDefinition;
@@ -28,19 +43,6 @@ import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.core.Api;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.RecipeSerializer;
import net.minecraft.recipe.SpecialCraftingRecipe;
import net.minecraft.recipe.SpecialRecipeSerializer;
import net.minecraft.util.Identifier;
import net.minecraft.world.World;
import javax.annotation.Nonnull;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
public final class DisassembleRecipe extends SpecialCraftingRecipe {
public static final RecipeSerializer<DisassembleRecipe> SERIALIZER = new SpecialRecipeSerializer<>(
@@ -18,11 +18,8 @@
package appeng.recipes.game;
import appeng.api.definitions.IComparableDefinition;
import appeng.api.definitions.IDefinitions;
import appeng.core.Api;
import appeng.core.AppEng;
import appeng.items.parts.FacadeItem;
import javax.annotation.Nonnull;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
@@ -32,7 +29,11 @@ import net.minecraft.recipe.SpecialRecipeSerializer;
import net.minecraft.util.Identifier;
import net.minecraft.world.World;
import javax.annotation.Nonnull;
import appeng.api.definitions.IComparableDefinition;
import appeng.api.definitions.IDefinitions;
import appeng.core.Api;
import appeng.core.AppEng;
import appeng.items.parts.FacadeItem;
public final class FacadeRecipe extends SpecialCraftingRecipe {
public static SpecialRecipeSerializer<FacadeRecipe> SERIALIZER = null;
@@ -6,10 +6,10 @@ import com.google.common.collect.ImmutableList;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.RecipeType;
import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.Recipe;
import net.minecraft.recipe.RecipeSerializer;
import net.minecraft.recipe.RecipeType;
import net.minecraft.util.Identifier;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.world.World;
@@ -26,8 +26,8 @@ public class GrinderRecipe implements Recipe<Inventory> {
private final List<GrinderOptionalResult> optionalResults;
private final int turns;
public GrinderRecipe(Identifier id, String group, Ingredient ingredient, int ingredientCount,
ItemStack result, int turns, List<GrinderOptionalResult> optionalResults) {
public GrinderRecipe(Identifier id, String group, Ingredient ingredient, int ingredientCount, ItemStack result,
int turns, List<GrinderOptionalResult> optionalResults) {
this.id = id;
this.group = group;
this.ingredient = ingredient;
@@ -11,10 +11,10 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.RecipeSerializer;
import net.minecraft.recipe.ShapedRecipe;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.util.Identifier;
import net.minecraft.util.JsonHelper;
@@ -1,11 +1,12 @@
package appeng.recipes.handlers;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import javax.annotation.Nullable;
import java.util.List;
public final class GrinderRecipes {
private GrinderRecipes() {
@@ -5,8 +5,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.recipe.*;
import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.Recipe;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.Identifier;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.world.World;
import appeng.api.features.InscriberProcessType;
@@ -25,7 +25,7 @@ public class InscriberRecipe implements Recipe<Inventory> {
private final InscriberProcessType processType;
public InscriberRecipe(Identifier id, String group, Ingredient middleInput, ItemStack output,
Ingredient topOptional, Ingredient bottomOptional, InscriberProcessType processType) {
Ingredient topOptional, Ingredient bottomOptional, InscriberProcessType processType) {
this.id = id;
this.group = group;
this.middleInput = middleInput;
@@ -5,10 +5,10 @@ import javax.annotation.Nullable;
import com.google.gson.JsonObject;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.RecipeSerializer;
import net.minecraft.recipe.ShapedRecipe;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.util.Identifier;
import net.minecraft.util.JsonHelper;
@@ -1,7 +1,5 @@
package appeng.recipes.handlers;
import appeng.items.tools.quartz.QuartzCuttingKnifeItem;
import appeng.mixins.ShapelessRecipeMixin;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -9,18 +7,18 @@ import net.minecraft.recipe.RecipeSerializer;
import net.minecraft.recipe.ShapelessRecipe;
import net.minecraft.util.collection.DefaultedList;
import appeng.items.tools.quartz.QuartzCuttingKnifeItem;
import appeng.mixins.ShapelessRecipeMixin;
/**
* An extended version of ShapelessRecipe to support damaging the QuartzKnife whenever it is used to craft something.
* An extended version of ShapelessRecipe to support damaging the QuartzKnife
* whenever it is used to craft something.
*/
public class QuartzKnifeRecipe extends ShapelessRecipe {
public QuartzKnifeRecipe(ShapelessRecipe original) {
super(
original.getId(),
((ShapelessRecipeMixin) original).getGroup(),
original.getOutput(),
original.getPreviewInputs()
);
super(original.getId(), ((ShapelessRecipeMixin) original).getGroup(), original.getOutput(),
original.getPreviewInputs());
}
@Override
@@ -36,7 +34,8 @@ public class QuartzKnifeRecipe extends ShapelessRecipe {
ItemStack stack = inventory.getStack(i);
Item item = stack.getItem();
if (item instanceof QuartzCuttingKnifeItem) {
// If it still has durability left, put a more damaged one back, otherwise consume
// If it still has durability left, put a more damaged one back, otherwise
// consume
int newDamage = stack.getDamage() + 1;
if (newDamage < stack.getMaxDamage()) {
stack = stack.copy();
@@ -1,6 +1,7 @@
package appeng.recipes.handlers;
import com.google.gson.JsonObject;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.recipe.ShapelessRecipe;
import net.minecraft.util.Identifier;