public class EntityBoat extends Entity
Modifier and Type | Class and Description |
---|---|
static class |
EntityBoat.Status |
static class |
EntityBoat.Type |
addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, 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 |
---|---|
void |
applyEntityCollision(Entity entityIn)
Applies a velocity to the entities, to push them away from eachother.
|
void |
applyOrientationToEntity(Entity entityToUpdate)
Applies this entity's orientation (pitch/yaw) to another entity.
|
protected void |
applyYawToEntity(Entity entityToUpdate)
Applies this boat's yaw to the given entity.
|
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
boolean |
canBeCollidedWith()
Returns true if other Entities should be prevented from moving through this Entity.
|
boolean |
canBePushed()
Returns true if this entity should push and be pushed by other entities when colliding.
|
protected boolean |
canFitPassenger(Entity passenger) |
protected boolean |
canTriggerWalking()
returns if this entity triggers Block.onEntityWalking on the blocks they walk on.
|
protected void |
entityInit() |
EnumFacing |
getAdjustedHorizontalFacing()
Gets the horizontal facing direction of this Entity, adjusted to take specially-treated entity types into
account.
|
float |
getBoatGlide()
Decides how much the boat should be gliding on the land (based on any slippery blocks)
|
EntityBoat.Type |
getBoatType() |
AxisAlignedBB |
getCollisionBoundingBox()
Returns the collision bounding box for this entity
|
AxisAlignedBB |
getCollisionBox(Entity entityIn)
Returns a boundingBox used to collide the entity with other entities and blocks.
|
Entity |
getControllingPassenger()
For vehicles, the first passenger is generally considered the controller and "drives" the vehicle.
|
float |
getDamageTaken()
Gets the damage taken from the last hit.
|
int |
getForwardDirection()
Gets the forward direction of the entity.
|
Item |
getItemBoat() |
double |
getMountedYOffset()
Returns the Y offset from the entity's position for any entity riding this one.
|
boolean |
getPaddleState(int p_184457_1_) |
float |
getRowingTime(int p_184448_1_,
float limbSwing) |
int |
getTimeSinceHit()
Gets the time since the last hit.
|
float |
getWaterLevelAbove() |
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
performHurtAnimation()
Setups the entity to do the hurt animation.
|
boolean |
processInitialInteract(EntityPlayer player,
EnumHand hand) |
protected void |
readEntityFromNBT(NBTTagCompound compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
void |
setBoatType(EntityBoat.Type boatType) |
void |
setDamageTaken(float damageTaken)
Sets the damage taken from the last hit.
|
void |
setForwardDirection(int forwardDirection)
Sets the forward direction of the entity.
|
void |
setPaddleState(boolean p_184445_1_,
boolean p_184445_2_) |
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport)
Set the position and rotation values directly without any clamping.
|
void |
setTimeSinceHit(int timeSinceHit)
Sets the time to count down from since the last time entity was hit.
|
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_) |
void |
updatePassenger(Entity passenger) |
protected void |
writeEntityToNBT(NBTTagCompound compound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
addEntityCrashInfo, addPassenger, addTag, addToPlayerScore, addTrackingPlayer, addVelocity, applyEnchantments, applyPlayerInteraction, canBeAttackedWithItem, canBeRidden, canPassengerSteer, canRenderOnFire, canRiderInteract, canTrample, canUseCommand, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, dismountRidingEntity, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCapability, getCollisionBorderSize, getCommandSenderEntity, getCommandStats, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, 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, isBeingRidden, isBurning, isCreatureType, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, kill, move, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onCollideWithPlayer, onEntityUpdate, onKillCommand, onKillEntity, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerFixes, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetEntityId, resetHeight, resetPositionToBB, sendCommandFeedback, sendMessage, serializeNBT, setAir, setAlwaysRenderNameTag, setBeenAttacked, 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, verifyExplosion, writeToNBT, writeToNBTAtomically, writeToNBTOptional
public EntityBoat(World worldIn)
public EntityBoat(World worldIn, double x, double y, double z)
protected boolean canTriggerWalking()
canTriggerWalking
in class Entity
protected void entityInit()
entityInit
in class Entity
public AxisAlignedBB getCollisionBox(Entity entityIn)
getCollisionBox
in class Entity
public AxisAlignedBB getCollisionBoundingBox()
getCollisionBoundingBox
in class Entity
public boolean canBePushed()
canBePushed
in class Entity
public double getMountedYOffset()
getMountedYOffset
in class Entity
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom
in class Entity
public void applyEntityCollision(Entity entityIn)
applyEntityCollision
in class Entity
public Item getItemBoat()
public void performHurtAnimation()
performHurtAnimation
in class Entity
public boolean canBeCollidedWith()
canBeCollidedWith
in class Entity
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport)
setPositionAndRotationDirect
in class Entity
public EnumFacing getAdjustedHorizontalFacing()
getAdjustedHorizontalFacing
in class Entity
public void onUpdate()
public void setPaddleState(boolean p_184445_1_, boolean p_184445_2_)
public float getRowingTime(int p_184448_1_, float limbSwing)
public float getWaterLevelAbove()
public float getBoatGlide()
public void updatePassenger(Entity passenger)
updatePassenger
in class Entity
protected void applyYawToEntity(Entity entityToUpdate)
public void applyOrientationToEntity(Entity entityToUpdate)
applyOrientationToEntity
in class Entity
protected void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT
in class Entity
protected void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT
in class Entity
public boolean processInitialInteract(EntityPlayer player, EnumHand hand)
processInitialInteract
in class Entity
protected void updateFallState(double y, boolean onGroundIn, IBlockState state, BlockPos pos)
updateFallState
in class Entity
public boolean getPaddleState(int p_184457_1_)
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
public Entity getControllingPassenger()
getControllingPassenger
in class Entity
public void updateInputs(boolean p_184442_1_, boolean p_184442_2_, boolean p_184442_3_, boolean p_184442_4_)