Added more rituals
Includes the Green Grove, Regen, Animal Growth, and a fix to the Feathered Knife ritual so that it... doesn't cause the damage animation.
This commit is contained in:
parent
e312e3d854
commit
06faa916c3
15 changed files with 1365 additions and 45 deletions
|
@ -1,13 +1,14 @@
|
|||
package wayoftime.bloodmagic.api;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.LazyValue;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* The main interface between a plugin and Blood Magic's internals.
|
||||
|
@ -16,29 +17,36 @@ import java.util.function.Predicate;
|
|||
* Magic. More advanced integration is out of the scope of this API and are
|
||||
* considered "addons".
|
||||
*
|
||||
* Use INSTANCE to get an instance of the API without actually implementing anything
|
||||
* Use INSTANCE to get an instance of the API without actually implementing
|
||||
* anything
|
||||
*/
|
||||
public interface IBloodMagicAPI
|
||||
{
|
||||
LazyValue<IBloodMagicAPI> INSTANCE = new LazyValue<>(() ->
|
||||
{
|
||||
LazyValue<IBloodMagicAPI> INSTANCE = new LazyValue<>(() -> {
|
||||
try
|
||||
{
|
||||
return (IBloodMagicAPI) Class.forName("wayoftime.bloodmagic.impl.BloodMagicAPI").getDeclaredField("INSTANCE").get(null);
|
||||
}
|
||||
catch (ReflectiveOperationException e)
|
||||
} catch (ReflectiveOperationException e)
|
||||
{
|
||||
LogManager.getLogger().warn("Unable to find BloodMagicAPI, using a dummy instance instead...");
|
||||
return new IBloodMagicAPI() {};
|
||||
return new IBloodMagicAPI()
|
||||
{
|
||||
};
|
||||
}
|
||||
});
|
||||
// /**
|
||||
// * Retrieves the instance of the blacklist.
|
||||
// *
|
||||
// * @return the active {@link IBloodMagicBlacklist} instance
|
||||
// */
|
||||
// @Nonnull
|
||||
// IBloodMagicBlacklist getBlacklist();
|
||||
|
||||
/**
|
||||
* Retrieves the instance of the blacklist.
|
||||
*
|
||||
* @return the active {@link IBloodMagicBlacklist} instance
|
||||
*/
|
||||
@Nonnull
|
||||
default IBloodMagicBlacklist getBlacklist()
|
||||
{
|
||||
return new IBloodMagicBlacklist()
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the instance of the value manager.
|
||||
|
@ -48,7 +56,9 @@ public interface IBloodMagicAPI
|
|||
@Nonnull
|
||||
default IBloodMagicValueManager getValueManager()
|
||||
{
|
||||
return new IBloodMagicValueManager() {};
|
||||
return new IBloodMagicValueManager()
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,7 +77,9 @@ public interface IBloodMagicAPI
|
|||
* @param state The state to register
|
||||
* @param componentType The type of Blood Altar component to register as.
|
||||
*/
|
||||
default void registerAltarComponent(@Nonnull BlockState state, @Nonnull String componentType) {}
|
||||
default void registerAltarComponent(@Nonnull BlockState state, @Nonnull String componentType)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a {@link BlockState} from the component mappings
|
||||
|
@ -85,7 +97,9 @@ public interface IBloodMagicAPI
|
|||
* @param state The state to unregister
|
||||
* @param componentType The type of Blood Altar component to unregister from.
|
||||
*/
|
||||
default void unregisterAltarComponent(@Nonnull BlockState state, @Nonnull String componentType) {}
|
||||
default void unregisterAltarComponent(@Nonnull BlockState state, @Nonnull String componentType)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a {@link Predicate<BlockState>} for tranquility handling
|
||||
|
@ -101,11 +115,14 @@ public interface IBloodMagicAPI
|
|||
* <li>LAVA</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param predicate Predicate to be used for the handler (goes to ITranquilityHandler)
|
||||
* @param predicate Predicate to be used for the handler (goes to
|
||||
* ITranquilityHandler)
|
||||
* @param tranquilityType Tranquility type that the handler holds
|
||||
* @param value The amount of tranquility that the handler has
|
||||
* @param value The amount of tranquility that the handler has
|
||||
*/
|
||||
default void registerTranquilityHandler(Predicate<BlockState> predicate, String tranquilityType, double value) {}
|
||||
default void registerTranquilityHandler(Predicate<BlockState> predicate, String tranquilityType, double value)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the total Will that a Player contains
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
package wayoftime.bloodmagic.api;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
/**
|
||||
* Allows blacklisting of various objects from different Blood Magic systems.
|
||||
*/
|
||||
public interface IBloodMagicBlacklist
|
||||
{
|
||||
|
||||
/**
|
||||
* Blacklists a given {@link BlockState} from being teleposed.
|
||||
*
|
||||
* @param state The {@link BlockState} to blacklist.
|
||||
*/
|
||||
default void addTeleposer(@Nonnull BlockState state)
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* Blacklists a {@link net.minecraft.entity.Entity} from being teleposed based
|
||||
* on the given registry name.
|
||||
*
|
||||
* @param entityId The registry name to blacklist.
|
||||
*/
|
||||
default void addTeleposer(@Nonnull ResourceLocation entityId)
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* Blacklists a given {@link BlockState} from being transposed.
|
||||
*
|
||||
* @param state The {@link BlockState} to blacklist.
|
||||
*/
|
||||
default void addTransposition(@Nonnull BlockState state)
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* Blacklists a given {@link BlockState} from being accelerated by the growth
|
||||
* enhancement ritual and sigil.
|
||||
*
|
||||
* @param state The {@link BlockState} to blacklist.
|
||||
*/
|
||||
default void addGreenGrove(@Nonnull BlockState state)
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* Blacklists a {@link net.minecraft.entity.Entity} from being sacrificed via
|
||||
* the Well of Suffering ritual.
|
||||
*
|
||||
* @param entityId The registry name to blacklist.
|
||||
*/
|
||||
default void addWellOfSuffering(@Nonnull ResourceLocation entityId)
|
||||
{
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue