Run code formatter
🦀 Way is gone 🦀
This commit is contained in:
parent
7c1565a68c
commit
53b6030ba9
77 changed files with 1289 additions and 2232 deletions
|
@ -23,12 +23,10 @@ import net.minecraftforge.fml.common.registry.EntityEntry;
|
|||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
|
||||
@BloodMagicPlugin
|
||||
public class BloodMagicCorePlugin implements IBloodMagicPlugin
|
||||
{
|
||||
public class BloodMagicCorePlugin implements IBloodMagicPlugin {
|
||||
|
||||
@Override
|
||||
public void register(IBloodMagicAPI apiInterface)
|
||||
{
|
||||
public void register(IBloodMagicAPI apiInterface) {
|
||||
BloodMagicAPI api = (BloodMagicAPI) apiInterface;
|
||||
// Add forced blacklistings
|
||||
api.getBlacklist().addTeleposer(RegistrarBloodMagicBlocks.INPUT_ROUTING_NODE);
|
||||
|
@ -84,8 +82,7 @@ public class BloodMagicCorePlugin implements IBloodMagicPlugin
|
|||
}
|
||||
|
||||
@Override
|
||||
public void registerRecipes(IBloodMagicRecipeRegistrar recipeRegistrar)
|
||||
{
|
||||
public void registerRecipes(IBloodMagicRecipeRegistrar recipeRegistrar) {
|
||||
RegistrarBloodMagicRecipes.registerAltarRecipes((BloodMagicRecipeRegistrar) recipeRegistrar);
|
||||
RegistrarBloodMagicRecipes.registerAlchemyTableRecipes((BloodMagicRecipeRegistrar) recipeRegistrar);
|
||||
RegistrarBloodMagicRecipes.registerTartaricForgeRecipes((BloodMagicRecipeRegistrar) recipeRegistrar);
|
||||
|
@ -93,10 +90,8 @@ public class BloodMagicCorePlugin implements IBloodMagicPlugin
|
|||
RegistrarBloodMagicRecipes.registerSacrificeCraftRecipes((BloodMagicRecipeRegistrar) recipeRegistrar);
|
||||
}
|
||||
|
||||
private static void handleConfigValues(BloodMagicAPI api)
|
||||
{
|
||||
for (String value : ConfigHandler.values.sacrificialValues)
|
||||
{
|
||||
private static void handleConfigValues(BloodMagicAPI api) {
|
||||
for (String value : ConfigHandler.values.sacrificialValues) {
|
||||
String[] split = value.split(";");
|
||||
if (split.length != 2) // Not valid format
|
||||
continue;
|
||||
|
@ -104,18 +99,15 @@ public class BloodMagicCorePlugin implements IBloodMagicPlugin
|
|||
api.getValueManager().setSacrificialValue(new ResourceLocation(split[0]), Integer.parseInt(split[1]));
|
||||
}
|
||||
|
||||
for (String value : ConfigHandler.blacklist.teleposer)
|
||||
{
|
||||
for (String value : ConfigHandler.blacklist.teleposer) {
|
||||
EntityEntry entityEntry = ForgeRegistries.ENTITIES.getValue(new ResourceLocation(value));
|
||||
if (entityEntry == null)
|
||||
{ // It's not an entity (or at least not a valid one), so let's try a block.
|
||||
if (entityEntry == null) { // It's not an entity (or at least not a valid one), so let's try a block.
|
||||
String[] blockData = value.split("\\[");
|
||||
Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(blockData[0]));
|
||||
if (block == Blocks.AIR || block == null) // Not a valid block either
|
||||
continue;
|
||||
|
||||
if (blockData.length > 1)
|
||||
{ // We have properties listed, so let's build a state.
|
||||
if (blockData.length > 1) { // We have properties listed, so let's build a state.
|
||||
api.getBlacklist().addTeleposer(StateUtil.parseState(value));
|
||||
continue;
|
||||
}
|
||||
|
@ -127,15 +119,13 @@ public class BloodMagicCorePlugin implements IBloodMagicPlugin
|
|||
api.getBlacklist().addTeleposer(entityEntry.getRegistryName());
|
||||
}
|
||||
|
||||
for (String value : ConfigHandler.blacklist.transposer)
|
||||
{
|
||||
for (String value : ConfigHandler.blacklist.transposer) {
|
||||
String[] blockData = value.split("\\[");
|
||||
Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(blockData[0]));
|
||||
if (block == Blocks.AIR || block == null) // Not a valid block
|
||||
continue;
|
||||
|
||||
if (blockData.length > 1)
|
||||
{ // We have properties listed, so let's build a state.
|
||||
if (blockData.length > 1) { // We have properties listed, so let's build a state.
|
||||
api.getBlacklist().addTeleposer(StateUtil.parseState(value));
|
||||
continue;
|
||||
}
|
||||
|
@ -143,8 +133,7 @@ public class BloodMagicCorePlugin implements IBloodMagicPlugin
|
|||
api.getBlacklist().addTeleposer(block);
|
||||
}
|
||||
|
||||
for (String value : ConfigHandler.blacklist.wellOfSuffering)
|
||||
{
|
||||
for (String value : ConfigHandler.blacklist.wellOfSuffering) {
|
||||
EntityEntry entityEntry = ForgeRegistries.ENTITIES.getValue(new ResourceLocation(value));
|
||||
if (entityEntry == null) // Not a valid entity
|
||||
continue;
|
||||
|
|
|
@ -27,8 +27,7 @@ import com.google.common.collect.ImmutableSet;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
||||
{
|
||||
public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar {
|
||||
|
||||
private final Set<RecipeBloodAltar> altarRecipes;
|
||||
private final Set<RecipeAlchemyTable> alchemyRecipes;
|
||||
|
@ -36,8 +35,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
private final Set<RecipeAlchemyArray> alchemyArrayRecipes;
|
||||
private final Set<RecipeSacrificeCraft> sacrificeCraftRecipes;
|
||||
|
||||
public BloodMagicRecipeRegistrar()
|
||||
{
|
||||
public BloodMagicRecipeRegistrar() {
|
||||
this.altarRecipes = Sets.newHashSet();
|
||||
this.alchemyRecipes = Sets.newHashSet();
|
||||
this.tartaricForgeRecipes = Sets.newHashSet();
|
||||
|
@ -46,8 +44,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addBloodAltar(@Nonnull Ingredient input, @Nonnull ItemStack output, @Nonnegative int minimumTier, @Nonnegative int syphon, @Nonnegative int consumeRate, @Nonnegative int drainRate)
|
||||
{
|
||||
public void addBloodAltar(@Nonnull Ingredient input, @Nonnull ItemStack output, @Nonnegative int minimumTier, @Nonnegative int syphon, @Nonnegative int consumeRate, @Nonnegative int drainRate) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
Preconditions.checkArgument(minimumTier >= 0, "minimumTier cannot be negative.");
|
||||
|
@ -59,16 +56,14 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean removeBloodAltar(@Nonnull ItemStack input)
|
||||
{
|
||||
public boolean removeBloodAltar(@Nonnull ItemStack input) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
|
||||
return altarRecipes.remove(getBloodAltar(input));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAlchemyTable(@Nonnull ItemStack output, @Nonnegative int syphon, @Nonnegative int ticks, @Nonnegative int minimumTier, @Nonnull Ingredient... input)
|
||||
{
|
||||
public void addAlchemyTable(@Nonnull ItemStack output, @Nonnegative int syphon, @Nonnegative int ticks, @Nonnegative int minimumTier, @Nonnull Ingredient... input) {
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
Preconditions.checkArgument(syphon >= 0, "syphon cannot be negative.");
|
||||
Preconditions.checkArgument(ticks >= 0, "ticks cannot be negative.");
|
||||
|
@ -79,8 +74,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
alchemyRecipes.add(new RecipeAlchemyTable(inputs, output, syphon, ticks, minimumTier));
|
||||
}
|
||||
|
||||
public void addAlchemyTable(@Nonnull ItemStack output, @Nonnegative int syphon, @Nonnegative int ticks, @Nonnegative int minimumTier, @Nonnull Object... input)
|
||||
{
|
||||
public void addAlchemyTable(@Nonnull ItemStack output, @Nonnegative int syphon, @Nonnegative int ticks, @Nonnegative int minimumTier, @Nonnull Object... input) {
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
Preconditions.checkArgument(syphon >= 0, "syphon cannot be negative.");
|
||||
Preconditions.checkArgument(ticks >= 0, "ticks cannot be negative.");
|
||||
|
@ -88,10 +82,8 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
|
||||
List<Ingredient> ingredients = Lists.newArrayList();
|
||||
for (Object object : input)
|
||||
{
|
||||
if (object instanceof ItemStack && ((ItemStack) object).getItem() instanceof IBloodOrb)
|
||||
{
|
||||
for (Object object : input) {
|
||||
if (object instanceof ItemStack && ((ItemStack) object).getItem() instanceof IBloodOrb) {
|
||||
ingredients.add(new IngredientBloodOrb(((IBloodOrb) ((ItemStack) object).getItem()).getOrb((ItemStack) object)));
|
||||
continue;
|
||||
}
|
||||
|
@ -102,14 +94,12 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
addAlchemyTable(output, syphon, ticks, minimumTier, ingredients.toArray(new Ingredient[0]));
|
||||
}
|
||||
|
||||
public void addAlchemyTable(RecipeAlchemyTable recipe)
|
||||
{
|
||||
public void addAlchemyTable(RecipeAlchemyTable recipe) {
|
||||
alchemyRecipes.add(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeAlchemyTable(@Nonnull ItemStack... input)
|
||||
{
|
||||
public boolean removeAlchemyTable(@Nonnull ItemStack... input) {
|
||||
Preconditions.checkNotNull(input, "inputs cannot be null.");
|
||||
|
||||
for (ItemStack stack : input)
|
||||
|
@ -119,8 +109,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addTartaricForge(@Nonnull ItemStack output, @Nonnegative double minimumSouls, @Nonnegative double soulDrain, @Nonnull Ingredient... input)
|
||||
{
|
||||
public void addTartaricForge(@Nonnull ItemStack output, @Nonnegative double minimumSouls, @Nonnegative double soulDrain, @Nonnull Ingredient... input) {
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
Preconditions.checkArgument(minimumSouls >= 0, "minimumSouls cannot be negative.");
|
||||
Preconditions.checkArgument(soulDrain >= 0, "soulDrain cannot be negative.");
|
||||
|
@ -131,8 +120,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean removeTartaricForge(@Nonnull ItemStack... input)
|
||||
{
|
||||
public boolean removeTartaricForge(@Nonnull ItemStack... input) {
|
||||
Preconditions.checkNotNull(input, "inputs cannot be null.");
|
||||
|
||||
for (ItemStack stack : input)
|
||||
|
@ -141,18 +129,15 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
return tartaricForgeRecipes.remove(getTartaricForge(Lists.newArrayList(input)));
|
||||
}
|
||||
|
||||
public void addTartaricForge(@Nonnull ItemStack output, @Nonnegative double minimumSouls, @Nonnegative double soulDrain, @Nonnull Object... input)
|
||||
{
|
||||
public void addTartaricForge(@Nonnull ItemStack output, @Nonnegative double minimumSouls, @Nonnegative double soulDrain, @Nonnull Object... input) {
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
Preconditions.checkArgument(minimumSouls >= 0, "minimumSouls cannot be negative.");
|
||||
Preconditions.checkArgument(soulDrain >= 0, "soulDrain cannot be negative.");
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
|
||||
List<Ingredient> ingredients = Lists.newArrayList();
|
||||
for (Object object : input)
|
||||
{
|
||||
if (object instanceof ItemStack && ((ItemStack) object).getItem() instanceof IBloodOrb)
|
||||
{
|
||||
for (Object object : input) {
|
||||
if (object instanceof ItemStack && ((ItemStack) object).getItem() instanceof IBloodOrb) {
|
||||
ingredients.add(new IngredientBloodOrb(((IBloodOrb) ((ItemStack) object).getItem()).getOrb((ItemStack) object)));
|
||||
continue;
|
||||
}
|
||||
|
@ -164,8 +149,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addAlchemyArray(@Nonnull Ingredient input, @Nonnull Ingredient catalyst, @Nonnull ItemStack output, @Nullable ResourceLocation circleTexture)
|
||||
{
|
||||
public void addAlchemyArray(@Nonnull Ingredient input, @Nonnull Ingredient catalyst, @Nonnull ItemStack output, @Nullable ResourceLocation circleTexture) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
Preconditions.checkNotNull(catalyst, "catalyst cannot be null.");
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
|
@ -174,16 +158,14 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean removeAlchemyArray(@Nonnull ItemStack input, @Nonnull ItemStack catalyst)
|
||||
{
|
||||
public boolean removeAlchemyArray(@Nonnull ItemStack input, @Nonnull ItemStack catalyst) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
Preconditions.checkNotNull(catalyst, "catalyst cannot be null.");
|
||||
|
||||
return alchemyArrayRecipes.remove(getAlchemyArray(input, catalyst));
|
||||
}
|
||||
|
||||
public void addAlchemyArray(@Nonnull ItemStack input, @Nonnull ItemStack catalyst, @Nonnull ItemStack output, @Nullable ResourceLocation circleTexture)
|
||||
{
|
||||
public void addAlchemyArray(@Nonnull ItemStack input, @Nonnull ItemStack catalyst, @Nonnull ItemStack output, @Nullable ResourceLocation circleTexture) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
Preconditions.checkNotNull(catalyst, "catalyst cannot be null.");
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
|
@ -191,17 +173,14 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
addAlchemyArray(Ingredient.fromStacks(input), Ingredient.fromStacks(catalyst), output, circleTexture);
|
||||
}
|
||||
|
||||
public void addSacrificeCraft(@Nonnull ItemStack output, @Nonnegative double healthRequired, @Nonnull Object... input)
|
||||
{
|
||||
public void addSacrificeCraft(@Nonnull ItemStack output, @Nonnegative double healthRequired, @Nonnull Object... input) {
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
Preconditions.checkArgument(healthRequired >= 0, "healthRequired cannot be negative.");
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
|
||||
List<Ingredient> ingredients = Lists.newArrayList();
|
||||
for (Object object : input)
|
||||
{
|
||||
if (object instanceof ItemStack && ((ItemStack) object).getItem() instanceof IBloodOrb)
|
||||
{
|
||||
for (Object object : input) {
|
||||
if (object instanceof ItemStack && ((ItemStack) object).getItem() instanceof IBloodOrb) {
|
||||
ingredients.add(new IngredientBloodOrb(((IBloodOrb) ((ItemStack) object).getItem()).getOrb((ItemStack) object)));
|
||||
continue;
|
||||
}
|
||||
|
@ -213,8 +192,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean removeSacrificeCraft(@Nonnull ItemStack... input)
|
||||
{
|
||||
public boolean removeSacrificeCraft(@Nonnull ItemStack... input) {
|
||||
Preconditions.checkNotNull(input, "inputs cannot be null.");
|
||||
|
||||
for (ItemStack stack : input)
|
||||
|
@ -224,8 +202,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addSacrificeCraft(@Nonnull ItemStack output, @Nonnegative double healthRequired, @Nonnull Ingredient... input)
|
||||
{
|
||||
public void addSacrificeCraft(@Nonnull ItemStack output, @Nonnegative double healthRequired, @Nonnull Ingredient... input) {
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
Preconditions.checkArgument(healthRequired >= 0, "healthRequired cannot be negative.");
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
|
@ -235,8 +212,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Nullable
|
||||
public RecipeBloodAltar getBloodAltar(@Nonnull ItemStack input)
|
||||
{
|
||||
public RecipeBloodAltar getBloodAltar(@Nonnull ItemStack input) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
if (input.isEmpty())
|
||||
return null;
|
||||
|
@ -249,27 +225,23 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Nullable
|
||||
public RecipeAlchemyTable getAlchemyTable(@Nonnull List<ItemStack> input)
|
||||
{
|
||||
public RecipeAlchemyTable getAlchemyTable(@Nonnull List<ItemStack> input) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
if (input.isEmpty())
|
||||
return null;
|
||||
|
||||
mainLoop: for (RecipeAlchemyTable recipe : alchemyRecipes)
|
||||
{
|
||||
mainLoop:
|
||||
for (RecipeAlchemyTable recipe : alchemyRecipes) {
|
||||
if (recipe.getInput().size() != input.size())
|
||||
continue;
|
||||
|
||||
List<Ingredient> recipeInput = new ArrayList<>(recipe.getInput());
|
||||
|
||||
for (int i = 0; i < input.size(); i++)
|
||||
{
|
||||
for (int i = 0; i < input.size(); i++) {
|
||||
boolean matched = false;
|
||||
for (int j = 0; j < recipeInput.size(); j++)
|
||||
{
|
||||
for (int j = 0; j < recipeInput.size(); j++) {
|
||||
Ingredient ingredient = recipeInput.get(j);
|
||||
if (ingredient.apply(input.get(i)))
|
||||
{
|
||||
if (ingredient.apply(input.get(i))) {
|
||||
matched = true;
|
||||
recipeInput.remove(j);
|
||||
break;
|
||||
|
@ -287,27 +259,23 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Nullable
|
||||
public RecipeTartaricForge getTartaricForge(@Nonnull List<ItemStack> input)
|
||||
{
|
||||
public RecipeTartaricForge getTartaricForge(@Nonnull List<ItemStack> input) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
if (input.isEmpty())
|
||||
return null;
|
||||
|
||||
mainLoop: for (RecipeTartaricForge recipe : tartaricForgeRecipes)
|
||||
{
|
||||
mainLoop:
|
||||
for (RecipeTartaricForge recipe : tartaricForgeRecipes) {
|
||||
if (recipe.getInput().size() != input.size())
|
||||
continue;
|
||||
|
||||
List<Ingredient> recipeInput = new ArrayList<>(recipe.getInput());
|
||||
|
||||
for (int i = 0; i < input.size(); i++)
|
||||
{
|
||||
for (int i = 0; i < input.size(); i++) {
|
||||
boolean matched = false;
|
||||
for (int j = 0; j < recipeInput.size(); j++)
|
||||
{
|
||||
for (int j = 0; j < recipeInput.size(); j++) {
|
||||
Ingredient ingredient = recipeInput.get(j);
|
||||
if (ingredient.apply(input.get(i)))
|
||||
{
|
||||
if (ingredient.apply(input.get(i))) {
|
||||
matched = true;
|
||||
recipeInput.remove(j);
|
||||
break;
|
||||
|
@ -325,27 +293,23 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Nullable
|
||||
public RecipeSacrificeCraft getSacrificeCraft(@Nonnull List<ItemStack> input)
|
||||
{
|
||||
public RecipeSacrificeCraft getSacrificeCraft(@Nonnull List<ItemStack> input) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
if (input.isEmpty())
|
||||
return null;
|
||||
|
||||
mainLoop: for (RecipeSacrificeCraft recipe : sacrificeCraftRecipes)
|
||||
{
|
||||
mainLoop:
|
||||
for (RecipeSacrificeCraft recipe : sacrificeCraftRecipes) {
|
||||
if (recipe.getInput().size() != input.size())
|
||||
continue;
|
||||
|
||||
List<Ingredient> recipeInput = new ArrayList<>(recipe.getInput());
|
||||
|
||||
for (int i = 0; i < input.size(); i++)
|
||||
{
|
||||
for (int i = 0; i < input.size(); i++) {
|
||||
boolean matched = false;
|
||||
for (int j = 0; j < recipeInput.size(); j++)
|
||||
{
|
||||
for (int j = 0; j < recipeInput.size(); j++) {
|
||||
Ingredient ingredient = recipeInput.get(j);
|
||||
if (ingredient.apply(input.get(i)))
|
||||
{
|
||||
if (ingredient.apply(input.get(i))) {
|
||||
matched = true;
|
||||
recipeInput.remove(j);
|
||||
break;
|
||||
|
@ -363,8 +327,7 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
}
|
||||
|
||||
@Nullable
|
||||
public RecipeAlchemyArray getAlchemyArray(@Nonnull ItemStack input, @Nonnull ItemStack catalyst)
|
||||
{
|
||||
public RecipeAlchemyArray getAlchemyArray(@Nonnull ItemStack input, @Nonnull ItemStack catalyst) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
if (input.isEmpty())
|
||||
return null;
|
||||
|
@ -376,23 +339,19 @@ public class BloodMagicRecipeRegistrar implements IBloodMagicRecipeRegistrar
|
|||
return null;
|
||||
}
|
||||
|
||||
public Set<RecipeBloodAltar> getAltarRecipes()
|
||||
{
|
||||
public Set<RecipeBloodAltar> getAltarRecipes() {
|
||||
return ImmutableSet.copyOf(altarRecipes);
|
||||
}
|
||||
|
||||
public Set<RecipeAlchemyTable> getAlchemyRecipes()
|
||||
{
|
||||
public Set<RecipeAlchemyTable> getAlchemyRecipes() {
|
||||
return ImmutableSet.copyOf(alchemyRecipes);
|
||||
}
|
||||
|
||||
public Set<RecipeTartaricForge> getTartaricForgeRecipes()
|
||||
{
|
||||
public Set<RecipeTartaricForge> getTartaricForgeRecipes() {
|
||||
return ImmutableSet.copyOf(tartaricForgeRecipes);
|
||||
}
|
||||
|
||||
public Set<RecipeAlchemyArray> getAlchemyArrayRecipes()
|
||||
{
|
||||
public Set<RecipeAlchemyArray> getAlchemyArrayRecipes() {
|
||||
return ImmutableSet.copyOf(alchemyArrayRecipes);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,7 @@ import net.minecraft.util.NonNullList;
|
|||
import javax.annotation.Nonnegative;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class RecipeSacrificeCraft
|
||||
{
|
||||
public class RecipeSacrificeCraft {
|
||||
@Nonnull
|
||||
private final NonNullList<Ingredient> input;
|
||||
@Nonnull
|
||||
|
@ -17,8 +16,7 @@ public class RecipeSacrificeCraft
|
|||
@Nonnegative
|
||||
private final double healthRequired;
|
||||
|
||||
public RecipeSacrificeCraft(@Nonnull NonNullList<Ingredient> input, @Nonnull ItemStack output, @Nonnegative double healthRequired)
|
||||
{
|
||||
public RecipeSacrificeCraft(@Nonnull NonNullList<Ingredient> input, @Nonnull ItemStack output, @Nonnegative double healthRequired) {
|
||||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
Preconditions.checkArgument(healthRequired >= 0, "healthRequired cannot be negative.");
|
||||
|
@ -29,20 +27,17 @@ public class RecipeSacrificeCraft
|
|||
}
|
||||
|
||||
@Nonnull
|
||||
public final NonNullList<Ingredient> getInput()
|
||||
{
|
||||
public final NonNullList<Ingredient> getInput() {
|
||||
return input;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public final ItemStack getOutput()
|
||||
{
|
||||
public final ItemStack getOutput() {
|
||||
return output;
|
||||
}
|
||||
|
||||
@Nonnegative
|
||||
public final double getHealthRequired()
|
||||
{
|
||||
public final double getHealthRequired() {
|
||||
return healthRequired;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue