Class FluidExhaustBlockEntity

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.machines.FluidExhaustBlockEntity
All Implemented Interfaces:
IFluidConnectorMK2, IFluidPipeMK2, 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 FluidExhaustBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity implements IFluidPipeMK2
BlockEntity выхлопной трубы (порт TileEntityPipeExhaust из 1.7.10). Особенность: создаёт три отдельных FluidNode на одной позиции — для SMOKE, SMOKE_LEADED и SMOKE_POISON. canConnect разрешает подключение только к этим трём типам. Типы дыма задаются через ModFluids (аналог Fluids.SMOKE_* из 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>>
  • Field Summary

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    INFINITE_EXTENT_AABB
  • Constructor Summary

    Constructors
    Constructor
    Description
    FluidExhaustBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canConnect(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.Direction fromDir)
    Может ли этот коннектор принимать/отдавать жидкость указанного типа с указанной стороны.
    net.minecraft.world.level.material.Fluid
     
    net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>
     
    net.minecraft.nbt.CompoundTag
     
    void
    load(net.minecraft.nbt.CompoundTag tag)
     
    void
     
    void
     
    protected void
    saveAdditional(net.minecraft.nbt.CompoundTag tag)
     
    void
     
    static void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, FluidExhaustBlockEntity entity)
     

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, triggerEvent

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider

    getCapability, getCapability

    Methods inherited from interface com.hbm_m.api.fluids.IFluidPipeMK2

    createNode

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, requestModelDataUpdate, serializeNBT
  • Constructor Details

    • FluidExhaustBlockEntity

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

    • getFluidType

      public net.minecraft.world.level.material.Fluid getFluidType()
      Specified by:
      getFluidType in interface IFluidPipeMK2
    • canConnect

      public boolean canConnect(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.Direction fromDir)
      Description copied from interface: IFluidConnectorMK2
      Может ли этот коннектор принимать/отдавать жидкость указанного типа с указанной стороны.
      Specified by:
      canConnect in interface IFluidConnectorMK2
      Parameters:
      fluid - тип жидкости
      fromDir - направление ОТ ЭТОГО узла к соседу (сторона, через которую идёт соединение)
    • onLoad

      public void onLoad()
      Specified by:
      onLoad in interface net.minecraftforge.common.extensions.IForgeBlockEntity
    • setRemoved

      public void setRemoved()
      Overrides:
      setRemoved in class net.minecraft.world.level.block.entity.BlockEntity
    • onChunkUnloaded

      public void onChunkUnloaded()
      Specified by:
      onChunkUnloaded in interface net.minecraftforge.common.extensions.IForgeBlockEntity
      Overrides:
      onChunkUnloaded in class net.minecraft.world.level.block.entity.BlockEntity
    • tick

      public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, FluidExhaustBlockEntity entity)
    • saveAdditional

      protected void saveAdditional(@NotNull net.minecraft.nbt.CompoundTag tag)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • load

      public void load(@NotNull net.minecraft.nbt.CompoundTag tag)
      Overrides:
      load in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdateTag

      public net.minecraft.nbt.CompoundTag getUpdateTag()
      Overrides:
      getUpdateTag in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdatePacket

      public net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> getUpdatePacket()
      Overrides:
      getUpdatePacket in class net.minecraft.world.level.block.entity.BlockEntity