public interface IForgeEntityMinecart
Modifier and Type | Field and Description |
---|---|
static IMinecartCollisionHandler |
COLLISIONS |
static double |
DEFAULT_AIR_DRAG |
static float |
DEFAULT_MAX_SPEED_AIR_LATERAL |
static float |
DEFAULT_MAX_SPEED_AIR_VERTICAL |
Modifier and Type | Method and Description |
---|---|
default boolean |
canBeRidden()
Returns true if this cart can be ridden by an Entity.
|
boolean |
canUseRail()
Returns true if this cart can currently use rails.
|
default ItemStack |
getCartItem()
This function returns an ItemStack that represents this cart.
|
default IMinecartCollisionHandler |
getCollisionHandler()
Gets the current global Minecart Collision handler if none
is registered, returns null
|
default int |
getComparatorLevel()
Called from Detector Rails to retrieve a redstone power level for comparators.
|
float |
getCurrentCartSpeedCapOnRail()
Returns the current speed cap for the cart when traveling on rails.
|
default BlockPos |
getCurrentRailPosition()
Internal, returns the current spot to look for the attached rail.
|
double |
getDragAir() |
default float |
getMaxCartSpeedOnRail()
Returns the carts max speed when traveling on rails.
|
float |
getMaxSpeedAirLateral() |
float |
getMaxSpeedAirVertical() |
double |
getMaxSpeedWithRail() |
default AbstractMinecartEntity |
getMinecart() |
default double |
getSlopeAdjustment() |
default boolean |
isPoweredCart()
Returns true if this cart is self propelled.
|
void |
moveMinecartOnRail(BlockPos pos)
Moved to allow overrides.
|
void |
setCanUseRail(boolean use)
Set whether the minecart can use rails.
|
void |
setCurrentCartSpeedCapOnRail(float value) |
void |
setDragAir(double value) |
void |
setMaxSpeedAirLateral(float value) |
void |
setMaxSpeedAirVertical(float value) |
default boolean |
shouldDoRailFunctions()
Return false if this cart should not call onMinecartPass() and should ignore Powered Rails.
|
static final float DEFAULT_MAX_SPEED_AIR_LATERAL
static final float DEFAULT_MAX_SPEED_AIR_VERTICAL
static final double DEFAULT_AIR_DRAG
static final IMinecartCollisionHandler COLLISIONS
default AbstractMinecartEntity getMinecart()
default IMinecartCollisionHandler getCollisionHandler()
default BlockPos getCurrentRailPosition()
double getMaxSpeedWithRail()
void moveMinecartOnRail(BlockPos pos)
default ItemStack getCartItem()
boolean canUseRail()
void setCanUseRail(boolean use)
use
- Whether the minecart can currently use rails.default boolean shouldDoRailFunctions()
default boolean isPoweredCart()
default boolean canBeRidden()
default float getMaxCartSpeedOnRail()
float getCurrentCartSpeedCapOnRail()
void setCurrentCartSpeedCapOnRail(float value)
float getMaxSpeedAirLateral()
void setMaxSpeedAirLateral(float value)
float getMaxSpeedAirVertical()
void setMaxSpeedAirVertical(float value)
double getDragAir()
void setDragAir(double value)
default double getSlopeAdjustment()
default int getComparatorLevel()