Class MachineFoundryBasinBlockEntity

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.machines.MachineFoundryBasinBlockEntity
All Implemented Interfaces:
ICrucibleAcceptor, 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 MachineFoundryBasinBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity implements ICrucibleAcceptor
Port of the 1.7.10 TileEntityFoundryBasin / TileEntityFoundryCastingBase. - capacity depends on the installed mold (no mold = nothing can be poured in) - can ONLY be filled by pouring from above (crucible or outlet), never by sideways flow from channels - casts once the basin is completely full, after a cool-off period
  • 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
    Modifier and Type
    Field
    Description
    int
     
    static final int
    Original: cooloff starts at 100 and resets to 200 after each cast.
     

    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
    MachineFoundryBasinBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canAcceptPartialFlow(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, MaterialStack stack)
    Whether material may flow in sideways from the given side.
    boolean
    canAcceptPartialPour(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, MaterialStack stack)
    Whether material may be poured in from above (side is usually UP).
    flow(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, MaterialStack stack)
    Sideways flow.
    int
    Original: capacity is dictated by the installed mold, 0 without mold.
    int
     
    float
     
     
    net.minecraft.world.item.ItemStack
     
    net.minecraft.world.item.ItemStack
     
    net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>
     
    net.minecraft.nbt.CompoundTag
     
    boolean
    insertMold(net.minecraft.world.item.ItemStack stack)
     
    void
    load(net.minecraft.nbt.CompoundTag tag)
     
    pour(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, MaterialStack stack)
    Pour from above.
    protected void
    saveAdditional(net.minecraft.nbt.CompoundTag tag)
     
    net.minecraft.world.item.ItemStack
     
    net.minecraft.world.item.ItemStack
     
    static void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, MachineFoundryBasinBlockEntity be)
     

    Methods 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, setLevel, setRemoved, 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 net.minecraftforge.common.extensions.IForgeBlockEntity

    deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
  • Field Details

    • COOLOFF_TIME

      public static final int COOLOFF_TIME
      Original: cooloff starts at 100 and resets to 200 after each cast.
      See Also:
    • type

      @Nullable public MaterialType type
    • amount

      public int amount
  • Constructor Details

    • MachineFoundryBasinBlockEntity

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

    • getMoldSlot

      public net.minecraft.world.item.ItemStack getMoldSlot()
    • getOutputSlot

      public net.minecraft.world.item.ItemStack getOutputSlot()
    • insertMold

      public boolean insertMold(net.minecraft.world.item.ItemStack stack)
    • takeMold

      public net.minecraft.world.item.ItemStack takeMold()
    • takeOutput

      public net.minecraft.world.item.ItemStack takeOutput()
    • getInstalledMold

      @Nullable public ItemCastMold getInstalledMold()
    • getCapacity

      public int getCapacity()
      Original: capacity is dictated by the installed mold, 0 without mold.
    • tick

      public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, MachineFoundryBasinBlockEntity be)
    • canAcceptPartialFlow

      public boolean canAcceptPartialFlow(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, MaterialStack stack)
      Description copied from interface: ICrucibleAcceptor
      Whether material may flow in sideways from the given side.
      Specified by:
      canAcceptPartialFlow in interface ICrucibleAcceptor
    • flow

      @Nullable public MaterialStack flow(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, MaterialStack stack)
      Description copied from interface: ICrucibleAcceptor
      Sideways flow. Returns the leftover, or null if fully accepted.
      Specified by:
      flow in interface ICrucibleAcceptor
    • canAcceptPartialPour

      public boolean canAcceptPartialPour(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, MaterialStack stack)
      Description copied from interface: ICrucibleAcceptor
      Whether material may be poured in from above (side is usually UP).
      Specified by:
      canAcceptPartialPour in interface ICrucibleAcceptor
    • pour

      @Nullable public MaterialStack pour(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, MaterialStack stack)
      Description copied from interface: ICrucibleAcceptor
      Pour from above. Returns the leftover, or null if fully accepted.
      Specified by:
      pour in interface ICrucibleAcceptor
    • getFillLevel

      public float getFillLevel()
    • getFillColor

      public int getFillColor()
    • saveAdditional

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

      public void load(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