Attempt to fix 1.16.3 branch's issues on the repository
Added the original 'wayoftime' folder back, so see if that fixed the multiple folder issue.
This commit is contained in:
parent
6b4145a67c
commit
9fa68e86ae
224 changed files with 24047 additions and 0 deletions
40
src/main/java/wayoftime/bloodmagic/iface/IBindable.java
Normal file
40
src/main/java/wayoftime/bloodmagic/iface/IBindable.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package wayoftime.bloodmagic.iface;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import wayoftime.bloodmagic.core.data.Binding;
|
||||
|
||||
/**
|
||||
* Implement this interface on any Item that can be bound to a player.
|
||||
*/
|
||||
public interface IBindable
|
||||
{
|
||||
/**
|
||||
* Gets an object that stores who this item is bound to.
|
||||
* <p>
|
||||
* If the item is not bound, this will be null.
|
||||
*
|
||||
* @param stack - The owned ItemStack
|
||||
* @return - The binding object
|
||||
*/
|
||||
@Nullable
|
||||
default Binding getBinding(ItemStack stack)
|
||||
{
|
||||
Binding binding = Binding.fromStack(stack);
|
||||
return !stack.isEmpty() && binding != null ? binding : 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(PlayerEntity player, ItemStack stack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue