Class TackleBoxBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.wdiscute.starcatcher.blocks.tacklebox.TackleBoxBlockEntity
- All Implemented Interfaces:
TickableBlockEntity, Iterable<net.minecraft.world.item.ItemStack>, net.minecraft.core.TypedInstance<net.minecraft.world.level.block.entity.BlockEntityType<?>>, net.minecraft.util.debug.DebugValueSource, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.entity.SlotProvider, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.MenuProvider, net.minecraft.world.WorldlyContainer, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.ContainerExtension, net.neoforged.neoforge.common.extensions.IBlockEntityExtension, net.neoforged.neoforge.common.extensions.IMenuProviderExtension
public class TackleBoxBlockEntity
extends net.minecraft.world.level.block.entity.BlockEntity
implements net.minecraft.world.WorldlyContainer, TickableBlockEntity, net.minecraft.world.MenuProvider
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsFieldNested classes/interfaces inherited from interface net.minecraft.world.Container
net.minecraft.world.Container.ContainerIteratorNested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource
net.minecraft.util.debug.DebugValueSource.Registration, net.minecraft.util.debug.DebugValueSource.ValueGetter<T> -
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionTackleBoxBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState) TackleBoxBlockEntity(net.minecraft.world.item.DyeColor color, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyImplicitComponents(net.minecraft.core.component.DataComponentGetter components) booleancanPlaceItem(int slot, net.minecraft.world.item.ItemStack stack) booleancanPlaceItemThroughFace(int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction) booleancanTakeItemThroughFace(int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction) voidprotected voidcollectImplicitComponents(net.minecraft.core.component.DataComponentMap.Builder components) @Nullable net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player player) net.minecraft.world.item.DyeColorgetColor()intnet.minecraft.network.chat.Componentnet.minecraft.world.item.ItemStackgetItem(int i) protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()int[]getSlotsForFace(net.minecraft.core.Direction side) booleanisEmpty()protected voidloadAdditional(net.minecraft.world.level.storage.ValueInput input) static voidloadAllFishes(net.minecraft.world.level.storage.ValueInput input, List<net.minecraft.world.item.ItemStack> itemStacks) voidpreRemoveSideEffects(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) net.minecraft.world.item.ItemStackremoveItem(int slot, int amount) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int slot) protected voidsaveAdditional(net.minecraft.world.level.storage.ValueOutput output) static voidsaveAllFishes(net.minecraft.world.level.storage.ValueOutput output, List<net.minecraft.world.item.ItemStack> itemStacks, boolean alsoWhenEmpty) voidsetItem(int slot, net.minecraft.world.item.ItemStack stack) voidstartOpen(net.minecraft.world.entity.ContainerUser containerUser) booleanstillValid(net.minecraft.world.entity.player.Player player) voidstopOpen(net.minecraft.world.entity.ContainerUser containerUser) voidtick()booleantriggerEvent(int id, int type) voidMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, clearRemoved, collectComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, problemPath, registerDebugValues, removeComponentsFromTag, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, typeHolderMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getEntitiesWithContainerOpen, getMaxStackSize, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, iterator, setChangedMethods inherited from interface net.neoforged.neoforge.common.extensions.ContainerExtension
onTransfer, setItemMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface net.neoforged.neoforge.common.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideDataMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.world.entity.SlotProvider
getSlotsFromRangeMethods inherited from interface net.minecraft.core.TypedInstance
is, is, is, is, is, tags
-
Field Details
-
openCount
public int openCount
-
-
Constructor Details
-
TackleBoxBlockEntity
public TackleBoxBlockEntity(@Nullable net.minecraft.world.item.DyeColor color, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState) -
TackleBoxBlockEntity
public TackleBoxBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState)
-
-
Method Details
-
tick
public void tick()- Specified by:
tickin interfaceTickableBlockEntity
-
updateFishSlot
public void updateFishSlot() -
applyImplicitComponents
protected void applyImplicitComponents(net.minecraft.core.component.DataComponentGetter components) - Overrides:
applyImplicitComponentsin classnet.minecraft.world.level.block.entity.BlockEntity
-
collectImplicitComponents
protected void collectImplicitComponents(net.minecraft.core.component.DataComponentMap.Builder components) - Overrides:
collectImplicitComponentsin classnet.minecraft.world.level.block.entity.BlockEntity
-
preRemoveSideEffects
public void preRemoveSideEffects(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Overrides:
preRemoveSideEffectsin classnet.minecraft.world.level.block.entity.BlockEntity
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.Container
-
getItem
public net.minecraft.world.item.ItemStack getItem(int i) - Specified by:
getItemin interfacenet.minecraft.world.Container
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int slot, int amount) - Specified by:
removeItemin interfacenet.minecraft.world.Container
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container
-
setItem
public void setItem(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container
-
getSlotsForFace
public int[] getSlotsForFace(net.minecraft.core.Direction side) - Specified by:
getSlotsForFacein interfacenet.minecraft.world.WorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction) - Specified by:
canPlaceItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.core.Direction direction) - Specified by:
canTakeItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canPlaceItem
public boolean canPlaceItem(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
canPlaceItemin interfacenet.minecraft.world.Container
-
triggerEvent
public boolean triggerEvent(int id, int type) - Overrides:
triggerEventin classnet.minecraft.world.level.block.entity.BlockEntity
-
startOpen
public void startOpen(net.minecraft.world.entity.ContainerUser containerUser) - Specified by:
startOpenin interfacenet.minecraft.world.Container
-
stopOpen
public void stopOpen(net.minecraft.world.entity.ContainerUser containerUser) - Specified by:
stopOpenin interfacenet.minecraft.world.Container
-
loadAdditional
protected void loadAdditional(net.minecraft.world.level.storage.ValueInput input) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
loadAllFishes
public static void loadAllFishes(net.minecraft.world.level.storage.ValueInput input, List<net.minecraft.world.item.ItemStack> itemStacks) -
saveAdditional
protected void saveAdditional(net.minecraft.world.level.storage.ValueOutput output) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
saveAllFishes
public static void saveAllFishes(net.minecraft.world.level.storage.ValueOutput output, List<net.minecraft.world.item.ItemStack> itemStacks, boolean alsoWhenEmpty) -
getItems
protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems() -
getColor
@Nullable public net.minecraft.world.item.DyeColor getColor() -
clearContent
public void clearContent()- Specified by:
clearContentin interfacenet.minecraft.world.Clearable
-
getDisplayName
public net.minecraft.network.chat.Component getDisplayName()- Specified by:
getDisplayNamein interfacenet.minecraft.world.MenuProvider
-
createMenu
@Nullable public @Nullable net.minecraft.world.inventory.AbstractContainerMenu createMenu(int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player player) - Specified by:
createMenuin interfacenet.minecraft.world.inventory.MenuConstructor
-