Package api.entity.mechanical
Class MechanicalPowerSourceEntity
java.lang.Object
net.minecraft.src.Entity
api.entity.mechanical.MechanicalPowerSourceEntity
- All Implemented Interfaces:
EntityWithCustomPacket
- Direct Known Subclasses:
MechanicalPowerSourceEntityHorizontal,VerticalWindMillEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionintprotected intprotected booleanintfloatintFields inherited from class net.minecraft.src.Entity
addedToChunk, boundingBox, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastGroundPosX, lastGroundPosY, lastGroundPosZ, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, nextBlockCheckDistance, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize -
Constructor Summary
ConstructorsConstructorDescriptionMechanicalPowerSourceEntity(World world) MechanicalPowerSourceEntity(World world, double x, double y, double z) -
Method Summary
Modifier and TypeMethodDescriptionbooleanattackEntityFrom(DamageSource damageSource, float i) Called when the entity is attacked.booleanbooleanReturns true if other Entities should be prevented from moving through this Entity.booleanReturns true if this entity should push and be pushed by other entities when colliding.protected booleanreturns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to prevent them from trampling cropsabstract floatabstract voidprotected voidreturns the bounding box for this entitygetCollisionBox(Entity entity) Returns a boundingBox used to collide the entity with other entities and blocks.abstract floatgetDepth()abstract AxisAlignedBBabstract floatabstract intfloatintfloatabstract intintintbooleanabstract floatgetWidth()abstract voidbooleanvoidmoveEntity(double deltaX, double deltaY, double deltaZ) protected voidprotected voidvoidonUpdate()Called to update the entity's position/logic.voidSetups the entity to do the hurt animation.voidsetFire(int i) Sets entity to burn for x amount of seconds, cannot lower amount of existing fire.voidsetPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) Sets the position and rotation.voidsetRotationSpeed(float fRotation) voidsetRotationSpeedScaled(int iRotationSpeedScaled) booleanPartially disables server-side visibility tests for interacting with an entityprotected booleanabstract voidabstract booleanprotected abstract booleanMethods inherited from class net.minecraft.src.Entity
addComponent, addEntityCrashInfo, addToPlayerScore, addVelocity, appliesConstantForceWhenRidingBoat, applyEntityCollision, canAttackWithItem, canCollideWithEntity, canEntityTriggerTripwire, canRenderOnFire, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doBlockCollisions, doesEntityApplyToSpawnCap, doesEntityApplyToSquidPossessionCap, doesEntityNotTriggerPressurePlate, doesNotDismountInWater, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, flagAllWatchedObjectsDirty, flingAwayFromEntity, getAir, getAnimalKickMovementMultiplier, getBlockExplosionResistance, getBrightness, getBrightnessForRender, getCanBeHeadCrabbed, getCollisionBorderSize, getComponent, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityName, getEntityString, getEyeHeight, getFlag, getHeadCrabSharedAttackTarget, getLastActiveItems, getLookVec, getMaxInPortalTime, getMaxSafePointTries, getMountedYOffset, getParts, getPortalCooldown, getRotationYawHead, getTeleportDirection, getTranslatedEntityName, getUniqueID, getVisualBoundingBox, getXZDistanceSqToEntity, getYOffset, handleHealthUpdate, handleLavaMovement, handleWaterMovement, hasComponent, hashCode, hasHeadCrabbedSquid, hitByEntity, initComponents, interactFirst, isAffectedByMovementModifiers, isBeingRainedOn, isBurning, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInsideOpaqueBlock, isEntityInsideSuffocatingBlock, isEntityInsideSuffocatingBlock, isEntityInvulnerable, isImmuneToFire, isImmuneToHeadCrabDamage, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isItemEntity, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSecondaryTargetForSquid, isSneaking, isSprinting, isUsingSpecialKey, isValidOngoingAttackTargetForSquid, isValidZombieSecondaryTarget, isWet, kill, mountEntity, mountEntityRemote, moveFlying, movementModifierWhenRidingBoat, newDoubleNBTList, newFloatNBTList, notifyOfWolfHowl, onBlockDispenserConsume, onChunkLoad, onCollideWithPlayer, onEntityUpdate, onFlungBySquidTentacle, onHeadCrabbedBySquid, onKickedByAnimal, onKillEntity, onPossessedRidingEntityDeath, onStruckByLightning, outOfUpdateRangeUpdate, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, readEntityFromNBT, readFromNBT, setAir, setAngles, setBeenAttacked, setCurrentItemOrArmor, setDead, setEating, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setRotationYawHead, setSize, setSneaking, setSprinting, setVelocity, setWorld, shouldExplodeBlock, shouldSetPosAfterLoading, toString, travelToDimension, tryToSetFireToBlocksInContact, updateCloak, updateFallState, updateRidden, updateRiderPosition, writeEntityToNBT, writeMountToNBT, writeToNBT, writeToNBTOptionalMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface api.entity.EntityWithCustomPacket
getSpawnPacketForThisEntity
-
Field Details
-
rotation
public float rotation -
currentDamage
public int currentDamage -
timeSinceHit
public int timeSinceHit -
rockDirection
public int rockDirection -
providingPower
protected boolean providingPower -
fullUpdateTickCount
protected int fullUpdateTickCount
-
-
Constructor Details
-
MechanicalPowerSourceEntity
-
MechanicalPowerSourceEntity
-
-
Method Details
-
entityInit
protected void entityInit()- Specified by:
entityInitin classEntity
-
canTriggerWalking
protected boolean canTriggerWalking()Description copied from class:Entityreturns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to prevent them from trampling crops- Overrides:
canTriggerWalkingin classEntity
-
getCollisionBox
Description copied from class:EntityReturns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be pushable on contact, like boats or minecarts.- Overrides:
getCollisionBoxin classEntity
-
getBoundingBox
Description copied from class:Entityreturns the bounding box for this entity- Overrides:
getBoundingBoxin classEntity
-
canBePushed
public boolean canBePushed()Description copied from class:EntityReturns true if this entity should push and be pushed by other entities when colliding.- Overrides:
canBePushedin classEntity
-
canBeCollidedWith
public boolean canBeCollidedWith()Description copied from class:EntityReturns true if other Entities should be prevented from moving through this Entity.- Overrides:
canBeCollidedWithin classEntity
-
moveEntity
public void moveEntity(double deltaX, double deltaY, double deltaZ) - Overrides:
moveEntityin classEntity
-
setFire
public void setFire(int i) Description copied from class:EntitySets entity to burn for x amount of seconds, cannot lower amount of existing fire. -
attackEntityFrom
Description copied from class:EntityCalled when the entity is attacked.- Overrides:
attackEntityFromin classEntity
-
onUpdate
public void onUpdate()Description copied from class:EntityCalled to update the entity's position/logic. -
shouldSetPositionOnLoad
protected boolean shouldSetPositionOnLoad()- Overrides:
shouldSetPositionOnLoadin classEntity
-
attractsLightning
public boolean attractsLightning()- Overrides:
attractsLightningin classEntity
-
getTrackerViewDistance
public int getTrackerViewDistance()- Specified by:
getTrackerViewDistancein interfaceEntityWithCustomPacket
-
getTrackerUpdateFrequency
public int getTrackerUpdateFrequency()- Specified by:
getTrackerUpdateFrequencyin interfaceEntityWithCustomPacket
-
getTrackMotion
public boolean getTrackMotion()- Specified by:
getTrackMotionin interfaceEntityWithCustomPacket
-
shouldServerTreatAsOversized
public boolean shouldServerTreatAsOversized()Description copied from interface:EntityWithCustomPacketPartially disables server-side visibility tests for interacting with an entity- Specified by:
shouldServerTreatAsOversizedin interfaceEntityWithCustomPacket
-
getWidth
public abstract float getWidth() -
getHeight
public abstract float getHeight() -
getDepth
public abstract float getDepth() -
initBoundingBox
public abstract void initBoundingBox() -
getDeviceBounds
-
getMaxDamage
public abstract int getMaxDamage() -
getTicksPerFullUpdate
public abstract int getTicksPerFullUpdate() -
destroyWithDrop
public abstract void destroyWithDrop() -
validateAreaAroundDevice
public abstract boolean validateAreaAroundDevice() -
validateConnectedAxles
protected abstract boolean validateConnectedAxles() -
computeRotation
public abstract float computeRotation() -
transferPowerStateToConnectedAxles
public abstract void transferPowerStateToConnectedAxles() -
onClientRotationOctantChange
protected void onClientRotationOctantChange() -
isClearOfBlockingEntities
public boolean isClearOfBlockingEntities() -
getRotationSpeed
public float getRotationSpeed() -
setRotationSpeed
public void setRotationSpeed(float fRotation) -
getRotationSpeedScaled
public int getRotationSpeedScaled() -
setRotationSpeedScaled
public void setRotationSpeedScaled(int iRotationSpeedScaled) -
onFullUpdateServer
protected void onFullUpdateServer() -
setPositionAndRotation2
@Environment(CLIENT) public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) Description copied from class:EntitySets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, posY, posZ, yaw, pitch- Overrides:
setPositionAndRotation2in classEntity
-
getShadowSize
@Environment(CLIENT) public float getShadowSize()- Overrides:
getShadowSizein classEntity
-
performHurtAnimation
@Environment(CLIENT) public void performHurtAnimation()Description copied from class:EntitySetups the entity to do the hurt animation. Only used by packets in multiplayer.- Overrides:
performHurtAnimationin classEntity
-