
This DOES NOT BUILD. Do not even attempt. Almost everything has been ported besides the block/item packages. Then it's a matter of testing what broke.
57 lines
1.9 KiB
Java
57 lines
1.9 KiB
Java
package WayofTime.bloodmagic.api.ritual.imperfect;
|
|
|
|
import WayofTime.bloodmagic.api.BlockStack;
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.Getter;
|
|
import lombok.RequiredArgsConstructor;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.world.World;
|
|
|
|
/**
|
|
* Abstract class for creating new imperfect rituals. ImperfectRituals need be
|
|
* registered with
|
|
* {@link WayofTime.bloodmagic.api.registry.ImperfectRitualRegistry#registerRitual(ImperfectRitual)}
|
|
*/
|
|
@RequiredArgsConstructor
|
|
@Getter
|
|
@EqualsAndHashCode
|
|
public abstract class ImperfectRitual
|
|
{
|
|
|
|
private final String name;
|
|
private final BlockStack requiredBlock;
|
|
private final int activationCost;
|
|
private final boolean lightshow;
|
|
private final String unlocalizedName;
|
|
|
|
/**
|
|
* @param name
|
|
* - The name of the ritual
|
|
* @param requiredBlock
|
|
* - The block required above the ImperfectRitualStone
|
|
* @param activationCost
|
|
* - Base LP cost for activating the ritual
|
|
*/
|
|
public ImperfectRitual(String name, BlockStack requiredBlock, int activationCost, String unlocalizedName)
|
|
{
|
|
this(name, requiredBlock, activationCost, false, unlocalizedName);
|
|
}
|
|
|
|
/**
|
|
* Called when the player activates the ritual
|
|
* {@link WayofTime.bloodmagic.tile.TileImperfectRitualStone#performRitual(World, net.minecraft.util.math.BlockPos, ImperfectRitual, EntityPlayer)}
|
|
*
|
|
* @param imperfectRitualStone
|
|
* - The {@link IImperfectRitualStone} that the ritual is bound to
|
|
* @param player
|
|
* - The player activating the ritual
|
|
* @return - Whether activation was successful
|
|
*/
|
|
public abstract boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player);
|
|
|
|
@Override
|
|
public String toString()
|
|
{
|
|
return getName() + ":" + getRequiredBlock().toString() + "@" + getActivationCost();
|
|
}
|
|
}
|