Package alexiil.mc.lib.attributes
Interface BlockEntityAttributeAdder<AT,BE>
- Type Parameters:
- AT- The attribute type.
- BE- The BlockEntity target type. (This doesn't extend- BlockEntityso you can target interfaces that block entities may implement).
- All Known Implementing Classes:
- BlockEntityAttributeAdder.BeAdderBase
public interface BlockEntityAttributeAdder<AT,BE>
Base interface to add attributes for 
BlockEntitys that you haven't defined.
 
 There is an additional FunctionalInterface variant of this: BlockEntityAttributeAdder.BlockEntityAttributeAdderFN.
 Implementations must be registered to Attribute in order to be used, in any of these methods:
 
- 
 Attribute.addBlockEntityPredicateAdder(AttributeSourceType, boolean, Predicate, BlockEntityAttributeAdderFN).
- Attribute.putBlockEntityClassAdder(AttributeSourceType, Class, boolean, BlockEntityAttributeAdderFN)
- Attribute.setBlockEntityAdder(AttributeSourceType, BlockEntityType, BlockEntityAttributeAdder)
- 
 Attribute.setBlockEntityAdder(AttributeSourceType, BlockEntityType, Class, BlockEntityAttributeAdderFN)
- Attribute.setBlockEntityAdderFN(AttributeSourceType, BlockEntityType, BlockEntityAttributeAdderFN)
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classBase class forBlockEntityAttributeAdder.BlockEntityAttributeAdderFNconversions.static interfaceFunctionalInterfaceversion ofBlockEntityAttributeAdder.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAll(BE blockEntity, AttributeList<AT> to)Adds every attribute instance to the given list that the block entity itself cannot be expected to add support for.static <AT> BlockEntityAttributeAdder<AT,net.minecraft.block.entity.BlockEntity>ofBasic(BlockEntityAttributeAdder.BlockEntityAttributeAdderFN<AT,net.minecraft.block.entity.BlockEntity> fn)Creates a fullBlockEntityAttributeAdderfrom theFunctionalInterfacevariant, but only allows targetingBlockEntitydirectly.static <AT, BE> BlockEntityAttributeAdder<AT,BE>ofTyped(Class<BE> clazz, BlockEntityAttributeAdder.BlockEntityAttributeAdderFN<AT,BE> fn)Creates a fullBlockEntityAttributeAdderfrom theFunctionalInterfacevariant, and aClassto target.
- 
Method Details- 
addAllAdds every attribute instance to the given list that the block entity itself cannot be expected to add support for.
- 
getBlockEntityClass- Returns:
- The target Classfor theBlockEntity. This doesn't extendBlockEntityso you can target interfaces that block entities may implement).
 
- 
ofBasicstatic <AT> BlockEntityAttributeAdder<AT,net.minecraft.block.entity.BlockEntity> ofBasic(BlockEntityAttributeAdder.BlockEntityAttributeAdderFN<AT,net.minecraft.block.entity.BlockEntity> fn)Creates a fullBlockEntityAttributeAdderfrom theFunctionalInterfacevariant, but only allows targetingBlockEntitydirectly.
- 
ofTypedstatic <AT, BE> BlockEntityAttributeAdder<AT,BE> ofTyped(Class<BE> clazz, BlockEntityAttributeAdder.BlockEntityAttributeAdderFN<AT,BE> fn)Creates a fullBlockEntityAttributeAdderfrom theFunctionalInterfacevariant, and aClassto target.
 
-