Package com.hbm_m.block.entity.machines
Class MachineAssemblerBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.hbm_m.block.entity.BaseMachineBlockEntity
com.hbm_m.block.entity.machines.MachineAssemblerBlockEntity
- All Implemented Interfaces:
IEnergyConnector,IEnergyProvider,IEnergyReceiver,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.MenuProvider,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Сборочная машина (Assembler) - мультиблочная структура для автоматизированного крафта.
Адаптировано для long-энергосистемы с наследованием от BaseMachineBlockEntity.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>>Nested classes/interfaces inherited from interface com.hbm_m.interfaces.IEnergyReceiver
IEnergyReceiver.Priority -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.world.inventory.ContainerDataFields inherited from class com.hbm_m.block.entity.BaseMachineBlockEntity
capacity, energy, inventory, itemHandler, maxExtract, maxReceive, networkInitializedFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionMachineAssemblerBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.inventory.AbstractContainerMenucreateMenu(int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player player) <T> net.minecraftforge.common.util.LazyOptional<T>getCapability(net.minecraftforge.common.capabilities.Capability<T> cap, net.minecraft.core.Direction side) net.minecraft.world.item.ItemStackCached recipe output icon for BER; refreshed when assembly template slot changes.protected net.minecraft.network.chat.Componentnet.minecraft.network.chat.Componentnet.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler>net.minecraft.world.phys.AABBРендер-баундинг бокс по умолчанию.net.minecraft.nbt.CompoundTagvoidbooleanprotected booleanisItemValidForSlot(int slot, net.minecraft.world.item.ItemStack stack) voidload(net.minecraft.nbt.CompoundTag tag) protected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidsetCrafting(boolean crafting) voidsetLevel(net.minecraft.world.level.Level pLevel) voidstatic voidtick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, MachineAssemblerBlockEntity entity) Methods inherited from class com.hbm_m.block.entity.BaseMachineBlockEntity
canConnectEnergy, canExtract, canReceive, chargeFromBatterySlot, chargeItemInSlot, createGhostItemsFromIngredients, createInventoryHandler, dropInventoryContents, ensureNetworkInitialized, extractEnergy, getEnergyDelta, getEnergyStored, getInventory, getMaxEnergyStored, getPriority, getProvideSpeed, getReceiveSpeed, getUpdatePacket, handleUpdateTag, isCriticalSlot, isEnergyProviderItem, isEnergyReceiverItem, onDataPacket, onLoad, receiveEnergy, sendUpdateToClient, setEnergyCapacity, setEnergyStored, setupFluidCapability, updateEnergyDeltaMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, hasCustomOutlineRendering, requestModelDataUpdate, serializeNBT
-
Field Details
-
data
protected final net.minecraft.world.inventory.ContainerData data
-
-
Constructor Details
-
MachineAssemblerBlockEntity
public MachineAssemblerBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getDefaultName
protected net.minecraft.network.chat.Component getDefaultName()- Specified by:
getDefaultNamein classBaseMachineBlockEntity
-
getDisplayName
public net.minecraft.network.chat.Component getDisplayName() -
isItemValidForSlot
protected boolean isItemValidForSlot(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
isItemValidForSlotin classBaseMachineBlockEntity
-
createMenu
@Nullable public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player player) -
getItemHandlerForPart
public net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler> getItemHandlerForPart(PartRole role) -
tick
public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, MachineAssemblerBlockEntity entity) -
getGhostItems
public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getGhostItems()- Overrides:
getGhostItemsin classBaseMachineBlockEntity
-
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classBaseMachineBlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classBaseMachineBlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classBaseMachineBlockEntity
-
getCapability
public <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(@NotNull net.minecraftforge.common.capabilities.Capability<T> cap, @Nullable net.minecraft.core.Direction side) - Specified by:
getCapabilityin interfacenet.minecraftforge.common.capabilities.ICapabilityProvider- Overrides:
getCapabilityin classBaseMachineBlockEntity
-
invalidateCaps
public void invalidateCaps()- Specified by:
invalidateCapsin interfacenet.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>- Overrides:
invalidateCapsin classBaseMachineBlockEntity
-
getClientRecipeIcon
public net.minecraft.world.item.ItemStack getClientRecipeIcon()Cached recipe output icon for BER; refreshed when assembly template slot changes. -
setCrafting
public void setCrafting(boolean crafting) -
isCrafting
public boolean isCrafting() -
getRenderBoundingBox
public net.minecraft.world.phys.AABB getRenderBoundingBox()Description copied from class:BaseMachineBlockEntityРендер-баундинг бокс по умолчанию. На Forge это@Overrideметода из BlockEntity, на Fabric — обычный public метод. Подклассы могут переопределить для мультиблоков с увеличенным размером.- Specified by:
getRenderBoundingBoxin interfacenet.minecraftforge.common.extensions.IForgeBlockEntity- Overrides:
getRenderBoundingBoxin classBaseMachineBlockEntity
-
setLevel
public void setLevel(net.minecraft.world.level.Level pLevel) - Overrides:
setLevelin classBaseMachineBlockEntity
-
setRemoved
public void setRemoved()- Overrides:
setRemovedin classBaseMachineBlockEntity
-