API compiles
This commit is contained in:
@@ -30,7 +30,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.item.crafting.SpecialRecipe;
|
||||
import net.minecraft.item.crafting.SpecialRecipeSerializer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -50,7 +50,7 @@ public final class DisassembleRecipe extends SpecialRecipe {
|
||||
DisassembleRecipe::new);
|
||||
|
||||
static {
|
||||
SERIALIZER.setRegistryName(new ResourceLocation(AppEng.MOD_ID, "disassemble"));
|
||||
SERIALIZER.setRegistryName(new Identifier(AppEng.MOD_ID, "disassemble"));
|
||||
}
|
||||
|
||||
private static final ItemStack MISMATCHED_STACK = ItemStack.EMPTY;
|
||||
@@ -58,7 +58,7 @@ public final class DisassembleRecipe extends SpecialRecipe {
|
||||
private final Map<IItemDefinition, IItemDefinition> cellMappings;
|
||||
private final Map<IItemDefinition, IItemDefinition> nonCellMappings;
|
||||
|
||||
public DisassembleRecipe(ResourceLocation id) {
|
||||
public DisassembleRecipe(Identifier id) {
|
||||
super(id);
|
||||
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.item.crafting.SpecialRecipe;
|
||||
import net.minecraft.item.crafting.SpecialRecipeSerializer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -41,7 +41,7 @@ public final class FacadeRecipe extends SpecialRecipe {
|
||||
private final IComparableDefinition anchor;
|
||||
private final FacadeItem facade;
|
||||
|
||||
public FacadeRecipe(ResourceLocation id, FacadeItem facade) {
|
||||
public FacadeRecipe(Identifier id, FacadeItem facade) {
|
||||
super(id);
|
||||
this.facade = facade;
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
@@ -90,7 +90,7 @@ public final class FacadeRecipe extends SpecialRecipe {
|
||||
public static IRecipeSerializer<FacadeRecipe> getSerializer(FacadeItem facade) {
|
||||
if (SERIALIZER == null) {
|
||||
SERIALIZER = new SpecialRecipeSerializer<>(id -> new FacadeRecipe(id, facade));
|
||||
SERIALIZER.setRegistryName(new ResourceLocation(AppEng.MOD_ID, "facade"));
|
||||
SERIALIZER.setRegistryName(new Identifier(AppEng.MOD_ID, "facade"));
|
||||
}
|
||||
return SERIALIZER;
|
||||
}
|
||||
|
||||
@@ -10,15 +10,15 @@ import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.item.crafting.IRecipeType;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GrinderRecipe implements IRecipe<IInventory> {
|
||||
|
||||
public static IRecipeType<GrinderRecipe> TYPE;
|
||||
|
||||
private final ResourceLocation id;
|
||||
private final Identifier id;
|
||||
private final String group;
|
||||
private final Ingredient ingredient;
|
||||
private final int ingredientCount;
|
||||
@@ -26,8 +26,8 @@ public class GrinderRecipe implements IRecipe<IInventory> {
|
||||
private final List<GrinderOptionalResult> optionalResults;
|
||||
private final int turns;
|
||||
|
||||
public GrinderRecipe(ResourceLocation 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;
|
||||
@@ -64,7 +64,7 @@ public class GrinderRecipe implements IRecipe<IInventory> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getId() {
|
||||
public Identifier getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.item.crafting.ShapedRecipe;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.JSONUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.registries.ForgeRegistryEntry;
|
||||
|
||||
import appeng.core.AEConfig;
|
||||
@@ -35,7 +35,7 @@ public class GrinderRecipeSerializer extends ForgeRegistryEntry<IRecipeSerialize
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrinderRecipe read(ResourceLocation recipeId, JsonObject json) {
|
||||
public GrinderRecipe read(Identifier recipeId, JsonObject json) {
|
||||
String group = JSONUtils.getString(json, "group", "");
|
||||
JsonObject inputObj = JSONUtils.getJsonObject(json, "input");
|
||||
Ingredient ingredient = Ingredient.deserialize(inputObj);
|
||||
@@ -68,7 +68,7 @@ public class GrinderRecipeSerializer extends ForgeRegistryEntry<IRecipeSerialize
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public GrinderRecipe read(ResourceLocation recipeId, PacketBuffer buffer) {
|
||||
public GrinderRecipe read(Identifier recipeId, PacketByteBuf buffer) {
|
||||
|
||||
String group = buffer.readString();
|
||||
Ingredient ingredient = Ingredient.read(buffer);
|
||||
@@ -87,7 +87,7 @@ public class GrinderRecipeSerializer extends ForgeRegistryEntry<IRecipeSerialize
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(PacketBuffer buffer, GrinderRecipe recipe) {
|
||||
public void write(PacketByteBuf buffer, GrinderRecipe recipe) {
|
||||
buffer.writeString(recipe.getGroup());
|
||||
recipe.getIngredient().write(buffer);
|
||||
buffer.writeVarInt(recipe.getIngredientCount());
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.item.crafting.IRecipeType;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.features.InscriberProcessType;
|
||||
@@ -16,7 +16,7 @@ public class InscriberRecipe implements IRecipe<IInventory> {
|
||||
|
||||
public static IRecipeType<InscriberRecipe> TYPE;
|
||||
|
||||
private final ResourceLocation id;
|
||||
private final Identifier id;
|
||||
private final String group;
|
||||
|
||||
private final Ingredient middleInput;
|
||||
@@ -25,8 +25,8 @@ public class InscriberRecipe implements IRecipe<IInventory> {
|
||||
private final ItemStack output;
|
||||
private final InscriberProcessType processType;
|
||||
|
||||
public InscriberRecipe(ResourceLocation id, String group, Ingredient middleInput, ItemStack output,
|
||||
Ingredient topOptional, Ingredient bottomOptional, InscriberProcessType processType) {
|
||||
public InscriberRecipe(Identifier id, String group, Ingredient middleInput, ItemStack output,
|
||||
Ingredient topOptional, Ingredient bottomOptional, InscriberProcessType processType) {
|
||||
this.id = id;
|
||||
this.group = group;
|
||||
this.middleInput = middleInput;
|
||||
@@ -57,7 +57,7 @@ public class InscriberRecipe implements IRecipe<IInventory> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getId() {
|
||||
public Identifier getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.item.crafting.ShapedRecipe;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.JSONUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.registries.ForgeRegistryEntry;
|
||||
|
||||
import appeng.api.features.InscriberProcessType;
|
||||
@@ -42,7 +42,7 @@ public class InscriberRecipeSerializer extends ForgeRegistryEntry<IRecipeSeriali
|
||||
}
|
||||
|
||||
@Override
|
||||
public InscriberRecipe read(ResourceLocation recipeId, JsonObject json) {
|
||||
public InscriberRecipe read(Identifier recipeId, JsonObject json) {
|
||||
|
||||
InscriberProcessType mode = getMode(json);
|
||||
|
||||
@@ -66,7 +66,7 @@ public class InscriberRecipeSerializer extends ForgeRegistryEntry<IRecipeSeriali
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public InscriberRecipe read(ResourceLocation recipeId, PacketBuffer buffer) {
|
||||
public InscriberRecipe read(Identifier recipeId, PacketByteBuf buffer) {
|
||||
String group = buffer.readString();
|
||||
Ingredient middle = Ingredient.read(buffer);
|
||||
ItemStack result = buffer.readItemStack();
|
||||
@@ -78,7 +78,7 @@ public class InscriberRecipeSerializer extends ForgeRegistryEntry<IRecipeSeriali
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(PacketBuffer buffer, InscriberRecipe recipe) {
|
||||
public void write(PacketByteBuf buffer, InscriberRecipe recipe) {
|
||||
buffer.writeString(recipe.getGroup());
|
||||
recipe.getMiddleInput().write(buffer);
|
||||
buffer.writeItemStack(recipe.getRecipeOutput());
|
||||
|
||||
Reference in New Issue
Block a user