Class SkullBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.SkullBlockEntity
- All Implemented Interfaces:
IAttachmentHolder
,IBlockEntityExtension
- Direct Known Subclasses:
CustomHeadTest.CustomSkullBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
static final Executor
private Component
private boolean
private static final org.slf4j.Logger
private static Executor
private ResourceLocation
private ResolvableProfile
private static com.google.common.cache.LoadingCache
<UUID, CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> private static com.google.common.cache.LoadingCache
<String, CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> private static final String
private static final String
private static final String
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
animation
(Level pLevel, BlockPos pPos, BlockState pState, SkullBlockEntity pBlockEntity) protected void
applyImplicitComponents
(BlockEntity.DataComponentInput pComponentInput) static void
clear()
protected void
collectImplicitComponents
(DataComponentMap.Builder pComponents) static CompletableFuture
<Optional<com.mojang.authlib.GameProfile>> fetchGameProfile
(String pProfileName) static CompletableFuture
<Optional<com.mojang.authlib.GameProfile>> fetchGameProfile
(UUID pProfileUuid) (package private) static CompletableFuture
<Optional<com.mojang.authlib.GameProfile>> fetchProfileById
(UUID pId, Services pServices, BooleanSupplier pCacheUninitialized) (package private) static CompletableFuture
<Optional<com.mojang.authlib.GameProfile>> fetchProfileByName
(String pName, Services pServices) float
getAnimation
(float pPartialTick) getUpdateTag
(HolderLookup.Provider pRegistries) protected void
loadAdditional
(CompoundTag pTag, HolderLookup.Provider pRegistries) void
protected void
saveAdditional
(CompoundTag pTag, HolderLookup.Provider pRegistries) void
setOwner
(ResolvableProfile p_332738_) static void
private void
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
TAG_PROFILE
- See Also:
-
TAG_NOTE_BLOCK_SOUND
- See Also:
-
TAG_CUSTOM_NAME
- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
mainThreadExecutor
-
profileCacheByName
@Nullable private static com.google.common.cache.LoadingCache<String,CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> profileCacheByName -
profileCacheById
@Nullable private static com.google.common.cache.LoadingCache<UUID,CompletableFuture<Optional<com.mojang.authlib.GameProfile>>> profileCacheById -
CHECKED_MAIN_THREAD_EXECUTOR
-
owner
-
noteBlockSound
-
animationTickCount
private int animationTickCount -
isAnimating
private boolean isAnimating -
customName
-
-
Constructor Details
-
SkullBlockEntity
-
-
Method Details
-
setup
-
fetchProfileByName
static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfileByName(String pName, Services pServices) -
fetchProfileById
static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchProfileById(UUID pId, Services pServices, BooleanSupplier pCacheUninitialized) -
clear
public static void clear() -
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-
animation
public static void animation(Level pLevel, BlockPos pPos, BlockState pState, SkullBlockEntity pBlockEntity) -
getAnimation
public float getAnimation(float pPartialTick) -
getOwnerProfile
-
getNoteBlockSound
-
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
setOwner
-
updateOwnerProfile
private void updateOwnerProfile() -
fetchGameProfile
public static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchGameProfile(String pProfileName) -
fetchGameProfile
public static CompletableFuture<Optional<com.mojang.authlib.GameProfile>> fetchGameProfile(UUID pProfileUuid) -
applyImplicitComponents
- Overrides:
applyImplicitComponents
in classBlockEntity
-
collectImplicitComponents
- Overrides:
collectImplicitComponents
in classBlockEntity
-
removeComponentsFromTag
- Overrides:
removeComponentsFromTag
in classBlockEntity
-