Merge apibutnotreally with the main packages
Do not consider anything outside of the true API safe to use. And even then, I'm changing things. Just wait. Please I beg you.
This commit is contained in:
parent
616c08094b
commit
2fecb427fd
399 changed files with 958 additions and 977 deletions
|
@ -0,0 +1,9 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IActivatable {
|
||||
boolean getActivated(ItemStack stack);
|
||||
|
||||
ItemStack setActivatedState(ItemStack stack, boolean activated);
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface IAlchemyArray {
|
||||
EnumFacing getRotation();
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
/**
|
||||
* Any item that implements this interface will not be pulled into the Altar on
|
||||
* right click.
|
||||
*/
|
||||
public interface IAltarReader {
|
||||
|
||||
}
|
47
src/main/java/WayofTime/bloodmagic/iface/IBindable.java
Normal file
47
src/main/java/WayofTime/bloodmagic/iface/IBindable.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import WayofTime.bloodmagic.util.Constants;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Implement this interface on any Item that can be bound to a player.
|
||||
*/
|
||||
public interface IBindable {
|
||||
|
||||
/**
|
||||
* Gets the username of the Item's owner. Usually for display, such as in
|
||||
* the tooltip.
|
||||
* <p>
|
||||
* If the item is not bound, this will be null.
|
||||
*
|
||||
* @param stack - The owned ItemStack
|
||||
* @return - The username of the Item's owner
|
||||
*/
|
||||
default String getOwnerName(ItemStack stack) {
|
||||
return !stack.isEmpty() && stack.hasTagCompound() ? stack.getTagCompound().getString(Constants.NBT.OWNER_NAME) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the UUID of the Item's owner.
|
||||
* <p>
|
||||
* If the item is not bound, this will be null.
|
||||
*
|
||||
* @param stack - The owned ItemStack
|
||||
* @return - The UUID of the Item's owner
|
||||
*/
|
||||
default String getOwnerUUID(ItemStack stack) {
|
||||
return !stack.isEmpty() && stack.hasTagCompound() ? stack.getTagCompound().getString(Constants.NBT.OWNER_UUID) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the player attempts to bind the item.
|
||||
*
|
||||
* @param player - The Player attempting to bind the item
|
||||
* @param stack - The ItemStack to attempt binding
|
||||
* @return If binding was successful.
|
||||
*/
|
||||
default boolean onBind(EntityPlayer player, ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* An interface for items that have custom drainage behaviour when used in
|
||||
* certain alchemy recipes.
|
||||
*/
|
||||
public interface ICustomAlchemyConsumable {
|
||||
ItemStack drainUseOnAlchemyCraft(ItemStack stack);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IDemonWillViewer {
|
||||
boolean canSeeDemonWillAura(World world, ItemStack stack, EntityPlayer player);
|
||||
|
||||
int getDemonWillAuraResolution(World world, ItemStack stack, EntityPlayer player);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Marks blocks as one that is documented.
|
||||
* <p>
|
||||
* This documentation can be read by an
|
||||
* {@link WayofTime.bloodmagic.item.ItemSanguineBook} (or child)
|
||||
*/
|
||||
public interface IDocumentedBlock {
|
||||
/**
|
||||
* Provides the documentation to provide to the player. Usually a
|
||||
* short'n'sweet description about basic usage.
|
||||
*
|
||||
* @param player - The EntityPlayer attempting to view the Documentation.
|
||||
* @param world - The World interaction is happening in.
|
||||
* @param pos - The BlockPos being interacted at.
|
||||
* @param state - The IBlockState of the interacted Block.
|
||||
* @return - A list of formatted ITextComponent to provide to the player.
|
||||
* Provide an empty list if there is no available documentation.
|
||||
*/
|
||||
@Nonnull
|
||||
List<ITextComponent> getDocumentation(EntityPlayer player, World world, BlockPos pos, IBlockState state);
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import WayofTime.bloodmagic.util.BlockStack;
|
||||
import WayofTime.bloodmagic.ritual.data.IMasterRitualStone;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Used to define a HarvestHandler for the Harvest Ritual.
|
||||
*/
|
||||
public interface IHarvestHandler {
|
||||
/**
|
||||
* Called whenever the Harvest Ritual attempts to harvest a block. <br>
|
||||
* Use this to break the block, plant a new one, and drop the produced
|
||||
* items. <br>
|
||||
* Make sure to do checks so you are certain the blocks being handled are
|
||||
* the block types you want.
|
||||
*
|
||||
* @param world - The world the
|
||||
* {@link IMasterRitualStone} is in.
|
||||
* @param pos - The position of the Block being checked
|
||||
* @param blockStack - The Block being checked
|
||||
* @return If the block was successfully harvested.
|
||||
*/
|
||||
boolean harvestAndPlant(World world, BlockPos pos, BlockStack blockStack);
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Interface used for any item that can store LP in itself
|
||||
*/
|
||||
public interface IItemLPContainer {
|
||||
int getCapacity();
|
||||
|
||||
void setStoredLP(ItemStack stack, int lp);
|
||||
|
||||
int getStoredLP(ItemStack stack);
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import WayofTime.bloodmagic.soul.EnumDemonWillType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IMultiWillTool {
|
||||
EnumDemonWillType getCurrentType(ItemStack stack);
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
/**
|
||||
* Held items that implement this will cause the beams between routing nodes to
|
||||
* render.
|
||||
*/
|
||||
public interface INodeRenderer {
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IPurificationAsh {
|
||||
double getTotalPurity(ItemStack stack);
|
||||
|
||||
double getMaxPurity(ItemStack stack);
|
||||
|
||||
double getPurityRate(ItemStack stack);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import WayofTime.bloodmagic.soul.EnumDemonWillType;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ISentientSwordEffectProvider {
|
||||
boolean applyOnHitEffect(EnumDemonWillType type, ItemStack swordStack, ItemStack providerStack, EntityLivingBase attacker, EntityLivingBase target);
|
||||
|
||||
boolean providesEffectForWill(EnumDemonWillType type);
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ISentientTool {
|
||||
boolean spawnSentientEntityOnDrop(ItemStack droppedStack, EntityPlayer player);
|
||||
}
|
29
src/main/java/WayofTime/bloodmagic/iface/ISigil.java
Normal file
29
src/main/java/WayofTime/bloodmagic/iface/ISigil.java
Normal file
|
@ -0,0 +1,29 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import WayofTime.bloodmagic.item.ItemSigil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Used for all {@link ItemSigil} <b>EXCEPT</b>
|
||||
* Sigils of Holdings.
|
||||
*/
|
||||
public interface ISigil {
|
||||
|
||||
default boolean performArrayEffect(World world, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
default boolean hasArrayEffect() {
|
||||
return false;
|
||||
}
|
||||
|
||||
interface Holding {
|
||||
@Nonnull
|
||||
ItemStack getHeldItem(ItemStack holdingStack, EntityPlayer player);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package WayofTime.bloodmagic.iface;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This interface is used for items intended to train specific upgrades while
|
||||
* held in the player's inventory.
|
||||
*/
|
||||
public interface IUpgradeTrainer {
|
||||
List<String> getTrainedUpgrades(ItemStack stack);
|
||||
|
||||
boolean setTrainedUpgrades(ItemStack stack, List<String> keys);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue