Class SoyuzLauncherBlockEntity

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.blockentity.BaseMachineBlockEntity
com.hbm_m.blockentity.machines.SoyuzLauncherBlockEntity
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 SoyuzLauncherBlockEntity extends BaseMachineBlockEntity
Port of legacy TileEntitySoyuzLauncher: two fuel tanks (kerosene/oxygen), energy storage, 4 dedicated item slots (rocket/designator/satellite/lander) + 18 cargo slots, a Satellite/Cargo mode switch, and a launch countdown that spawns a SoyuzEntity.

Satellite Mode intentionally does not hook into a real orbital/frequency simulation - that legacy subsystem (com.hbm.saveddata.satellites.Satellite) doesn't exist anywhere in this port. Launching just consumes the satellite chip.

  • Field Details

  • Constructor Details

    • SoyuzLauncherBlockEntity

      public SoyuzLauncherBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • serverTick

      public static void serverTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, SoyuzLauncherBlockEntity be)
    • startCountdown

      public void startCountdown()
    • setMode

      public void setMode(int mode)
    • getMode

      public int getMode()
    • isStarting

      public boolean isStarting()
    • getCountdown

      public int getCountdown()
    • canLaunch

      public boolean canLaunch()
    • hasFuel

      public boolean hasFuel()
    • hasOxy

      public boolean hasOxy()
    • getFuelRequired

      public int getFuelRequired()
    • hasPower

      public boolean hasPower()
    • getPowerRequired

      public long getPowerRequired()
    • getPowerScaled

      public long getPowerScaled(long scale)
    • rocketItem

      public static net.minecraft.world.item.Item rocketItem()
      The launcher accepts the existing decorative Soyuz rocket item (no separate "missile_soyuz" item).
    • hasRocket

      public boolean hasRocket()
    • designator

      public int designator()
      0 = not required (satellite mode), 1 = required but missing/not-ready, 2 = present & ready.
    • satellite

      public int satellite()
      0 = not required (cargo mode), 1 = required but missing, 2 = present.
    • orbital

      public int orbital()
      0 = no lander needed, 1 = needed but missing, 2 = present.
    • getTanks

      public FluidTank[] getTanks()
    • 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, @NotNull net.minecraft.world.item.ItemStack stack)
      Specified by:
      isItemValidForSlot in class BaseMachineBlockEntity
    • createMenu

      public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int containerId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.world.entity.player.Player player)
    • getRenderBoundingBox

      public net.minecraft.world.phys.AABB getRenderBoundingBox()
      Description copied from class: BaseMachineBlockEntity
      Рендер-баундинг бокс по умолчанию. На Forge это @Override метода из BlockEntity, на Fabric — обычный public метод. Подклассы могут переопределить для мультиблоков с увеличенным размером.
      Specified by:
      getRenderBoundingBox in interface net.minecraftforge.common.extensions.IForgeBlockEntity
      Overrides:
      getRenderBoundingBox in class BaseMachineBlockEntity
    • saveAdditional

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

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