Class DisenchanterBlockEntity
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
de.cheaterpaul.enchantmentmachine.block.entity.DisenchanterBlockEntity
- All Implemented Interfaces:
IEnchantmentMachine,net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.level.block.entity.Hopper,net.minecraft.world.MenuProvider,net.minecraft.world.Nameable,net.minecraft.world.WorldlyContainer,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.client.extensions.IMenuProviderExtension,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
public class DisenchanterBlockEntity
extends EnchantmentBaseBlockEntity
implements net.minecraft.world.WorldlyContainer, net.minecraft.world.level.block.entity.Hopper
-
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_BUFFERFields inherited from interface net.minecraft.world.level.block.entity.Hopper
SUCK_AABB -
Constructor Summary
ConstructorsConstructorDescriptionDisenchanterBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItem(int index, net.minecraft.world.item.ItemStack stack) booleancanPlaceItemThroughFace(int index, net.minecraft.world.item.ItemStack itemStackIn, net.minecraft.core.Direction direction) booleancanTakeItemThroughFace(int index, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction direction) voidprotected net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int i, net.minecraft.world.entity.player.Inventory playerInventory) intprotected net.minecraft.network.chat.Componentnet.minecraft.world.item.ItemStackgetItem(int i) protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()doubledoubledoubleint[]getSlotsForFace(net.minecraft.core.Direction side) net.minecraft.nbt.CompoundTaggetUpdateTag(net.minecraft.core.HolderLookup.Provider provider) booleanisEmpty()booleanvoidloadAdditional(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider provider) voidonDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt, net.minecraft.core.HolderLookup.Provider provider) net.minecraft.world.item.ItemStackremoveItem(int i, int i1) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int i) protected voidsaveAdditional(@NotNull net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider provider) static voidserverTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState state, DisenchanterBlockEntity entity) voidsetItem(int i, net.minecraft.world.item.ItemStack itemStack) protected voidsetItems(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> nonNullList) Methods inherited from class de.cheaterpaul.enchantmentmachine.block.entity.EnchantmentBaseBlockEntity
getConnectedEnchantmentTE, hasConnectedTE, onNeighbourChanged, stillValidMethods inherited from class net.minecraft.world.level.block.entity.BaseContainerBlockEntity
applyImplicitComponents, canOpen, canUnlock, collectImplicitComponents, createMenu, getCustomName, getDisplayName, getName, removeComponentsFromTagMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, 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
canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stillValid, stopOpenMethods inherited from interface net.minecraft.world.level.block.entity.Hopper
getSuckAabbMethods 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, onLoad, requestModelDataUpdateMethods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpenMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Constructor Details
-
DisenchanterBlockEntity
public DisenchanterBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getDefaultName
@Nonnull protected net.minecraft.network.chat.Component getDefaultName()- Specified by:
getDefaultNamein classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
createMenu
@Nonnull protected net.minecraft.world.inventory.AbstractContainerMenu createMenu(int i, @Nonnull net.minecraft.world.entity.player.Inventory playerInventory) - Specified by:
createMenuin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.Container- Overrides:
isEmptyin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getItem
@Nonnull public net.minecraft.world.item.ItemStack getItem(int i) - Specified by:
getItemin interfacenet.minecraft.world.Container- Overrides:
getItemin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
removeItem
@Nonnull public net.minecraft.world.item.ItemStack removeItem(int i, int i1) - Specified by:
removeItemin interfacenet.minecraft.world.Container- Overrides:
removeItemin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
removeItemNoUpdate
@Nonnull public net.minecraft.world.item.ItemStack removeItemNoUpdate(int i) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container- Overrides:
removeItemNoUpdatein classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
setItem
public void setItem(int i, @Nonnull net.minecraft.world.item.ItemStack itemStack) - Specified by:
setItemin interfacenet.minecraft.world.Container- Overrides:
setItemin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getItems
protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()- Specified by:
getItemsin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
setItems
protected void setItems(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> nonNullList) - Specified by:
setItemsin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
clearContent
public void clearContent()- Specified by:
clearContentin interfacenet.minecraft.world.Clearable- Overrides:
clearContentin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getLevelX
public double getLevelX()- Specified by:
getLevelXin interfacenet.minecraft.world.level.block.entity.Hopper
-
getSlotsForFace
@Nonnull public int[] getSlotsForFace(@Nonnull net.minecraft.core.Direction side) - Specified by:
getSlotsForFacein interfacenet.minecraft.world.WorldlyContainer
-
canPlaceItem
public boolean canPlaceItem(int index, @Nonnull net.minecraft.world.item.ItemStack stack) - Specified by:
canPlaceItemin interfacenet.minecraft.world.Container
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int index, @Nonnull net.minecraft.world.item.ItemStack itemStackIn, @Nullable net.minecraft.core.Direction direction) - Specified by:
canPlaceItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int index, @Nonnull net.minecraft.world.item.ItemStack stack, @Nonnull net.minecraft.core.Direction direction) - Specified by:
canTakeItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
loadAdditional
public void loadAdditional(@Nonnull net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
loadAdditionalin classEnchantmentBaseBlockEntity
-
saveAdditional
protected void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
saveAdditionalin classEnchantmentBaseBlockEntity
-
getUpdateTag
@Nonnull public net.minecraft.nbt.CompoundTag getUpdateTag(net.minecraft.core.HolderLookup.Provider provider) - Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
onDataPacket
public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt, net.minecraft.core.HolderLookup.Provider provider) - Specified by:
onDataPacketin interfacenet.neoforged.neoforge.common.extensions.IBlockEntityExtension
-
getLevelY
public double getLevelY()- Specified by:
getLevelYin interfacenet.minecraft.world.level.block.entity.Hopper
-
getLevelZ
public double getLevelZ()- Specified by:
getLevelZin interfacenet.minecraft.world.level.block.entity.Hopper
-
isGridAligned
public boolean isGridAligned()- Specified by:
isGridAlignedin interfacenet.minecraft.world.level.block.entity.Hopper
-
serverTick
public static void serverTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState state, DisenchanterBlockEntity entity)
-