Package com.hbm_m.block.entity.machines
Class MachineShredderBlockEntity
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.MachineShredderBlockEntity
- 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>
Шреддер машина - перерабатывает предметы в пыль/скрап
Основан на оригинальной версии из 1.7.10
-
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
FieldsFields 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
ConstructorsConstructorDescriptionMachineShredderBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleannet.minecraft.world.inventory.AbstractContainerMenucreateMenu(int containerId, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player player) voiddrops()net.minecraft.world.inventory.ContainerDataprotected net.minecraft.network.chat.ComponentintgetDiFurnaceProgressScaled(int i) net.minecraft.network.chat.ComponentintПолучить состояние левого лезвия (как в оригинале)intПолучить состояние правого лезвия (как в оригинале)booleanВозвращает состояние активности машины.longintlonggetPower()longgetPowerScaled(long i) intnet.minecraft.nbt.CompoundTagbooleanhasPower()protected booleanisItemValidForSlot(int slot, net.minecraft.world.item.ItemStack stack) booleanvoidload(net.minecraft.nbt.CompoundTag tag) protected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidstatic voidtick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, MachineShredderBlockEntity blockEntity) Methods inherited from class com.hbm_m.block.entity.BaseMachineBlockEntity
canConnectEnergy, canExtract, canReceive, chargeFromBatterySlot, chargeItemInSlot, createGhostItemsFromIngredients, createInventoryHandler, dropInventoryContents, ensureNetworkInitialized, extractEnergy, getCapability, getEnergyDelta, getEnergyStored, getGhostItems, getInventory, getMaxEnergyStored, getPriority, getProvideSpeed, getReceiveSpeed, getRenderBoundingBox, getUpdatePacket, handleUpdateTag, invalidateCaps, isCriticalSlot, isEnergyProviderItem, isEnergyReceiverItem, onDataPacket, onLoad, receiveEnergy, sendUpdateToClient, setEnergyCapacity, setEnergyStored, setLevel, 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
-
MAX_POWER
public static final long MAX_POWER- See Also:
-
PROCESSING_SPEED
public static final int PROCESSING_SPEED- See Also:
-
-
Constructor Details
-
MachineShredderBlockEntity
public MachineShredderBlockEntity(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) -
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classBaseMachineBlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classBaseMachineBlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classBaseMachineBlockEntity
-
setRemoved
public void setRemoved()- Overrides:
setRemovedin classBaseMachineBlockEntity
-
drops
public void drops() -
tick
public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, MachineShredderBlockEntity blockEntity) -
getIsActive
public boolean getIsActive()Возвращает состояние активности машины. На клиенте возвращает clientIsActive, на сервере - isActive. Аналогично isCrafting() в Advanced Assembler. -
hasPower
public boolean hasPower() -
getPower
public long getPower() -
getMaxPower
public long getMaxPower() -
getPowerScaled
public long getPowerScaled(long i) -
canProcess
public boolean canProcess() -
getGearLeft
public int getGearLeft()Получить состояние левого лезвия (как в оригинале)- Returns:
- 0 = нет лезвия, 1 = хорошее, 2 = изношенное, 3 = сломанное
-
getGearRight
public int getGearRight()Получить состояние правого лезвия (как в оригинале)- Returns:
- 0 = нет лезвия, 1 = хорошее, 2 = изношенное, 3 = сломанное
-
getDiFurnaceProgressScaled
public int getDiFurnaceProgressScaled(int i) -
isProcessing
public boolean isProcessing() -
getProgress
public int getProgress() -
getMaxProgress
public int getMaxProgress() -
getContainerData
public net.minecraft.world.inventory.ContainerData getContainerData()
-