Interface IForgeAbstractMinecart
- All Known Implementing Classes:
- AbstractMinecart,- AbstractMinecartContainer,- Minecart,- MinecartChest,- MinecartCommandBlock,- MinecartFurnace,- MinecartHopper,- MinecartSpawner,- MinecartTNT
public interface IForgeAbstractMinecart
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final doublestatic final floatstatic final float
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleanReturns true if this cart can be ridden by an Entity.booleanReturns true if this cart can currently use rails.default intCalled from Detector Rails to retrieve a redstone power level for comparators.floatReturns the current speed cap for the cart when traveling on rails.default BlockPosInternal, returns the current spot to look for the attached rail.doubledefault floatReturns the carts max speed when traveling on rails.floatfloatdoubledefault doubledefault booleanReturns true if this cart is self propelled.voidMoved to allow overrides.private AbstractMinecartself()voidsetCanUseRail(boolean use) Set whether the minecart can use rails.voidsetCurrentCartSpeedCapOnRail(float value) voidsetDragAir(double value) voidsetMaxSpeedAirLateral(float value) voidsetMaxSpeedAirVertical(float value) default booleanReturn false if this cart should not call onMinecartPass() and should ignore Powered Rails.
- 
Field Details- 
DEFAULT_MAX_SPEED_AIR_LATERALstatic final float DEFAULT_MAX_SPEED_AIR_LATERAL- See Also:
 
- 
DEFAULT_MAX_SPEED_AIR_VERTICALstatic final float DEFAULT_MAX_SPEED_AIR_VERTICAL- See Also:
 
- 
DEFAULT_AIR_DRAGstatic final double DEFAULT_AIR_DRAG- See Also:
 
 
- 
- 
Method Details- 
self
- 
getCurrentRailPositionInternal, returns the current spot to look for the attached rail.
- 
getMaxSpeedWithRaildouble getMaxSpeedWithRail()
- 
moveMinecartOnRailMoved to allow overrides. This code handles minecart movement and speed capping when on a rail.
- 
canUseRailboolean 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.
 
- 
setCanUseRailvoid 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.
 
- 
shouldDoRailFunctionsdefault boolean shouldDoRailFunctions()Return false if this cart should not call onMinecartPass() and should ignore Powered Rails.- Returns:
- True if this cart should call onMinecartPass().
 
- 
isPoweredCartdefault boolean isPoweredCart()Returns true if this cart is self propelled.- Returns:
- True if powered.
 
- 
canBeRiddendefault boolean canBeRidden()Returns true if this cart can be ridden by an Entity.- Returns:
- True if this cart can be ridden.
 
- 
getMaxCartSpeedOnRaildefault 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.
 
- 
getCurrentCartSpeedCapOnRailfloat 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().
- 
setCurrentCartSpeedCapOnRailvoid setCurrentCartSpeedCapOnRail(float value) 
- 
getMaxSpeedAirLateralfloat getMaxSpeedAirLateral()
- 
setMaxSpeedAirLateralvoid setMaxSpeedAirLateral(float value) 
- 
getMaxSpeedAirVerticalfloat getMaxSpeedAirVertical()
- 
setMaxSpeedAirVerticalvoid setMaxSpeedAirVertical(float value) 
- 
getDragAirdouble getDragAir()
- 
setDragAirvoid setDragAir(double value) 
- 
getSlopeAdjustmentdefault double getSlopeAdjustment()
- 
getComparatorLeveldefault int getComparatorLevel()Called from Detector Rails to retrieve a redstone power level for comparators.
 
-