public class EntityBoat extends Entity
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityBoat.Status |
static class |
EntityBoat.Type |
| Modifier and Type | Field and Description |
|---|---|
private boolean |
backInputDown |
private static DataParameter<java.lang.Integer> |
BOAT_TYPE |
private float |
boatGlide |
private static DataParameter<java.lang.Float> |
DAMAGE_TAKEN |
private static DataParameter<java.lang.Boolean>[] |
DATA_ID_PADDLE |
private float |
deltaRotation |
private static DataParameter<java.lang.Integer> |
FORWARD_DIRECTION |
private boolean |
forwardInputDown |
private double |
lastYd |
private boolean |
leftInputDown |
private double |
lerpPitch |
private int |
lerpSteps |
private double |
lerpX |
private double |
lerpY |
private double |
lerpYaw |
private double |
lerpZ |
private float |
momentum |
private float |
outOfControlTicks |
private float[] |
paddlePositions |
private EntityBoat.Status |
previousStatus |
private boolean |
rightInputDown |
private EntityBoat.Status |
status |
private static DataParameter<java.lang.Integer> |
TIME_SINCE_HIT |
private double |
waterLevel |
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 |
|---|
EntityBoat(World worldIn) |
EntityBoat(World worldIn,
double x,
double y,
double z) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPassenger(Entity passenger) |
void |
applyEntityCollision(Entity entityIn) |
void |
applyOrientationToEntity(Entity entityToUpdate) |
protected void |
applyYawToEntity(Entity entityToUpdate) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
canBeCollidedWith() |
boolean |
canBePushed() |
protected boolean |
canFitPassenger(Entity passenger) |
protected boolean |
canTriggerWalking() |
private boolean |
checkInWater() |
private void |
controlBoat() |
protected void |
entityInit() |
EnumFacing |
getAdjustedHorizontalFacing() |
float |
getBoatGlide() |
private EntityBoat.Status |
getBoatStatus() |
EntityBoat.Type |
getBoatType() |
AxisAlignedBB |
getCollisionBoundingBox() |
AxisAlignedBB |
getCollisionBox(Entity entityIn) |
Entity |
getControllingPassenger() |
float |
getDamageTaken() |
int |
getForwardDirection() |
Item |
getItemBoat() |
double |
getMountedYOffset() |
protected SoundEvent |
getPaddleSound() |
boolean |
getPaddleState(int side) |
float |
getRowingTime(int side,
float limbSwing) |
int |
getTimeSinceHit() |
private EntityBoat.Status |
getUnderwaterStatus() |
float |
getWaterLevelAbove() |
void |
onUpdate() |
void |
performHurtAnimation() |
boolean |
processInitialInteract(EntityPlayer player,
EnumHand hand) |
protected void |
readEntityFromNBT(NBTTagCompound compound) |
void |
setBoatType(EntityBoat.Type boatType) |
void |
setDamageTaken(float damageTaken) |
void |
setForwardDirection(int forwardDirection) |
void |
setPaddleState(boolean left,
boolean right) |
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport) |
void |
setTimeSinceHit(int timeSinceHit) |
private void |
tickLerp() |
protected void |
updateFallState(double y,
boolean onGroundIn,
IBlockState state,
BlockPos pos) |
void |
updateInputs(boolean p_184442_1_,
boolean p_184442_2_,
boolean p_184442_3_,
boolean p_184442_4_) |
private void |
updateMotion() |
void |
updatePassenger(Entity passenger) |
protected void |
writeEntityToNBT(NBTTagCompound compound) |
addEntityCrashInfo, addTag, addTrackingPlayer, addVelocity, applyEnchantments, applyPlayerInteraction, awardKillScore, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canPassengerSteer, canRenderOnFire, canRiderInteract, canTrample, canUseCommand, changeDimension, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, dismountRidingEntity, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCapability, getCollisionBorderSize, 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, 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, isAddedToWorld, isBeingRidden, isBurning, isCreatureType, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, 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, onAddedToWorld, onCollideWithPlayer, onEntityUpdate, onInsideBlock, onKillCommand, onKillEntity, onRemovedFromWorld, onStruckByLightning, outOfWorld, playFlySound, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerFixes, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetEntityId, resetPositionToBB, sendCommandFeedback, sendMessage, serializeNBT, setAir, setAlwaysRenderNameTag, setCommandStat, setCommandStats, setCustomNameTag, setDead, 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, updateRidden, writeToNBT, writeToNBTAtomically, writeToNBTOptionalprivate static final DataParameter<java.lang.Integer> TIME_SINCE_HIT
private static final DataParameter<java.lang.Integer> FORWARD_DIRECTION
private static final DataParameter<java.lang.Float> DAMAGE_TAKEN
private static final DataParameter<java.lang.Integer> BOAT_TYPE
private static final DataParameter<java.lang.Boolean>[] DATA_ID_PADDLE
private final float[] paddlePositions
private float momentum
private float outOfControlTicks
private float deltaRotation
private int lerpSteps
private double lerpX
private double lerpY
private double lerpZ
private double lerpYaw
private double lerpPitch
private boolean leftInputDown
private boolean rightInputDown
private boolean forwardInputDown
private boolean backInputDown
private double waterLevel
private float boatGlide
private EntityBoat.Status status
private EntityBoat.Status previousStatus
private double lastYd
public EntityBoat(World worldIn)
public EntityBoat(World worldIn, double x, double y, double z)
protected boolean canTriggerWalking()
canTriggerWalking in class Entityprotected void entityInit()
entityInit in class Entity@Nullable public AxisAlignedBB getCollisionBox(Entity entityIn)
getCollisionBox in class Entity@Nullable public AxisAlignedBB getCollisionBoundingBox()
getCollisionBoundingBox in class Entitypublic boolean canBePushed()
canBePushed in class Entitypublic double getMountedYOffset()
getMountedYOffset in class Entitypublic boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom in class Entitypublic void applyEntityCollision(Entity entityIn)
applyEntityCollision in class Entitypublic Item getItemBoat()
public void performHurtAnimation()
performHurtAnimation in class Entitypublic boolean canBeCollidedWith()
canBeCollidedWith in class Entitypublic void setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport)
setPositionAndRotationDirect in class Entitypublic EnumFacing getAdjustedHorizontalFacing()
getAdjustedHorizontalFacing in class Entity@Nullable protected SoundEvent getPaddleSound()
private void tickLerp()
public void setPaddleState(boolean left,
boolean right)
public float getRowingTime(int side,
float limbSwing)
private EntityBoat.Status getBoatStatus()
public float getWaterLevelAbove()
public float getBoatGlide()
private boolean checkInWater()
@Nullable private EntityBoat.Status getUnderwaterStatus()
private void updateMotion()
private void controlBoat()
public void updatePassenger(Entity passenger)
updatePassenger in class Entityprotected void applyYawToEntity(Entity entityToUpdate)
public void applyOrientationToEntity(Entity entityToUpdate)
applyOrientationToEntity in class Entityprotected void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT in class Entityprotected void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT in class Entitypublic boolean processInitialInteract(EntityPlayer player, EnumHand hand)
processInitialInteract in class Entityprotected void updateFallState(double y,
boolean onGroundIn,
IBlockState state,
BlockPos pos)
updateFallState in class Entitypublic boolean getPaddleState(int side)
public void setDamageTaken(float damageTaken)
public float getDamageTaken()
public void setTimeSinceHit(int timeSinceHit)
public int getTimeSinceHit()
public void setForwardDirection(int forwardDirection)
public int getForwardDirection()
public void setBoatType(EntityBoat.Type boatType)
public EntityBoat.Type getBoatType()
protected boolean canFitPassenger(Entity passenger)
canFitPassenger in class Entity@Nullable public Entity getControllingPassenger()
getControllingPassenger in class Entitypublic void updateInputs(boolean p_184442_1_,
boolean p_184442_2_,
boolean p_184442_3_,
boolean p_184442_4_)
protected void addPassenger(Entity passenger)
addPassenger in class Entity