Package hiiragi283.lib.block.entity
Class HTBlockEntity
-
- All Implemented Interfaces:
-
hiiragi283.lib.block.entity.HTAbstractBlockEntity,hiiragi283.lib.block.entity.HTOwnedBlockEntity,hiiragi283.lib.block.entity.HTSoundPlayerBlockEntity,hiiragi283.lib.transfer.HTHandlerProvider,net.minecraft.core.TypedInstance,net.minecraft.util.debug.DebugValueSource,net.minecraft.world.Nameable,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension,net.neoforged.neoforge.common.extensions.TypedInstanceExtension,net.neoforged.neoforge.registries.datamaps.IWithData
public abstract class HTBlockEntity extends HTExtendedBlockEntity implements Nameable, HTHandlerProvider, HTOwnedBlockEntity, HTSoundPlayerBlockEntity
-
-
Field Summary
Fields Modifier and Type Field Description private final Integerticksprivate UUIDownerIdprivate final Set<AttachmentType<?>>andClearAttachmentTypesToSyncprivate final BlockEntityType<?>typeprivate final ModelDatamodelDataprivate final BlockPosblockPosprivate final CompoundTagpersistentDataprivate final StringnameForReportingprivate BlockStateblockStateprivate final BooleanisRemovedprivate final ClientboundBlockEntityDataPacketupdatePacketprivate final StringplainTextNameprivate final Levellevelprivate final Componentnameprivate final ComponentcustomNameprivate final ComponentdisplayName
-
Constructor Summary
Constructors Constructor Description HTBlockEntity(BlockEntityType<?> type, BlockPos worldPosition, BlockState blockState)
-
Method Summary
Modifier and Type Method Description final IntegergetTicks()final UUIDgetOwnerId()final UnitsetOwnerId(UUID value)final ComponentgetName()final ComponentgetCustomName()UUIDgetOwner()保持している所有者のUUIDを取得します。 UnitaddMenuTrackers(HTSyncableMenu menu)final BooleanhasFluidHandler()final List<HTResourceSlot<FluidResource>>getFluidTanks(Direction side)final HTResourceSlot<FluidResource>getFluidTank(Direction side, Integer index)final ResourceHandler<FluidResource>getFluidHandler(Direction direction)指定した面からFluidResourceHandlerを取得します。 final BooleanhasItemHandler()final List<HTResourceSlot<ItemResource>>getItemSlots(Direction side)final HTResourceSlot<ItemResource>getItemSlot(Direction side, Integer index)final ResourceHandler<ItemResource>getItemHandler(Direction direction)指定した面からItemResourceHandlerを取得します。 UnitpreRemoveSideEffects(BlockPos pos, BlockState state)UnitonBlockRemoved(BlockState state, Level level, BlockPos pos)final static UnittickClient(Level level, BlockPos pos, BlockState state, HTBlockEntity blockEntity)final static UnittickServer(Level level, BlockPos pos, BlockState state, HTBlockEntity blockEntity)-
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadWithComponents, problemPath, removeComponentsFromTag, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setComponents, setLevel, setRemoved, triggerEvent -
Methods inherited from class net.neoforged.neoforge.common.extensions.IBlockEntityExtension
applyStructureRotation, getModelData, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onLoad, requestModelDataUpdate -
Methods inherited from class hiiragi283.lib.block.entity.HTBlockEntity
getBlockPos, getCustomName, getLevel, getName -
Methods inherited from class hiiragi283.lib.block.entity.HTExtendedBlockEntity
createReducedUpdateTag, createReporter, getComparatorOutput, getUpdatePacket, getUpdatePacket, getUpdateTag, handleUpdateTag, neighborChanged, onDataPacket, readUpdateTag, sendUpdatePacket, setChanged, writeReducedUpdateTag -
Methods inherited from class net.minecraft.world.Nameable
getDisplayName, getPlainTextName, hasCustomName -
Methods inherited from class net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getData, getExistingData, getExistingData, getExistingDataOrNull, getExistingDataOrNull, hasAttachments, hasData, hasData, removeData, removeData, setData, setData, syncData, syncData -
Methods inherited from class net.minecraft.core.TypedInstance
is, is, is, is, is, tags, typeHolder -
Methods inherited from class net.minecraft.util.debug.DebugValueSource
registerDebugValues -
Methods inherited from class net.neoforged.neoforge.registries.datamaps.IWithData
getData -
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
serializeAttachments -
Methods inherited from class hiiragi283.lib.block.entity.HTAbstractBlockEntity
getRegistryAccess, getServerLevel -
Methods inherited from class hiiragi283.lib.block.entity.HTOwnedBlockEntity
getFakePlayer, getOwnerName, getOwnerOrFake, getOwnerPlayer, getOwnerPlayer -
Methods inherited from class hiiragi283.lib.block.entity.HTSoundPlayerBlockEntity
getSoundPos, getSoundSource, playSound -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getOwnerId
final UUID getOwnerId()
-
setOwnerId
final Unit setOwnerId(UUID value)
-
getName
final Component getName()
-
getCustomName
final Component getCustomName()
-
addMenuTrackers
Unit addMenuTrackers(HTSyncableMenu menu)
-
hasFluidHandler
final Boolean hasFluidHandler()
-
getFluidTanks
final List<HTResourceSlot<FluidResource>> getFluidTanks(Direction side)
-
getFluidTank
final HTResourceSlot<FluidResource> getFluidTank(Direction side, Integer index)
-
getFluidHandler
final ResourceHandler<FluidResource> getFluidHandler(Direction direction)
指定した面からFluidResourceHandlerを取得します。
- Returns:
取得できなかった場合は
null
-
hasItemHandler
final Boolean hasItemHandler()
-
getItemSlots
final List<HTResourceSlot<ItemResource>> getItemSlots(Direction side)
-
getItemSlot
final HTResourceSlot<ItemResource> getItemSlot(Direction side, Integer index)
-
getItemHandler
final ResourceHandler<ItemResource> getItemHandler(Direction direction)
指定した面からItemResourceHandlerを取得します。
- Returns:
取得できなかった場合は
null
-
preRemoveSideEffects
Unit preRemoveSideEffects(BlockPos pos, BlockState state)
-
onBlockRemoved
Unit onBlockRemoved(BlockState state, Level level, BlockPos pos)
-
tickClient
final static Unit tickClient(Level level, BlockPos pos, BlockState state, HTBlockEntity blockEntity)
-
tickServer
final static Unit tickServer(Level level, BlockPos pos, BlockState state, HTBlockEntity blockEntity)
-
-
-
-