Creating a usable API (#1713)
* Initial stab at API structuring * Throwing all the things into the API* Eliminated all internal imports Also added some helpful comments *except for the ritual stuff * Reducing the API Threw back the altar/incense/unnecessary items to main Added in a functional API instance * API cleanup Removing all the unnecessities Smushed and vaporized some redundant recipe stuffs * Made API dummy instances Refactor packaging
This commit is contained in:
parent
952b6aeeb0
commit
574d6a8e74
144 changed files with 558 additions and 990 deletions
|
@ -1,87 +0,0 @@
|
|||
package wayoftime.bloodmagic.api.recipe;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public abstract class RecipeAlchemyArray extends BloodMagicRecipe
|
||||
{
|
||||
private final ResourceLocation id;
|
||||
private final ResourceLocation texture;
|
||||
@Nonnull
|
||||
private final Ingredient baseInput;
|
||||
@Nonnull
|
||||
private final Ingredient addedInput;
|
||||
@Nonnull
|
||||
private final ItemStack output;
|
||||
|
||||
protected RecipeAlchemyArray(ResourceLocation id, ResourceLocation texture, @Nonnull Ingredient baseIngredient, @Nonnull Ingredient addedIngredient, @Nonnull ItemStack result)
|
||||
{
|
||||
super(id);
|
||||
this.id = id;
|
||||
this.texture = texture;
|
||||
this.baseInput = baseIngredient;
|
||||
this.addedInput = addedIngredient;
|
||||
this.output = result;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public final ResourceLocation getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public final ResourceLocation getTexture()
|
||||
{
|
||||
return texture;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public final Ingredient getBaseInput()
|
||||
{
|
||||
return baseInput;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public final Ingredient getAddedInput()
|
||||
{
|
||||
return addedInput;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final NonNullList<Ingredient> getIngredients()
|
||||
{
|
||||
NonNullList<Ingredient> list = NonNullList.create();
|
||||
list.add(getBaseInput());
|
||||
list.add(getAddedInput());
|
||||
return list;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public final ItemStack getOutput()
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(PacketBuffer buffer)
|
||||
{
|
||||
if (texture != null)
|
||||
{
|
||||
buffer.writeBoolean(true);
|
||||
buffer.writeResourceLocation(texture);
|
||||
} else
|
||||
{
|
||||
buffer.writeBoolean(false);
|
||||
}
|
||||
|
||||
baseInput.write(buffer);
|
||||
addedInput.write(buffer);
|
||||
buffer.writeItemStack(output);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue