Class BeltBlockEntity

All Implemented Interfaces:
IHaveCustomOverlayIcon, IHaveGoggleInformation, IHaveHoveringInformation, PartialSafeNBT, SpecialBlockEntityItemRequirement, IInteractionChecker, net.createmod.ponder.api.VirtualBlockEntity, net.minecraft.world.Clearable, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension

public class BeltBlockEntity extends KineticBlockEntity implements net.minecraft.world.Clearable
  • Field Details

    • passengers

      public Map<net.minecraft.world.entity.Entity,BeltMovementHandler.TransportedEntityInfo> passengers
    • color

      public Optional<net.minecraft.world.item.DyeColor> color
    • beltLength

      public int beltLength
    • index

      public int index
    • lastInsert

      public net.minecraft.core.Direction lastInsert
    • casing

    • covered

      public boolean covered
    • controller

      protected net.minecraft.core.BlockPos controller
    • inventory

      protected BeltInventory inventory
    • itemHandler

      protected net.neoforged.neoforge.items.IItemHandler itemHandler
    • invVersionTracker

      public VersionedInventoryTrackerBehaviour invVersionTracker
    • trackerUpdateTag

      public net.minecraft.nbt.CompoundTag trackerUpdateTag
  • Constructor Details

    • BeltBlockEntity

      public BeltBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • registerCapabilities

      public static void registerCapabilities(net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent event)
    • addBehaviours

      public void addBehaviours(List<BlockEntityBehaviour> behaviours)
      Overrides:
      addBehaviours in class KineticBlockEntity
    • tick

      public void tick()
      Overrides:
      tick in class KineticBlockEntity
    • calculateStressApplied

      public float calculateStressApplied()
      Overrides:
      calculateStressApplied in class KineticBlockEntity
    • createRenderBoundingBox

      public net.minecraft.world.phys.AABB createRenderBoundingBox()
      Overrides:
      createRenderBoundingBox in class CachedRenderBBBlockEntity
    • initializeItemHandler

      protected void initializeItemHandler()
    • clearContent

      public void clearContent()
      Specified by:
      clearContent in interface net.minecraft.world.Clearable
    • destroy

      public void destroy()
      Description copied from class: SmartBlockEntity
      Block destroyed or replaced. Requires Block to call IBE::onRemove
      Overrides:
      destroy in class SmartBlockEntity
    • invalidate

      public void invalidate()
      Description copied from class: SmartBlockEntity
      Block destroyed or Chunk unloaded. Usually invalidates capabilities
      Overrides:
      invalidate in class SmartBlockEntity
    • write

      public void write(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
      Description copied from class: SmartBlockEntity
      Hook only these in future subclasses of STE
      Overrides:
      write in class KineticBlockEntity
    • read

      protected void read(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
      Description copied from class: SmartBlockEntity
      Hook only these in future subclasses of STE
      Overrides:
      read in class KineticBlockEntity
    • clearKineticInformation

      public void clearKineticInformation()
      Overrides:
      clearKineticInformation in class KineticBlockEntity
    • applyColor

      public boolean applyColor(net.minecraft.world.item.DyeColor colorIn)
    • getControllerBE

      public BeltBlockEntity getControllerBE()
    • setController

      public void setController(net.minecraft.core.BlockPos controller)
    • getController

      public net.minecraft.core.BlockPos getController()
    • isController

      public boolean isController()
    • getBeltMovementSpeed

      public float getBeltMovementSpeed()
    • getDirectionAwareBeltMovementSpeed

      public float getDirectionAwareBeltMovementSpeed()
    • hasPulley

      public boolean hasPulley()
    • isLastBelt

      protected boolean isLastBelt()
    • getMovementDirection

      public net.minecraft.core.Vec3i getMovementDirection(boolean firstHalf)
    • getBeltChainDirection

      public net.minecraft.core.Vec3i getBeltChainDirection()
    • getMovementDirection

      protected net.minecraft.core.Vec3i getMovementDirection(boolean firstHalf, boolean ignoreHalves)
    • getMovementFacing

      public net.minecraft.core.Direction getMovementFacing()
    • getBeltFacing

      protected net.minecraft.core.Direction getBeltFacing()
    • getInventory

      public BeltInventory getInventory()
    • setCasingType

      public void setCasingType(BeltBlockEntity.CasingType type)
    • getModelData

      public net.neoforged.neoforge.client.model.data.ModelData getModelData()
      Specified by:
      getModelData in interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
    • canPropagateDiagonally

      protected boolean canPropagateDiagonally(IRotate block, net.minecraft.world.level.block.state.BlockState state)
      Overrides:
      canPropagateDiagonally in class KineticBlockEntity
    • propagateRotationTo

      public float propagateRotationTo(KineticBlockEntity target, net.minecraft.world.level.block.state.BlockState stateFrom, net.minecraft.world.level.block.state.BlockState stateTo, net.minecraft.core.BlockPos diff, boolean connectedViaAxes, boolean connectedViaCogs)
      Description copied from class: KineticBlockEntity
      Specify ratio of transferred rotation from this kinetic component to a specific other.
      Overrides:
      propagateRotationTo in class KineticBlockEntity
      Parameters:
      target - other Kinetic BE to transfer to
      stateFrom - this BE's blockstate
      stateTo - other BE's blockstate
      diff - difference in position (to.pos - from.pos)
      connectedViaAxes - whether these kinetic blocks are connected via mutual IRotate.hasShaftTowards()
      connectedViaCogs - whether these kinetic blocks are connected via mutual IRotate.hasIntegratedCogwheel()
      Returns:
      factor of rotation speed from this BE to other. 0 if no rotation is transferred, or the standard rules apply (integrated shafts/cogs)
    • invalidateItemHandler

      public void invalidateItemHandler()
    • shouldRenderNormally

      public boolean shouldRenderNormally()
    • setCovered

      public void setCovered(boolean blockCoveringBelt)