Class EntityVehicle
java.lang.Object
org.cloudburstmc.server.entity.BaseEntity
org.cloudburstmc.server.entity.vehicle.EntityVehicle
- All Implemented Interfaces:
org.cloudburstmc.api.entity.Entity,org.cloudburstmc.api.entity.Interactable,org.cloudburstmc.api.entity.Rideable,org.cloudburstmc.api.entity.vehicle.Vehicle
- Direct Known Subclasses:
EntityAbstractMinecart,EntityBoat,EntityCommandBlockMinecart
public abstract class EntityVehicle
extends BaseEntity
implements org.cloudburstmc.api.entity.vehicle.Vehicle, org.cloudburstmc.api.entity.Interactable
author: MagicDroidX
Nukkit Project
-
Field Summary
FieldsFields inherited from class org.cloudburstmc.server.entity.BaseEntity
absorption, 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 Summary
ConstructorsConstructorDescriptionEntityVehicle(org.cloudburstmc.api.entity.EntityType<?> type, org.cloudburstmc.api.level.Location location) -
Method Summary
Modifier and TypeMethodDescriptionbooleanattack(org.cloudburstmc.api.event.entity.EntityDamageEvent source)booleanintintintbooleanonUpdate(int currentTick)protected booleanvoidsetDamage(int damage)voidsetRollingAmplitude(int time)voidsetRollingDirection(int direction)Methods inherited from class org.cloudburstmc.server.entity.BaseEntity
addEffect, addMotion, addMovement, attack, broadcastLinkPacket, canBeMovedByCurrents, canClimb, canClimbWalls, canCollide, canCollideWith, canPassThrough, canTriggerPressurePlate, canTriggerWalking, checkBlockCollision, checkChunks, checkGroundState, checkObstruction, checkObstruction, close, createAddEntityPacket, despawnFrom, despawnFrom, despawnFromAll, dismount, entityBaseTick, entityBaseTick, extinguish, fall, fastMove, getAbsorption, getAir, getBaseOffset, getBlocksAround, getBoundingBox, getCardinalDirection, getChunk, getCollisionBlocks, getData, getDirection, getDirectionPlane, getDirectionVector, getDrag, getEffect, getEffect, getEffects, getEyeHeight, getFireTicks, getGravity, getHealth, getHeight, getHighestPosition, getHorizontalDirection, getLastDamageCause, getLength, getLevel, getLocation, getMaxHealth, getMotion, getMountedOffset, getName, getNameTag, getNoDamageTicks, getOwner, getPassenger, getPassengers, getPitch, getPosition, getRuntimeId, getScale, getScoreTag, getSeatPosition, getServer, getStepHeight, getTag, getType, getUniqueId, getVehicle, getViewers, getWidth, getX, getY, getYaw, getZ, handleLavaMovement, hasControllingPassenger, hasEffect, hasEffect, hasNameTag, heal, heal, init, initEntity, isAlive, isClosed, isControlling, isImmobile, isInsideOfFire, isInsideOfSolid, isInsideOfWater, isInvulnerable, isNameTagAlwaysVisible, isNameTagVisible, isOnGround, isPassenger, kill, loadAdditionalData, mount, move, move, onCollideWithPlayer, onDismount, onEntityCollision, onInteract, onInteract, onMount, onStruckByLightning, recalculateBoundingBox, recalculateEffectColor, removeAllEffects, removeEffect, removeEffect, resetFallDistance, respawnToAll, saveAdditionalData, 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, updatePassengersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cloudburstmc.api.entity.Entity
addEffect, attack, canBeMovedByCurrents, canCollide, canCollideWith, canPassThrough, canTriggerPressurePlate, close, despawnFrom, despawnFromAll, extinguish, fall, getAbsorption, getBoundingBox, getChunk, getDirection, getDirectionPlane, getDirectionVector, getDrag, getEffect, getEffect, getEffects, getEyeHeight, getFireTicks, getGravity, getHealth, getHeight, getHighestPosition, getHorizontalDirection, getLastDamageCause, getLength, getLevel, getLocation, getMaxHealth, getMotion, getName, getNameTag, getNoDamageTicks, getOwner, getPassengers, getPitch, getPosition, getRuntimeId, getScale, getSeatPosition, getServer, getType, getUniqueId, getVehicle, getViewers, getWidth, getX, getY, getYaw, getZ, hasControllingPassenger, hasEffect, hasEffect, hasNameTag, heal, heal, isAlive, isClosed, isControlling, isNameTagVisible, isOnFire, isOnGround, isPassenger, isUndead, kill, mount, onDismount, onEntityCollision, onInteract, 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, teleportMethods inherited from interface org.cloudburstmc.api.entity.Rideable
dismount, mount
-
Field Details
-
rollingDirection
protected boolean rollingDirection
-
-
Constructor Details
-
EntityVehicle
public EntityVehicle(org.cloudburstmc.api.entity.EntityType<?> type, org.cloudburstmc.api.level.Location location)
-
-
Method Details
-
getRollingAmplitude
public int getRollingAmplitude() -
setRollingAmplitude
public void setRollingAmplitude(int time) -
getRollingDirection
public int getRollingDirection() -
setRollingDirection
public void setRollingDirection(int direction) -
getDamage
public int getDamage() -
setDamage
public void setDamage(int damage) -
getInteractButtonText
- Specified by:
getInteractButtonTextin interfaceorg.cloudburstmc.api.entity.Interactable
-
canDoInteraction
public boolean canDoInteraction()- Specified by:
canDoInteractionin interfaceorg.cloudburstmc.api.entity.Interactable
-
onUpdate
public boolean onUpdate(int currentTick)- Specified by:
onUpdatein interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
onUpdatein classBaseEntity
-
performHurtAnimation
protected boolean performHurtAnimation() -
attack
public boolean attack(org.cloudburstmc.api.event.entity.EntityDamageEvent source)- Specified by:
attackin interfaceorg.cloudburstmc.api.entity.Entity- Overrides:
attackin classBaseEntity
-