接口 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
返回此矿车在无乘客乘坐时是否会加快减速 (可理解为有更大的负的加速度).void
setDamage
(double damage) 设置对矿车的伤害.void
setDerailedVelocityMod
(@NotNull Vector derailed) Sets the derailed velocity modifier.void
setDisplayBlock
(@Nullable MaterialData material) 设置示在矿车中的方块.void
setDisplayBlockData
(@Nullable BlockData blockData) 设置展示在矿车中的方块.void
setDisplayBlockOffset
(int offset) 设置展示在矿车中的方块的偏移像素值.void
setFlyingVelocityMod
(@NotNull Vector flying) Sets the flying velocity modifier.void
setMaxSpeed
(double speed) 设置矿车的最大速率.void
setSlowWhenEmpty
(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.原文:Sets the maximum speed of a minecart. Must be nonnegative. Default is 0.4D.
- 参数:
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.
- 返回:
- 展示在矿车中的方块的偏移像素值
-