接口 Minecart
- 所有超级接口:
CommandSender,Entity,Metadatable,Nameable,Permissible,PersistentDataHolder,ServerOperator,Vehicle
- 所有已知子接口:
CommandMinecart,ExplosiveMinecart,HopperMinecart,PoweredMinecart,RideableMinecart,SpawnerMinecart,StorageMinecart
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.entity.Entity
Entity.Spigot -
方法概要
修饰符和类型方法说明double获取对矿车的伤害.Gets the derailed velocity modifier.获取展示在矿车中的方块.获取展示在矿车中的方块的方块数据.int获取展示在矿车中的方块的偏移像素值.Gets the flying velocity modifier.double获取矿车的最大速率.boolean返回此矿车在无乘客乘坐时是否会加快减速 (可理解为有更大的负的加速度).voidsetDamage(double damage) 设置对矿车的伤害.voidsetDerailedVelocityMod(@NotNull Vector derailed) Sets the derailed velocity modifier.voidsetDisplayBlock(@Nullable MaterialData material) 设置示在矿车中的方块.voidsetDisplayBlockData(@Nullable BlockData blockData) 设置展示在矿车中的方块.voidsetDisplayBlockOffset(int offset) 设置展示在矿车中的方块的偏移像素值.voidsetFlyingVelocityMod(@NotNull Vector flying) Sets the flying velocity modifier.voidsetMaxSpeed(double speed) 设置矿车的最大速率.voidsetSlowWhenEmpty(boolean slow) 设置此矿车在无乘客乘坐时是否会加快减速 (可理解为有更大的负的加速度).从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVisibleByDefault, setVisualFire, spigot, teleport, teleport, teleport, teleport从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata从接口继承的方法 org.bukkit.Nameable
getCustomName, setCustomName从接口继承的方法 org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp从接口继承的方法 org.bukkit.entity.Vehicle
getVelocity, setVelocity
-
方法详细资料
-
setDamage
void setDamage(double damage) 设置对矿车的伤害.原文:Sets a minecart's damage.
- 参数:
damage- 超过40的伤害将"杀死"矿车
-
getDamage
double getDamage()获取对矿车的伤害.原文:Gets a minecart's damage.
- 返回:
- 伤害值
-
getMaxSpeed
double getMaxSpeed()获取矿车的最大速率. 这是速率不是速度.原文:Gets the maximum speed of a minecart. The speed is unrelated to the velocity.
- 返回:
- 最大速率
-
setMaxSpeed
void setMaxSpeed(double speed) 设置矿车的最大速率. 此值不能是负数(速率是标量). 默认值为0.4D或GameRule.MINECART_MAX_SPEED.原文:Sets the maximum speed of a minecart. Must be nonnegative. Default is 0.4D or
GameRule.MINECART_MAX_SPEED.- 参数:
speed- 最大速率
-
isSlowWhenEmpty
boolean isSlowWhenEmpty()返回此矿车在无乘客乘坐时是否会加快减速 (可理解为有更大的负的加速度).原文:Returns whether this minecart will slow down faster without a passenger occupying it
- 返回:
- 是否加快减速
-
setSlowWhenEmpty
void setSlowWhenEmpty(boolean slow) 设置此矿车在无乘客乘坐时是否会加快减速 (可理解为有更大的负的加速度).原文:Sets whether this minecart will slow down faster without a passenger occupying it
- 参数:
slow- 是否加快减速
-
getFlyingVelocityMod
Gets the flying velocity modifier. Used for minecarts that are in mid-air. A flying minecart's velocity is multiplied by this factor each tick.- 返回:
- The vector factor
-
setFlyingVelocityMod
Sets the flying velocity modifier. Used for minecarts that are in mid-air. A flying minecart's velocity is multiplied by this factor each tick.- 参数:
flying- velocity modifier vector
-
getDerailedVelocityMod
Gets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.A derailed minecart's velocity is multiplied by this factor each tick.
- 返回:
- derailed visible speed
-
setDerailedVelocityMod
Sets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails. A derailed minecart's velocity is multiplied by this factor each tick.- 参数:
derailed- visible speed
-
setDisplayBlock
设置示在矿车中的方块. 传递null值清除矿车中展示的方块.原文:Sets the display block for this minecart. Passing a null value will set the minecart to have no display block.
- 参数:
material- 设置为展示方块的物品
-
getDisplayBlock
获取展示在矿车中的方块. 如果矿车内无方块, 会返回AIR类型.原文:Gets the display block for this minecart. This function will return the type AIR if none is set.
- 返回:
- 展示在矿车中的方块
-
setDisplayBlockData
设置展示在矿车中的方块. 传递null值清除矿车中展示的方块.原文:Sets the display block for this minecart. Passing a null value will set the minecart to have no display block.
- 参数:
blockData- 设置为展示方块的物品
-
getDisplayBlockData
获取展示在矿车中的方块的方块数据. 如果矿车内无方块, 会返回AIR类型.原文:Gets the display block for this minecart. This function will return the type AIR if none is set.
- 返回:
- 展示在矿车中的方块
-
setDisplayBlockOffset
void setDisplayBlockOffset(int offset) 设置展示在矿车中的方块的偏移像素值.原文:Sets the offset of the display block.
- 参数:
offset- 展示在矿车中的方块的偏移像素值
-
getDisplayBlockOffset
int getDisplayBlockOffset()获取展示在矿车中的方块的偏移像素值.原文:Gets the offset of the display block.
- 返回:
- 展示在矿车中的方块的偏移像素值
-