Interface IAbstractMinecartExtension

All Known Implementing Classes:
AbstractMinecart, AbstractMinecartContainer, Minecart, MinecartChest, MinecartCommandBlock, MinecartFurnace, MinecartHopper, MinecartSpawner, MinecartTNT

public interface IAbstractMinecartExtension
  • Field Details Link icon

    • DEFAULT_MAX_SPEED_AIR_LATERAL Link icon

      static final float DEFAULT_MAX_SPEED_AIR_LATERAL
      See Also:
    • DEFAULT_MAX_SPEED_AIR_VERTICAL Link icon

      static final float DEFAULT_MAX_SPEED_AIR_VERTICAL
      See Also:
    • DEFAULT_AIR_DRAG Link icon

      static final double DEFAULT_AIR_DRAG
      See Also:
  • Method Details Link icon

    • self Link icon

      private AbstractMinecart self()
    • getCurrentRailPosition Link icon

      default BlockPos getCurrentRailPosition()
      Internal, returns the current spot to look for the attached rail.
    • getMaxSpeedWithRail Link icon

      double getMaxSpeedWithRail()
    • moveMinecartOnRail Link icon

      void moveMinecartOnRail(BlockPos pos)
      Moved to allow overrides. This code handles minecart movement and speed capping when on a rail.
    • canUseRail Link icon

      boolean canUseRail()
      Returns true if this cart can currently use rails. This function is mainly used to gracefully detach a minecart from a rail.
      Returns:
      True if the minecart can use rails.
    • setCanUseRail Link icon

      void setCanUseRail(boolean use)
      Set whether the minecart can use rails. This function is mainly used to gracefully detach a minecart from a rail.
      Parameters:
      use - Whether the minecart can currently use rails.
    • shouldDoRailFunctions Link icon

      default boolean shouldDoRailFunctions()
      Return false if this cart should not call onMinecartPass() and should ignore Powered Rails.
      Returns:
      True if this cart should call onMinecartPass().
    • isPoweredCart Link icon

      default boolean isPoweredCart()
      Returns true if this cart is self propelled.
      Returns:
      True if powered.
    • canBeRidden Link icon

      default boolean canBeRidden()
      Returns true if this cart can be ridden by an Entity.
      Returns:
      True if this cart can be ridden.
    • getMaxCartSpeedOnRail Link icon

      default float getMaxCartSpeedOnRail()
      Returns the carts max speed when traveling on rails. Carts going faster than 1.1 cause issues with chunk loading. Carts cant traverse slopes or corners at greater than 0.5 - 0.6. This value is compared with the rails max speed and the carts current speed cap to determine the carts current max speed. A normal rail's max speed is 0.4.
      Returns:
      Carts max speed.
    • getCurrentCartSpeedCapOnRail Link icon

      float getCurrentCartSpeedCapOnRail()
      Returns the current speed cap for the cart when traveling on rails. This functions differs from getMaxCartSpeedOnRail() in that it controls current movement and cannot be overridden. The value however can never be higher than getMaxCartSpeedOnRail().
    • setCurrentCartSpeedCapOnRail Link icon

      void setCurrentCartSpeedCapOnRail(float value)
    • getMaxSpeedAirLateral Link icon

      float getMaxSpeedAirLateral()
    • setMaxSpeedAirLateral Link icon

      void setMaxSpeedAirLateral(float value)
    • getMaxSpeedAirVertical Link icon

      float getMaxSpeedAirVertical()
    • setMaxSpeedAirVertical Link icon

      void setMaxSpeedAirVertical(float value)
    • getDragAir Link icon

      double getDragAir()
    • setDragAir Link icon

      void setDragAir(double value)
    • getSlopeAdjustment Link icon

      default double getSlopeAdjustment()
    • getComparatorLevel Link icon

      default int getComparatorLevel()
      Called from Detector Rails to retrieve a redstone power level for comparators.