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>

public class MachineShredderBlockEntity extends BaseMachineBlockEntity
Шреддер машина - перерабатывает предметы в пыль/скрап Основан на оригинальной версии из 1.7.10
  • Field Details

  • 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:
      getDefaultName in class BaseMachineBlockEntity
    • getDisplayName

      public net.minecraft.network.chat.Component getDisplayName()
    • isItemValidForSlot

      protected boolean isItemValidForSlot(int slot, net.minecraft.world.item.ItemStack stack)
      Specified by:
      isItemValidForSlot in class BaseMachineBlockEntity
    • 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:
      saveAdditional in class BaseMachineBlockEntity
    • getUpdateTag

      public net.minecraft.nbt.CompoundTag getUpdateTag()
      Overrides:
      getUpdateTag in class BaseMachineBlockEntity
    • load

      public void load(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      load in class BaseMachineBlockEntity
    • setRemoved

      public void setRemoved()
      Overrides:
      setRemoved in class BaseMachineBlockEntity
    • 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()