public abstract class EntityAbstractMinecart extends EntityVehicle
Nukkit Project, Minecart and Riding Project, Package cn.nukkit.entity.item in project Nukkit.
rollingDirectionabsorption, age, blocksAround, boundingBox, chunk, closed, collisionBlockStates, data, deadTicks, effects, entityCollisionReduction, fallDistance, fireProof, fireTicks, firstMove, hasSpawned, health, highestPosition, inBlock, inPortalTicks, invulnerable, isCollided, isCollidedHorizontally, isCollidedVertically, isPlayer, isStatic, justCreated, keepMovement, lastDamageCause, lastMotion, lastPitch, lastPosition, lastUpdate, lastYaw, level, maxFireTicks, motion, motionChanged, noDamageTicks, onGround, passengers, pitch, pitchDelta, position, positionChanged, scale, server, tag, ticksLived, timing, vehicle, yaw, yawDelta, ySize| Constructor and Description |
|---|
EntityAbstractMinecart(org.cloudburstmc.api.entity.EntityType<?> type,
org.cloudburstmc.api.level.Location location) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(int x,
int y,
int z,
boolean flag) |
boolean |
attack(org.cloudburstmc.api.event.entity.EntityDamageEvent source) |
boolean |
canDoInteraction() |
void |
close() |
void |
dropItem() |
float |
getBaseOffset() |
com.nukkitx.math.vector.Vector3f |
getDerailedVelocityMod() |
org.cloudburstmc.api.block.BlockState |
getDisplayBlock() |
int |
getDisplayOffset()
Get the block display offset
|
float |
getDrag() |
com.nukkitx.math.vector.Vector3f |
getFlyingVelocityMod() |
float |
getHeight() |
double |
getMaxSpeed() |
abstract org.cloudburstmc.api.util.data.MinecartType |
getMinecartType() |
String |
getName() |
float |
getWidth() |
boolean |
hasDisplay() |
boolean |
hasNameTag() |
void |
initEntity() |
abstract boolean |
isRideable() |
boolean |
isSlowWhenEmpty()
Is the minecart can be slowed when empty?
|
void |
kill() |
void |
loadAdditionalData(com.nukkitx.nbt.NbtMap tag) |
void |
onEntityCollision(org.cloudburstmc.api.entity.Entity entity) |
boolean |
onInteract(org.cloudburstmc.api.player.Player p,
org.cloudburstmc.api.item.ItemStack item,
com.nukkitx.math.vector.Vector3f clickedPos) |
boolean |
onUpdate(int currentTick) |
void |
saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag) |
void |
setCurrentSpeed(float speed)
Used to multiply the minecart current speed
|
void |
setDerailedVelocityMod(com.nukkitx.math.vector.Vector3f derailed) |
void |
setDisplay(boolean display) |
void |
setDisplayBlock(org.cloudburstmc.api.block.BlockState blockState) |
void |
setDisplayBlockOffset(int offset)
Set the block offset.
|
void |
setFlyingVelocityMod(com.nukkitx.math.vector.Vector3f flying) |
void |
setMaximumSpeed(float speed) |
void |
setName(String name) |
void |
setSlowWhenEmpty(boolean slow)
Set the minecart slowdown flag
|
getDamage, getInteractButtonText, getRollingAmplitude, getRollingDirection, performHurtAnimation, setDamage, setRollingAmplitude, setRollingDirectionaddEffect, addMotion, addMovement, attack, broadcastLinkPacket, canBeMovedByCurrents, canClimb, canClimbWalls, canCollide, canCollideWith, canPassThrough, canTriggerPressurePlate, canTriggerWalking, checkBlockCollision, checkChunks, checkGroundState, checkObstruction, checkObstruction, createAddEntityPacket, despawnFrom, despawnFrom, despawnFromAll, dismount, entityBaseTick, entityBaseTick, extinguish, fall, fastMove, getAbsorption, getAir, getBlocksAround, getBoundingBox, getCardinalDirection, getChunk, getCollisionBlocks, getData, getDirection, getDirectionPlane, getDirectionVector, getEffect, getEffect, getEffects, getEyeHeight, getFireTicks, getGravity, getHealth, getHighestPosition, getHorizontalDirection, getLastDamageCause, getLength, getLevel, getLocation, getMaxHealth, getMotion, getMountedOffset, getNameTag, getNoDamageTicks, getOwner, getPassenger, getPassengers, getPitch, getPosition, getRuntimeId, getScale, getScoreTag, getSeatPosition, getServer, getStepHeight, getTag, getType, getUniqueId, getVehicle, getViewers, getX, getY, getYaw, getZ, handleLavaMovement, hasControllingPassenger, hasEffect, hasEffect, heal, heal, init, isAlive, isClosed, isControlling, isImmobile, isInsideOfFire, isInsideOfSolid, isInsideOfWater, isInvulnerable, isNameTagAlwaysVisible, isNameTagVisible, isOnGround, isPassenger, mount, move, move, onCollideWithPlayer, onDismount, onInteract, onMount, onStruckByLightning, recalculateBoundingBox, recalculateEffectColor, removeAllEffects, removeEffect, removeEffect, resetFallDistance, respawnToAll, scheduleUpdate, sendData, sendData, sendFlags, sendPotionEffects, setAbsorption, setAir, setCanClimb, setCanClimb, setCanClimbWalls, setCanClimbWalls, setFallDistance, setHealth, setHighestPosition, setImmobile, setImmobile, setInvulnerable, setLastDamageCause, setMaxHealth, setMotion, setNameTag, setNameTagAlwaysVisible, setNameTagAlwaysVisible, setNameTagVisible, setNameTagVisible, setNoDamageTicks, setOnFire, setOnGround, setOwner, setPosition, setPositionAndRotation, setRotation, setScale, setScoreTag, setSeatPosition, spawnTo, spawnTo, spawnToAll, switchLevel, teleport, teleport, teleport, teleport, toString, updateFallState, updateMovement, updatePassengerPosition, updatePassengersclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEffect, attack, canBeMovedByCurrents, canCollide, canCollideWith, canPassThrough, canTriggerPressurePlate, despawnFrom, despawnFromAll, extinguish, fall, getAbsorption, getBoundingBox, getChunk, getDirection, getDirectionPlane, getDirectionVector, getEffect, getEffect, getEffects, getEyeHeight, getFireTicks, getGravity, getHealth, getHighestPosition, getHorizontalDirection, getLastDamageCause, getLength, getLevel, getLocation, getMaxHealth, getMotion, getNameTag, getNoDamageTicks, getOwner, getPassengers, getPitch, getPosition, getRuntimeId, getScale, getSeatPosition, getServer, getType, getUniqueId, getVehicle, getViewers, getX, getY, getYaw, getZ, hasControllingPassenger, hasEffect, hasEffect, heal, heal, isAlive, isClosed, isControlling, isNameTagVisible, isOnFire, isOnGround, isPassenger, isUndead, mount, onDismount, onMount, onStruckByLightning, removeAllEffects, removeEffect, removeEffect, resetFallDistance, setAbsorption, setHealth, setHighestPosition, setMaxHealth, setMotion, setNameTag, setNameTagVisible, setNoDamageTicks, setOnFire, setOnGround, setOwner, setPosition, setPositionAndRotation, setRotation, setScale, setSeatPosition, spawnTo, spawnToAll, teleport, teleport, teleport, teleportpublic EntityAbstractMinecart(org.cloudburstmc.api.entity.EntityType<?> type,
org.cloudburstmc.api.level.Location location)
public abstract boolean isRideable()
public abstract org.cloudburstmc.api.util.data.MinecartType getMinecartType()
public float getHeight()
getHeight in interface org.cloudburstmc.api.entity.EntitygetHeight in class BaseEntitypublic float getWidth()
getWidth in interface org.cloudburstmc.api.entity.EntitygetWidth in class BaseEntitypublic float getDrag()
getDrag in interface org.cloudburstmc.api.entity.EntitygetDrag in class BaseEntitypublic void setName(String name)
public String getName()
getName in interface org.cloudburstmc.api.entity.EntitygetName in class BaseEntitypublic float getBaseOffset()
getBaseOffset in class BaseEntitypublic boolean hasNameTag()
hasNameTag in interface org.cloudburstmc.api.entity.EntityhasNameTag in class BaseEntitypublic boolean canDoInteraction()
canDoInteraction in interface org.cloudburstmc.api.entity.InteractablecanDoInteraction in class EntityVehiclepublic void initEntity()
initEntity in class BaseEntitypublic void loadAdditionalData(com.nukkitx.nbt.NbtMap tag)
loadAdditionalData in class BaseEntitypublic void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)
saveAdditionalData in class BaseEntitypublic boolean onUpdate(int currentTick)
onUpdate in interface org.cloudburstmc.api.entity.EntityonUpdate in class EntityVehiclepublic boolean attack(org.cloudburstmc.api.event.entity.EntityDamageEvent source)
attack in interface org.cloudburstmc.api.entity.Entityattack in class EntityVehiclepublic void dropItem()
public void kill()
kill in interface org.cloudburstmc.api.entity.Entitykill in class BaseEntitypublic void close()
close in interface org.cloudburstmc.api.entity.Entityclose in class BaseEntitypublic boolean onInteract(org.cloudburstmc.api.player.Player p,
org.cloudburstmc.api.item.ItemStack item,
com.nukkitx.math.vector.Vector3f clickedPos)
onInteract in interface org.cloudburstmc.api.entity.EntityonInteract in class BaseEntitypublic void onEntityCollision(org.cloudburstmc.api.entity.Entity entity)
onEntityCollision in interface org.cloudburstmc.api.entity.EntityonEntityCollision in class BaseEntitypublic double getMaxSpeed()
protected void activate(int x,
int y,
int z,
boolean flag)
public void setCurrentSpeed(float speed)
speed - The speed of the minecart that will be calculatedpublic int getDisplayOffset()
public void setDisplayBlockOffset(int offset)
offset - The offsetpublic org.cloudburstmc.api.block.BlockState getDisplayBlock()
public void setDisplayBlock(org.cloudburstmc.api.block.BlockState blockState)
public boolean hasDisplay()
public void setDisplay(boolean display)
public boolean isSlowWhenEmpty()
public void setSlowWhenEmpty(boolean slow)
slow - The slowdown flagpublic com.nukkitx.math.vector.Vector3f getFlyingVelocityMod()
public void setFlyingVelocityMod(com.nukkitx.math.vector.Vector3f flying)
public com.nukkitx.math.vector.Vector3f getDerailedVelocityMod()
public void setDerailedVelocityMod(com.nukkitx.math.vector.Vector3f derailed)
public void setMaximumSpeed(float speed)
Copyright © 2021. All rights reserved.