feat(D-01): add IItemComponent interface for data-driven item behaviors
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.tiedup.remake.v2.bondage.component;
|
||||
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
/**
|
||||
* A reusable behavior module for data-driven bondage items.
|
||||
* Components are declared in JSON and instantiated per item definition.
|
||||
*/
|
||||
public interface IItemComponent {
|
||||
|
||||
default void onEquipped(ItemStack stack, LivingEntity entity) {}
|
||||
|
||||
default void onUnequipped(ItemStack stack, LivingEntity entity) {}
|
||||
|
||||
default void onWornTick(ItemStack stack, LivingEntity entity) {}
|
||||
|
||||
default boolean blocksUnequip(ItemStack stack, LivingEntity entity) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user