diff --git a/src/main/java/WayofTime/bloodmagic/api/BloodMagicPlugin.java b/src/main/java/WayofTime/bloodmagic/api/BloodMagicPlugin.java
index 04907dfa..0d2bf397 100644
--- a/src/main/java/WayofTime/bloodmagic/api/BloodMagicPlugin.java
+++ b/src/main/java/WayofTime/bloodmagic/api/BloodMagicPlugin.java
@@ -5,6 +5,10 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+/**
+ * This annotation lets Blood Magic detect mod plugins.
+ * All {@link IBloodMagicPlugin} must have this annotation and a constructor with no arguments.
+ */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface BloodMagicPlugin {
diff --git a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicAPI.java b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicAPI.java
index 9346d415..8817dd25 100644
--- a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicAPI.java
+++ b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicAPI.java
@@ -1,25 +1,53 @@
package WayofTime.bloodmagic.api;
import net.minecraft.block.state.IBlockState;
-import net.minecraft.util.ResourceLocation;
import javax.annotation.Nonnull;
+/**
+ * The main interface between a plugin and Blood Magic's internals.
+ */
public interface IBloodMagicAPI {
/**
- * Retrieves the instance of the blacklisting system that Blood Magic uses.
+ * Retrieves the instance of the blacklist.
*
- * @return the active blacklist instance
+ * @return the active {@link IBloodMagicBlacklist} instance
*/
@Nonnull
IBloodMagicBlacklist getBlacklist();
+ /**
+ * Retrieves the instance of the recipe registrar.
+ *
+ * @return the active {@link IBloodMagicRecipeRegistrar} instance
+ */
@Nonnull
IBloodMagicRecipeRegistrar getRecipeRegistrar();
+ /**
+ * Retrieves the instance of the value manager.
+ *
+ * @return the active {@link IBloodMagicValueManager} instance
+ */
@Nonnull
IBloodMagicValueManager getValueManager();
+ /**
+ * Registers an {@link IBlockState} as a given component for the Blood Altar.
+ *
+ * Valid component types:
+ *
+ * - GLOWSTONE
+ * - BLOODSTONE
+ * - BEACON
+ * - BLOODRUNE
+ * - CRYSTAL
+ * - NOTAIR
+ *
+ *
+ * @param state The state to register
+ * @param componentType The type of Blood Altar component to register as.
+ */
void registerAltarComponent(@Nonnull IBlockState state, @Nonnull String componentType);
}
diff --git a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicBlacklist.java b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicBlacklist.java
index 64ba641f..e99c1609 100644
--- a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicBlacklist.java
+++ b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicBlacklist.java
@@ -1,26 +1,47 @@
package WayofTime.bloodmagic.api;
-import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.ResourceLocation;
import javax.annotation.Nonnull;
+/**
+ * Allows blacklisting of various objects from different Blood Magic systems.
+ */
public interface IBloodMagicBlacklist {
+ /**
+ * Blacklists a given {@link IBlockState} from being teleposed.
+ *
+ * @param state The {@link IBlockState} to blacklist.
+ */
void addTeleposer(@Nonnull IBlockState state);
- void addTeleposer(@Nonnull Block block);
-
+ /**
+ * Blacklists a {@link net.minecraft.entity.Entity} from being teleposed based on the given registry name.
+ *
+ * @param entityId The registry name to blacklist.
+ */
void addTeleposer(@Nonnull ResourceLocation entityId);
+ /**
+ * Blacklists a given {@link IBlockState} from being transposed.
+ *
+ * @param state The {@link IBlockState} to blacklist.
+ */
void addTransposition(@Nonnull IBlockState state);
- void addTransposition(@Nonnull Block block);
-
+ /**
+ * Blacklists a given {@link IBlockState} from being accelerated by the growth enhancement ritual and sigil.
+ *
+ * @param state The {@link IBlockState} to blacklist.
+ */
void addGreenGrove(@Nonnull IBlockState state);
- void addGreenGrove(@Nonnull Block block);
-
+ /**
+ * Blacklists a {@link net.minecraft.entity.Entity} from being sacrificed via the Well of Suffering ritual.
+ *
+ * @param entityId The registry name to blacklist.
+ */
void addWellOfSuffering(@Nonnull ResourceLocation entityId);
}
diff --git a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicPlugin.java b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicPlugin.java
index 450076db..78ac7036 100644
--- a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicPlugin.java
+++ b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicPlugin.java
@@ -1,6 +1,15 @@
package WayofTime.bloodmagic.api;
+/**
+ * The main class to implement to create a Blood Magic plugin. Everything communicated between a mod and Blood Magic is through this class.
+ * IBloodMagicPlugins must have the {@link BloodMagicPlugin} annotation to get loaded by Blood Magic.
+ */
public interface IBloodMagicPlugin {
+ /**
+ * Register mod content with the API
+ *
+ * @param api The active instance of the {@link IBloodMagicAPI}
+ */
void register(IBloodMagicAPI api);
}
diff --git a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicRecipeRegistrar.java b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicRecipeRegistrar.java
index 07e25481..9320886d 100644
--- a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicRecipeRegistrar.java
+++ b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicRecipeRegistrar.java
@@ -6,17 +6,68 @@ import net.minecraft.item.crafting.Ingredient;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
+/**
+ * Allows recipe addition and removal.
+ */
public interface IBloodMagicRecipeRegistrar {
+ /**
+ * Adds a new recipe to the Blood Altar.
+ *
+ * @param input An input {@link Ingredient}.
+ * @param output An output {@link ItemStack}.
+ * @param minimumTier The minimum Blood Altar tier required for this recipe.
+ * @param syphon The amount of Life Essence to syphon from the Blood Altar over the course of the craft.
+ * @param consumeRate How quickly the Life Essence is syphoned.
+ * @param drainRate How quickly progress is lost if the Blood Altar runs out of Life Essence during the craft.
+ */
void addBloodAltar(@Nonnull Ingredient input, @Nonnull ItemStack output, @Nonnegative int minimumTier, @Nonnegative int syphon, @Nonnegative int consumeRate, @Nonnegative int drainRate);
+ /**
+ * Removes a Blood Altar recipe based on an input {@link ItemStack}.
+ *
+ * @param input The input item to remove the recipe of.
+ *
+ * @return Whether or not a recipe was removed.
+ */
boolean removeBloodAltar(@Nonnull ItemStack input);
+ /**
+ * Adds a new recipe to the Alchemy Table.
+ *
+ * @param output An output {@link ItemStack}.
+ * @param syphon The amount of Life Essence to syphon from the Blood Orb's bound network over the course of the craft.
+ * @param ticks The amount of ticks it takes to complete the craft.
+ * @param minimumTier The minimum Blood Orb tier required for this recipe.
+ * @param input An array of {@link Ingredient}s to accept as inputs.
+ */
void addAlchemyTable(@Nonnull ItemStack output, @Nonnegative int syphon, @Nonnegative int ticks, @Nonnegative int minimumTier, @Nonnull Ingredient... input);
+ /**
+ * Removes an Alchemy Table recipe based on an input {@link Ingredient} array.
+ *
+ * @param input The input items to remove the recipe of.
+ *
+ * @return Whether or not a recipe was removed.
+ */
boolean removeAlchemyTable(@Nonnull ItemStack... input);
+ /**
+ * Adds a new recipe to the Soul/Tartaric Forge.
+ *
+ * @param output An output {@link ItemStack}.
+ * @param minimumSouls The minimum number of souls that must be contained in the Soul Gem.
+ * @param soulDrain The number of souls to drain from the Soul Gem.
+ * @param input An array of {@link Ingredient}s to accept as inputs.
+ */
void addTartaricForge(@Nonnull ItemStack output, @Nonnegative double minimumSouls, @Nonnegative double soulDrain, @Nonnull Ingredient... input);
+ /**
+ * Removes a Soul/Tartaric Forge recipe based on an input {@link Ingredient} array.
+ *
+ * @param input The input items to remove the recipe of.
+ *
+ * @return Whether or not a recipe was removed.
+ */
boolean removeTartaricForge(@Nonnull ItemStack... input);
}
diff --git a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicValueManager.java b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicValueManager.java
index 63676ebb..1f22de5a 100644
--- a/src/main/java/WayofTime/bloodmagic/api/IBloodMagicValueManager.java
+++ b/src/main/java/WayofTime/bloodmagic/api/IBloodMagicValueManager.java
@@ -6,9 +6,37 @@ import net.minecraft.util.ResourceLocation;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
+/**
+ * Allows value modification for various features of Blood Magic such as Sacrificial values.
+ */
public interface IBloodMagicValueManager {
+ /**
+ * Sets the amount of LP received per health point from sacrificing the given entity. By default, this is 25. Setting
+ * the value to 0 effectively disables sacrificing.
+ *
+ * @param entityId The registry name of the entity.
+ * @param value The amount of LP per health point to receive upon sacrifice.
+ */
void setSacrificialValue(@Nonnull ResourceLocation entityId, @Nonnegative int value);
+ /**
+ * Sets the Tranquility value of a given {@link IBlockState}.
+ *
+ * Valid tranquility types:
+ *
+ * - PLANT
+ * - CROP
+ * - TREE
+ * - EARTHEN
+ * - WATER
+ * - FIRE
+ * - LAVA
+ *
+ *
+ * @param state The {@link IBlockState} to set the value of.
+ * @param tranquilityType The type of Tranquility this block should provide.
+ * @param value The amount of tranquility this block should provide.
+ */
void setTranquility(@Nonnull IBlockState state, @Nonnull String tranquilityType, double value);
}
diff --git a/src/main/java/WayofTime/bloodmagic/api/impl/BloodMagicBlacklist.java b/src/main/java/WayofTime/bloodmagic/api/impl/BloodMagicBlacklist.java
index c07e979c..29fd1f49 100644
--- a/src/main/java/WayofTime/bloodmagic/api/impl/BloodMagicBlacklist.java
+++ b/src/main/java/WayofTime/bloodmagic/api/impl/BloodMagicBlacklist.java
@@ -32,7 +32,6 @@ public class BloodMagicBlacklist implements IBloodMagicBlacklist {
teleposer.add(state);
}
- @Override
public void addTeleposer(@Nonnull Block block) {
for (IBlockState state : block.getBlockState().getValidStates())
addTeleposer(state);
@@ -50,7 +49,6 @@ public class BloodMagicBlacklist implements IBloodMagicBlacklist {
transposition.add(state);
}
- @Override
public void addTransposition(@Nonnull Block block) {
for (IBlockState state : block.getBlockState().getValidStates())
addTransposition(state);
@@ -62,7 +60,6 @@ public class BloodMagicBlacklist implements IBloodMagicBlacklist {
greenGrove.add(state);
}
- @Override
public void addGreenGrove(@Nonnull Block block) {
for (IBlockState state : block.getBlockState().getValidStates())
addGreenGrove(state);
diff --git a/src/main/java/WayofTime/bloodmagic/api/impl/BloodMagicCorePlugin.java b/src/main/java/WayofTime/bloodmagic/api/impl/BloodMagicCorePlugin.java
index 280caae4..c31010da 100644
--- a/src/main/java/WayofTime/bloodmagic/api/impl/BloodMagicCorePlugin.java
+++ b/src/main/java/WayofTime/bloodmagic/api/impl/BloodMagicCorePlugin.java
@@ -84,7 +84,7 @@ public class BloodMagicCorePlugin implements IBloodMagicPlugin {
RegistrarBloodMagicRecipes.registerTartaricForgeRecipes(api.getRecipeRegistrar());
}
- private static void handleConfigValues(IBloodMagicAPI api) {
+ private static void handleConfigValues(BloodMagicAPI api) {
for (String value : ConfigHandler.values.sacrificialValues) {
String[] split = value.split(";");
if (split.length != 2) // Not valid format