public abstract class VehicleEntity extends net.minecraft.entity.Entity implements MultiSeatedEntity
| Modifier and Type | Class and Description |
|---|---|
class |
VehicleEntity.Seat |
static class |
VehicleEntity.Speed |
protected class |
VehicleEntity.WheelData |
| Modifier and Type | Field and Description |
|---|---|
java.util.List<CarWheel> |
allWheels |
CarWheel |
backLeftWheel |
CarWheel |
backRightWheel |
InterpValue |
backValue |
double |
estimatedSpeed |
CarWheel |
frontLeftWheel |
CarWheel |
frontRightWheel |
InterpValue |
frontValue |
int |
interpProgress |
double |
interpTargetY |
double |
interpTargetYaw |
double |
interpTargetZ |
InterpValue |
leftValue |
static float |
MAX_HEALTH |
float |
prevWheelRotateAmount |
static net.minecraft.network.datasync.DataParameter<net.minecraft.item.ItemStack> |
RECORD_ITEM |
InterpValue |
rightValue |
protected float |
rotationDelta |
protected VehicleEntity.Seat[] |
seats |
EntitySound<VehicleEntity> |
sound |
float |
speedModifier |
InterpValue |
steerAmount |
boolean |
wasOnGroundLastTick |
static net.minecraft.network.datasync.DataParameter<java.lang.Float> |
WATCHER_HEALTH |
static net.minecraft.network.datasync.DataParameter<net.minecraft.nbt.NBTTagCompound> |
WATCHER_SEATS |
static net.minecraft.network.datasync.DataParameter<java.lang.Integer> |
WATCHER_SPEED |
static net.minecraft.network.datasync.DataParameter<java.lang.Byte> |
WATCHER_STATE |
protected VehicleEntity.WheelData |
wheeldata |
java.util.List<WheelParticleData>[] |
wheelDataList |
float |
wheelRotateAmount |
float |
wheelRotation |
addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isDead, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, updateBlocked, velocityChanged, width, world| Constructor and Description |
|---|
VehicleEntity(net.minecraft.world.World world) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPassenger(net.minecraft.entity.Entity passenger) |
protected void |
applyMovement() |
boolean |
attackEntityFrom(net.minecraft.util.DamageSource source,
float amount) |
boolean |
backward() |
void |
backward(boolean backward) |
protected double |
calculateWheelHeight(double distance,
boolean rotate90) |
boolean |
canBeCollidedWith() |
protected boolean |
canFitPassenger(net.minecraft.entity.Entity passenger) |
protected boolean |
canRunoverEntity(net.minecraft.entity.Entity entity) |
protected boolean |
canTriggerWalking() |
protected abstract VehicleEntity.Seat[] |
createSeats() |
protected void |
createWheelParticles(CarWheel wheel) |
protected void |
createWheelParticles(CarWheel wheel,
boolean runBetween) |
protected abstract VehicleEntity.WheelData |
createWheels() |
abstract void |
dropItems() |
protected void |
entityInit() |
void |
fall(float distance,
float damageMultiplier) |
boolean |
forward() |
void |
forward(boolean forward) |
javax.vecmath.Vector2d |
getBackWheelRotationPoint() |
javax.vecmath.Vector4d |
getCarDimensions() |
net.minecraft.entity.Entity |
getControllingPassenger() |
byte |
getControlState() |
net.minecraft.entity.Entity |
getEntityInSeat(int seatID) |
float |
getHealth() |
java.lang.String |
getIfExists(int seatID,
boolean reset) |
net.minecraft.item.ItemStack |
getItem() |
byte |
getPreviousState() |
VehicleEntity.Seat |
getSeat(int id) |
int |
getSeatForEntity(net.minecraft.entity.Entity entity) |
float |
getSoundVolume() |
VehicleEntity.Speed |
getSpeed() |
protected boolean |
getStateBit(byte mask) |
protected void |
handleControl() |
boolean |
isInRangeToRenderDist(double dist) |
boolean |
left() |
void |
left(boolean left) |
void |
onEntityUpdate() |
void |
onUpdate() |
boolean |
processInitialInteract(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumHand hand) |
protected void |
processWheel(CarWheel wheel) |
protected void |
readEntityFromNBT(net.minecraft.nbt.NBTTagCompound compound) |
protected void |
removePassenger(net.minecraft.entity.Entity passenger) |
boolean |
right() |
void |
right(boolean right) |
protected void |
runOverEntity(net.minecraft.entity.Entity entity) |
void |
setControlState(byte state) |
void |
setDead() |
void |
setHealth(float health) |
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int duration,
boolean teleport) |
void |
setPreviousState(byte state) |
void |
setSpeed(VehicleEntity.Speed speed) |
protected void |
setStateBit(byte mask,
boolean newState) |
protected boolean |
shouldStopUpdates() |
protected boolean |
shouldTyresRender() |
void |
startSound() |
boolean |
tryPutInSeat(net.minecraft.entity.Entity passenger,
int seatID,
boolean isPacket) |
void |
updatePassenger(net.minecraft.entity.Entity passenger) |
protected void |
writeEntityToNBT(net.minecraft.nbt.NBTTagCompound compound) |
addEntityCrashInfo, addTag, addTrackingPlayer, addVelocity, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, awardKillScore, canBeAttackedWithItem, canBePushed, canBeRidden, canExplosionDestroyBlock, canPassengerSteer, canRenderOnFire, canRiderInteract, canTrample, canUseCommand, changeDimension, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, dismountRidingEntity, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAdjustedHorizontalFacing, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCapability, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getFireImmuneTicks, getFlag, getForward, getHeldEquipment, getHorizontalFacing, getHoverEvent, getIsInvulnerable, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getMountedYOffset, getName, getParts, getPassengers, getPersistentID, getPickedResult, getPitchYaw, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getRotationYawHead, getServer, getSoundCategory, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, getYOffset, handleStatusUpdate, handleWaterMovement, hasCapability, hasCustomName, hashCode, hasNoGravity, hitByEntity, ignoreItemEntityData, isBeingRidden, isBurning, isCreatureType, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isOverWater, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, makeFlySound, markVelocityChanged, move, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onCollideWithPlayer, onInsideBlock, onKillCommand, onKillEntity, onStruckByLightning, outOfWorld, performHurtAnimation, playFlySound, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerFixes, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetEntityId, resetPositionToBB, sendCommandFeedback, sendMessage, serializeNBT, setAir, setAlwaysRenderNameTag, setCommandStat, setCommandStats, setCustomNameTag, setDropItemsWhenDead, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setInWeb, setItemStackToSlot, setLocationAndAngles, setNoGravity, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSize, setSneaking, setSprinting, setUniqueId, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, toString, turn, updateFallState, updateRidden, writeToNBT, writeToNBTAtomically, writeToNBTOptionalpublic static final net.minecraft.network.datasync.DataParameter<java.lang.Byte> WATCHER_STATE
public static final net.minecraft.network.datasync.DataParameter<java.lang.Float> WATCHER_HEALTH
public static final net.minecraft.network.datasync.DataParameter<java.lang.Integer> WATCHER_SPEED
public static final net.minecraft.network.datasync.DataParameter<net.minecraft.item.ItemStack> RECORD_ITEM
public static final net.minecraft.network.datasync.DataParameter<net.minecraft.nbt.NBTTagCompound> WATCHER_SEATS
public static final float MAX_HEALTH
protected final VehicleEntity.Seat[] seats
protected final VehicleEntity.WheelData wheeldata
public float wheelRotation
public float wheelRotateAmount
public float prevWheelRotateAmount
protected float rotationDelta
public int interpProgress
public double interpTargetY
public double interpTargetZ
public double interpTargetYaw
public float speedModifier
public boolean wasOnGroundLastTick
public final InterpValue backValue
public final InterpValue frontValue
public final InterpValue leftValue
public final InterpValue rightValue
public final CarWheel backLeftWheel
public final CarWheel backRightWheel
public final CarWheel frontLeftWheel
public final CarWheel frontRightWheel
public final java.util.List<WheelParticleData>[] wheelDataList
public java.util.List<CarWheel> allWheels
public EntitySound<VehicleEntity> sound
public InterpValue steerAmount
public double estimatedSpeed
protected void entityInit()
entityInit in class net.minecraft.entity.Entitypublic boolean left()
public boolean right()
public boolean forward()
public boolean backward()
public void left(boolean left)
public void right(boolean right)
public void forward(boolean forward)
public void backward(boolean backward)
protected boolean getStateBit(byte mask)
protected void setStateBit(byte mask,
boolean newState)
public byte getControlState()
public byte getPreviousState()
public void setControlState(byte state)
public void setPreviousState(byte state)
public void setSpeed(VehicleEntity.Speed speed)
public VehicleEntity.Speed getSpeed()
public void setHealth(float health)
public float getHealth()
public net.minecraft.item.ItemStack getItem()
public boolean isInRangeToRenderDist(double dist)
isInRangeToRenderDist in class net.minecraft.entity.Entityprotected boolean canFitPassenger(@Nonnull
net.minecraft.entity.Entity passenger)
canFitPassenger in class net.minecraft.entity.Entitypublic net.minecraft.entity.Entity getControllingPassenger()
getControllingPassenger in class net.minecraft.entity.Entity@Nullable public net.minecraft.entity.Entity getEntityInSeat(int seatID)
getEntityInSeat in interface MultiSeatedEntitypublic java.lang.String getIfExists(int seatID,
boolean reset)
public boolean canBeCollidedWith()
canBeCollidedWith in class net.minecraft.entity.Entityprotected boolean canTriggerWalking()
canTriggerWalking in class net.minecraft.entity.Entitypublic javax.vecmath.Vector4d getCarDimensions()
public javax.vecmath.Vector2d getBackWheelRotationPoint()
public void setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int duration,
boolean teleport)
setPositionAndRotationDirect in class net.minecraft.entity.Entitypublic void fall(float distance,
float damageMultiplier)
fall in class net.minecraft.entity.Entitypublic void onEntityUpdate()
onEntityUpdate in class net.minecraft.entity.Entityprotected boolean canRunoverEntity(net.minecraft.entity.Entity entity)
protected void runOverEntity(net.minecraft.entity.Entity entity)
protected void createWheelParticles(CarWheel wheel)
protected void createWheelParticles(CarWheel wheel, boolean runBetween)
protected void processWheel(CarWheel wheel)
protected boolean shouldTyresRender()
public void onUpdate()
onUpdate in class net.minecraft.entity.Entityprotected void handleControl()
protected void applyMovement()
protected final double calculateWheelHeight(double distance,
boolean rotate90)
public boolean processInitialInteract(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumHand hand)
processInitialInteract in class net.minecraft.entity.Entityprotected void addPassenger(net.minecraft.entity.Entity passenger)
addPassenger in class net.minecraft.entity.Entitypublic boolean tryPutInSeat(net.minecraft.entity.Entity passenger,
int seatID,
boolean isPacket)
tryPutInSeat in interface MultiSeatedEntity@Nullable public int getSeatForEntity(net.minecraft.entity.Entity entity)
getSeatForEntity in interface MultiSeatedEntityprotected void removePassenger(net.minecraft.entity.Entity passenger)
removePassenger in class net.minecraft.entity.Entitypublic boolean attackEntityFrom(net.minecraft.util.DamageSource source,
float amount)
attackEntityFrom in class net.minecraft.entity.Entitypublic void updatePassenger(net.minecraft.entity.Entity passenger)
updatePassenger in class net.minecraft.entity.Entitypublic VehicleEntity.Seat getSeat(int id)
protected boolean shouldStopUpdates()
public void setDead()
setDead in class net.minecraft.entity.Entityprotected void readEntityFromNBT(net.minecraft.nbt.NBTTagCompound compound)
readEntityFromNBT in class net.minecraft.entity.Entityprotected void writeEntityToNBT(net.minecraft.nbt.NBTTagCompound compound)
writeEntityToNBT in class net.minecraft.entity.Entitypublic void startSound()
protected abstract VehicleEntity.Seat[] createSeats()
protected abstract VehicleEntity.WheelData createWheels()
public abstract void dropItems()
public float getSoundVolume()