Class EnchantmentBaseBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
de.cheaterpaul.enchantmentmachine.block.entity.EnchantmentBaseBlockEntity
- All Implemented Interfaces:
IEnchantmentMachine,net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.MenuProvider,net.minecraft.world.Nameable,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.client.extensions.IMenuProviderExtension,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
- Direct Known Subclasses:
DisenchanterBlockEntity,EnchanterBlockEntity
public abstract class EnchantmentBaseBlockEntity
extends net.minecraft.world.level.block.entity.BaseContainerBlockEntity
implements IEnchantmentMachine
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
ConstructorsConstructorDescriptionEnchantmentBaseBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> tileEntityType, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidloadAdditional(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider provider) voidonNeighbourChanged(net.minecraft.world.level.LevelReader iWorld, net.minecraft.core.BlockPos neighborPos) protected voidsaveAdditional(@NotNull net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider provider) booleanstillValid(net.minecraft.world.entity.player.Player playerEntity) Methods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
applyImplicitComponents, canOpen, canUnlock, clearContent, collectImplicitComponents, createMenu, createMenu, getCustomName, getDefaultName, getDisplayName, getItem, getItems, getName, isEmpty, removeComponentsFromTag, removeItem, removeItemNoUpdate, setItem, setItemsMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getContainerSize, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpenMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpenMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Constructor Details
-
EnchantmentBaseBlockEntity
public EnchantmentBaseBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> tileEntityType, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
stillValid
public boolean stillValid(@Nonnull net.minecraft.world.entity.player.Player playerEntity) - Specified by:
stillValidin interfacenet.minecraft.world.Container- Overrides:
stillValidin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getConnectedEnchantmentTE
- Specified by:
getConnectedEnchantmentTEin interfaceIEnchantmentMachine
-
onNeighbourChanged
public void onNeighbourChanged(net.minecraft.world.level.LevelReader iWorld, net.minecraft.core.BlockPos neighborPos) -
hasConnectedTE
public boolean hasConnectedTE()- Specified by:
hasConnectedTEin interfaceIEnchantmentMachine- Returns:
- Whether an associated block pos is present. In most cases this should mean that getConnectedEnchantmentTE returns non empty TE
-
saveAdditional
protected void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
loadAdditional
public void loadAdditional(@Nonnull net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-