Uses of Class
net.neoforged.neoforge.attachment.AttachmentType
Packages that use AttachmentType
Package
Description
-
Uses of AttachmentType in net.minecraft.world.entity
Methods in net.minecraft.world.entity with parameters of type AttachmentType -
Uses of AttachmentType in net.minecraft.world.level.block.entity
Methods in net.minecraft.world.level.block.entity with parameters of type AttachmentTypeModifier and TypeMethodDescriptionfinal <T> T
BlockEntity.removeData
(AttachmentType<T> type) final <T> T
BlockEntity.setData
(AttachmentType<T> type, T data) -
Uses of AttachmentType in net.minecraft.world.level.chunk
Methods in net.minecraft.world.level.chunk with parameters of type AttachmentTypeModifier and TypeMethodDescription<T> T
ChunkAccess.getData
(AttachmentType<T> type) <T> Optional
<T> ChunkAccess.getExistingData
(AttachmentType<T> type) boolean
ChunkAccess.hasData
(AttachmentType<?> type) <T> T
ChunkAccess.removeData
(AttachmentType<T> type) <T> T
ChunkAccess.setData
(AttachmentType<T> type, T data) -
Uses of AttachmentType in net.neoforged.neoforge.attachment
Fields in net.neoforged.neoforge.attachment with type parameters of type AttachmentTypeModifier and TypeFieldDescription(package private) @Nullable Map
<AttachmentType<?>, Object> AttachmentHolder.attachments
Methods in net.neoforged.neoforge.attachment that return AttachmentTypeMethods in net.neoforged.neoforge.attachment that return types with arguments of type AttachmentTypeModifier and TypeMethodDescription(package private) final Map
<AttachmentType<?>, Object> AttachmentHolder.getAttachmentMap()
Create the attachment map if it does not yet exist, or return the current map.Methods in net.neoforged.neoforge.attachment with parameters of type AttachmentTypeModifier and TypeMethodDescriptionfinal <T> T
AttachmentHolder.getData
(AttachmentType<T> type) <T> T
IAttachmentHolder.getData
(AttachmentType<T> type) Returns the data attachment of the given type.<T> Optional
<T> AttachmentHolder.getExistingData
(AttachmentType<T> type) <T> Optional
<T> IAttachmentHolder.getExistingData
(AttachmentType<T> type) Returns an optional possibly containing a data attachment value of the given type.final boolean
AttachmentHolder.hasData
(AttachmentType<?> type) boolean
IAttachmentHolder.hasData
(AttachmentType<?> type) Returnstrue
if there is a data attachment of the give type,false
otherwise.<T> T
AttachmentHolder.removeData
(AttachmentType<T> type) <T> T
IAttachmentHolder.removeData
(AttachmentType<T> type) Removes the data attachment of the given type.<T> T
AttachmentHolder.setData
(AttachmentType<T> type, T data) <T> T
IAttachmentHolder.setData
(AttachmentType<T> type, T data) Sets the data attachment of the given type.private void
AttachmentHolder.validateAttachmentType
(AttachmentType<?> type) Method parameters in net.neoforged.neoforge.attachment with type arguments of type AttachmentTypeModifier and TypeMethodDescriptionprivate static <H extends AttachmentHolder>
voidAttachmentInternals.copyAttachments
(HolderLookup.Provider provider, H from, H to, Predicate<AttachmentType<?>> filter) Copy some attachments to another holder.default <T> T
IAttachmentHolder.getData
(Supplier<AttachmentType<T>> type) Returns the data attachment of the given type.default <T> Optional
<T> IAttachmentHolder.getExistingData
(Supplier<AttachmentType<T>> type) Returns an optional possibly containing a data attachment value of the given type.default <T> boolean
IAttachmentHolder.hasData
(Supplier<AttachmentType<T>> type) Returnstrue
if there is a data attachment of the give type,false
otherwise.default <T> T
IAttachmentHolder.removeData
(Supplier<AttachmentType<T>> type) Removes the data attachment of the given type.default <T> T
IAttachmentHolder.setData
(Supplier<AttachmentType<T>> type, T data) Sets the data attachment of the given type. -
Uses of AttachmentType in net.neoforged.neoforge.registries
Fields in net.neoforged.neoforge.registries with type parameters of type AttachmentTypeModifier and TypeFieldDescriptionstatic final Registry
<AttachmentType<?>> NeoForgeRegistries.ATTACHMENT_TYPES
static final ResourceKey
<Registry<AttachmentType<?>>> NeoForgeRegistries.Keys.ATTACHMENT_TYPES
-
Uses of AttachmentType in net.neoforged.testframework.impl.reg
Fields in net.neoforged.testframework.impl.reg with type parameters of type AttachmentTypeModifier and TypeFieldDescriptionprivate final RegistrationHelperImpl.DeferredRegistrar
<AttachmentType<?>, DeferredAttachmentTypes> RegistrationHelperImpl.attachments
-
Uses of AttachmentType in net.neoforged.testframework.registration
Methods in net.neoforged.testframework.registration that return AttachmentTypeModifier and TypeMethodDescription<T> AttachmentType
<T> DeferredAttachmentTypes.register
(String name, Supplier<T> defaultValue, UnaryOperator<AttachmentType.Builder<T>> factory) <T> AttachmentType
<T> DeferredAttachmentTypes.registerSimpleAttachment
(String name, Supplier<T> defaultValue)