public abstract class EntityHanging extends Entity
| Modifier and Type | Field and Description |
|---|---|
EnumFacing |
facingDirection
The direction the entity is facing
|
protected BlockPos |
hangingPosition |
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 |
|---|
EntityHanging(World worldIn) |
EntityHanging(World worldIn,
BlockPos hangingPositionIn) |
| Modifier and Type | Method and Description |
|---|---|
void |
addVelocity(double x,
double y,
double z)
Adds to the current velocity of the entity, and sets
Entity.isAirBorne to true. |
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.
|
EntityItem |
entityDropItem(ItemStack stack,
float offsetY)
Drops an item at the position of the entity.
|
protected void |
entityInit() |
BlockPos |
getHangingPosition() |
abstract int |
getHeightPixels() |
EnumFacing |
getHorizontalFacing()
Gets the horizontal facing direction of this Entity.
|
float |
getMirroredYaw(Mirror transformMirror)
Transforms the entity's current yaw with the given Mirror and returns it.
|
float |
getRotatedYaw(Rotation transformRotation)
Transforms the entity's current yaw with the given Rotation and returns it.
|
abstract int |
getWidthPixels() |
boolean |
hitByEntity(Entity entityIn)
Called when a player attacks an entity.
|
void |
move(MoverType type,
double x,
double y,
double z)
Tries to move the entity towards the specified location.
|
abstract void |
onBroken(Entity brokenEntity)
Called when this entity is broken.
|
void |
onStruckByLightning(EntityLightningBolt lightningBolt)
Called when a lightning bolt hits the entity.
|
void |
onUpdate()
Called to update the entity's position/logic.
|
boolean |
onValidSurface()
checks to make sure painting can be placed there
|
abstract void |
playPlaceSound() |
void |
readEntityFromNBT(NBTTagCompound compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
void |
setPosition(double x,
double y,
double z)
Sets the x,y,z of the entity from the given parameters.
|
protected boolean |
shouldSetPosAfterLoading() |
protected void |
updateBoundingBox()
Updates the entity bounding box based on current facing
|
protected void |
updateFacingWithBoundingBox(EnumFacing facingDirectionIn)
Updates facing and bounding box based on it
|
void |
writeEntityToNBT(NBTTagCompound compound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
addEntityCrashInfo, addPassenger, addTag, addTrackingPlayer, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, awardKillScore, canBeAttackedWithItem, canBePushed, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canRiderInteract, canTrample, canTriggerWalking, canUseCommand, changeDimension, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, dismountRidingEntity, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, dropItem, dropItemWithOffset, equals, extinguish, fall, getAdjustedHorizontalFacing, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCapability, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getControllingPassenger, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getFireImmuneTicks, getFlag, getForward, getHeldEquipment, getHoverEvent, getIsInvulnerable, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxFallHeight, getMaxInPortalTime, getMountedYOffset, getName, getParts, getPassengers, getPersistentID, getPickedResult, getPitchYaw, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotationYawHead, getServer, getSoundCategory, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, getYOffset, handleStatusUpdate, handleWaterMovement, hasCapability, hasCustomName, hashCode, hasNoGravity, 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, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onAddedToWorld, onCollideWithPlayer, onEntityUpdate, onInsideBlock, onKillCommand, onKillEntity, onRemovedFromWorld, outOfWorld, performHurtAnimation, playFlySound, playSound, playStepSound, preparePlayerToSpawn, processInitialInteract, 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, setPositionAndRotation, setPositionAndRotationDirect, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSize, setSneaking, setSprinting, setUniqueId, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, spawnRunningParticles, startRiding, startRiding, toString, turn, updateFallState, updatePassenger, updateRidden, writeToNBT, writeToNBTAtomically, writeToNBTOptionalprotected BlockPos hangingPosition
public EnumFacing facingDirection
public EntityHanging(World worldIn)
protected void entityInit()
entityInit in class Entityprotected void updateFacingWithBoundingBox(EnumFacing facingDirectionIn)
protected void updateBoundingBox()
public void onUpdate()
public boolean onValidSurface()
public boolean canBeCollidedWith()
canBeCollidedWith in class Entitypublic boolean hitByEntity(Entity entityIn)
hitByEntity in class Entitypublic EnumFacing getHorizontalFacing()
getHorizontalFacing in class Entitypublic boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom in class Entitypublic void move(MoverType type, double x, double y, double z)
public void addVelocity(double x,
double y,
double z)
Entity.isAirBorne to true.addVelocity in class Entitypublic void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT in class Entitypublic void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT in class Entitypublic abstract int getWidthPixels()
public abstract int getHeightPixels()
public abstract void onBroken(Entity brokenEntity)
public abstract void playPlaceSound()
public EntityItem entityDropItem(ItemStack stack, float offsetY)
entityDropItem in class Entityprotected boolean shouldSetPosAfterLoading()
shouldSetPosAfterLoading in class Entitypublic void setPosition(double x,
double y,
double z)
setPosition in class Entitypublic BlockPos getHangingPosition()
public float getRotatedYaw(Rotation transformRotation)
getRotatedYaw in class Entitypublic float getMirroredYaw(Mirror transformMirror)
getMirroredYaw in class Entitypublic void onStruckByLightning(EntityLightningBolt lightningBolt)
onStruckByLightning in class Entity