Package com.hbm_m.blockentity.machines
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>
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.
-
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 TypeFieldDescriptionstatic final intstatic final intprotected final net.minecraft.world.inventory.ContainerDatastatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.hbm_m.blockentity.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
ConstructorsConstructorDescriptionSoyuzLauncherBlockEntity(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 inv, net.minecraft.world.entity.player.Player player) int0 = not required (satellite mode), 1 = required but missing/not-ready, 2 = present & ready.intprotected net.minecraft.network.chat.Componentnet.minecraft.network.chat.ComponentintintgetMode()longlonggetPowerScaled(long scale) net.minecraft.world.phys.AABBРендер-баундинг бокс по умолчанию.getTanks()booleanhasFuel()booleanhasOxy()booleanhasPower()booleanprotected booleanisItemValidForSlot(int slot, net.minecraft.world.item.ItemStack stack) booleanvoidload(net.minecraft.nbt.CompoundTag tag) intorbital()0 = no lander needed, 1 = needed but missing, 2 = present.static net.minecraft.world.item.ItemThe launcher accepts the existing decorative Soyuz rocket item (no separate "missile_soyuz" item).int0 = not required (cargo mode), 1 = required but missing, 2 = present.protected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) static voidserverTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, SoyuzLauncherBlockEntity be) voidsetMode(int mode) voidMethods inherited from class com.hbm_m.blockentity.BaseMachineBlockEntity
canConnectEnergy, canExtract, canReceive, chargeFromBatterySlot, chargeItemInSlot, clearRemoved, createGhostItemsFromIngredients, createInventoryHandler, dropInventoryContents, ensureNetworkInitialized, extractEnergy, getCapability, getEnergyDelta, getEnergyStored, getGhostItems, getInventory, getMaxEnergyStored, getPriority, getProvideSpeed, getReceiveSpeed, getUpdatePacket, getUpdateTag, handleUpdateTag, invalidateCaps, isCriticalSlot, isEnergyProviderItem, isEnergyReceiverItem, onDataPacket, onLoad, receiveEnergy, sendUpdateToClient, setEnergyCapacity, setEnergyStored, setLevel, setRemoved, setupFluidCapability, updateEnergyDeltaMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, 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
-
SLOT_ROCKET
public static final int SLOT_ROCKET- See Also:
-
SLOT_DESIGNATOR
public static final int SLOT_DESIGNATOR- See Also:
-
SLOT_SATELLITE
public static final int SLOT_SATELLITE- See Also:
-
SLOT_LANDER
public static final int SLOT_LANDER- See Also:
-
SLOT_FUEL_IN
public static final int SLOT_FUEL_IN- See Also:
-
SLOT_FUEL_OUT
public static final int SLOT_FUEL_OUT- See Also:
-
SLOT_OXIDIZER_IN
public static final int SLOT_OXIDIZER_IN- See Also:
-
SLOT_OXIDIZER_OUT
public static final int SLOT_OXIDIZER_OUT- See Also:
-
SLOT_BATTERY
public static final int SLOT_BATTERY- See Also:
-
CARGO_START
public static final int CARGO_START- See Also:
-
CARGO_END
public static final int CARGO_END- See Also:
-
SLOT_COUNT
public static final int SLOT_COUNT- See Also:
-
MODE_SATELLITE
public static final int MODE_SATELLITE- See Also:
-
MODE_CARGO
public static final int MODE_CARGO- See Also:
-
MAX_COUNTDOWN
public static final int MAX_COUNTDOWN- See Also:
-
data
protected final net.minecraft.world.inventory.ContainerData data
-
-
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
-
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, @NotNull net.minecraft.world.item.ItemStack stack) - Specified by:
isItemValidForSlotin classBaseMachineBlockEntity
-
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:
getRenderBoundingBoxin interfacenet.minecraftforge.common.extensions.IForgeBlockEntity- Overrides:
getRenderBoundingBoxin 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
-