Class TeslaSynthesizerBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
tech.anonymoushacker1279.immersiveweapons.blockentity.TeslaSynthesizerBlockEntity
- All Implemented Interfaces:
Iterable<net.minecraft.world.item.ItemStack>,net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.inventory.StackedContentsCompatible,net.minecraft.world.MenuProvider,net.minecraft.world.Nameable,net.minecraft.world.WorldlyContainer,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension,net.neoforged.neoforge.common.extensions.IMenuProviderExtension
public class TeslaSynthesizerBlockEntity
extends net.minecraft.world.level.block.entity.BaseContainerBlockEntity
implements net.minecraft.world.WorldlyContainer, net.minecraft.world.inventory.StackedContentsCompatible
-
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.ContainerIterator -
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
ConstructorsConstructorDescriptionTeslaSynthesizerBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItem(int slot, net.minecraft.world.item.ItemStack stack) booleancanPlaceItemThroughFace(int slot, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.core.Direction direction) booleancanTakeItemThroughFace(int slot, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction direction) voidprotected net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int id, net.minecraft.world.entity.player.Inventory inventory) voidfillStackedContents(net.minecraft.world.entity.player.StackedItemContents contents) intprotected net.minecraft.network.chat.Componentnet.minecraft.world.item.ItemStackgetItem(int slot) protected net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItems()int[]getSlotsForFace(net.minecraft.core.Direction side) net.minecraft.nbt.CompoundTaggetUpdateTag(net.minecraft.core.HolderLookup.Provider registries) booleanChecks if fuel is currently burningbooleanisEmpty()static booleanisFuel(net.minecraft.world.item.ItemStack stack) Checks if an item is valid fuel for the Tesla SynthesizervoidloadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) net.minecraft.world.item.ItemStackremoveItem(int slot, int amount) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int slot) protected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) voidsetItem(int slot, net.minecraft.world.item.ItemStack stack) protected voidsetItems(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items) booleanstillValid(net.minecraft.world.entity.player.Player player) voidtick(net.minecraft.server.level.ServerLevel level) Processes recipes and manages fuel consumption each tickMethods 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, parseCustomNameSafe, preRemoveSideEffects, removeData, saveCustomAndMetadata, saveCustomOnly, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, 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, iterator, setChanged, startOpen, stopOpenMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdateMethods inherited from interface net.neoforged.neoforge.common.extensions.IMenuProviderExtension
shouldTriggerClientSideContainerClosingOnOpen, writeClientSideDataMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
containerData
public final net.minecraft.world.inventory.ContainerData containerData
-
-
Constructor Details
-
TeslaSynthesizerBlockEntity
public TeslaSynthesizerBlockEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
-
-
Method Details
-
isFuel
public static boolean isFuel(net.minecraft.world.item.ItemStack stack) Checks if an item is valid fuel for the Tesla Synthesizer- Parameters:
stack- The ItemStack to check- Returns:
- true if the item is valid fuel
-
tick
public void tick(net.minecraft.server.level.ServerLevel level) Processes recipes and manages fuel consumption each tick -
isBurning
public boolean isBurning()Checks if fuel is currently burning- Returns:
- true if burning
-
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 stack, @Nullable @Nullable net.minecraft.core.Direction direction) - Specified by:
canPlaceItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int slot, net.minecraft.world.item.ItemStack stack, 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
-
getDefaultName
protected net.minecraft.network.chat.Component getDefaultName()- Specified by:
getDefaultNamein 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> items) - Specified by:
setItemsin 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
public net.minecraft.world.item.ItemStack getItem(int slot) - Specified by:
getItemin interfacenet.minecraft.world.Container- Overrides:
getItemin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int slot, int amount) - Specified by:
removeItemin interfacenet.minecraft.world.Container- Overrides:
removeItemin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container- Overrides:
removeItemNoUpdatein classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
setItem
public void setItem(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container- Overrides:
setItemin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container- Overrides:
stillValidin 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
-
loadAdditional
public void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag(net.minecraft.core.HolderLookup.Provider registries) - Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
fillStackedContents
public void fillStackedContents(net.minecraft.world.entity.player.StackedItemContents contents) - Specified by:
fillStackedContentsin interfacenet.minecraft.world.inventory.StackedContentsCompatible
-
createMenu
protected net.minecraft.world.inventory.AbstractContainerMenu createMenu(int id, net.minecraft.world.entity.player.Inventory inventory) - Specified by:
createMenuin classnet.minecraft.world.level.block.entity.BaseContainerBlockEntity
-