Package net.minecraft.entity.item
Class EntityMinecart
- java.lang.Object
-
- net.zxmushroom63.plugins.BaseData
-
- net.zxmushroom63.plugins.PluginData
-
- net.minecraft.entity.Entity
-
- net.minecraft.entity.item.EntityMinecart
-
- All Implemented Interfaces:
IWorldNameable,org.teavm.jso.JSObject
- Direct Known Subclasses:
EntityMinecartCommandBlock,EntityMinecartContainer,EntityMinecartEmpty,EntityMinecartFurnace,EntityMinecartMobSpawner,EntityMinecartTNT
public abstract class EntityMinecart extends Entity implements IWorldNameable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntityMinecart.EnumMinecartType-
Nested classes/interfaces inherited from class net.zxmushroom63.plugins.BaseData
BaseData.BooleanCallback, BaseData.BooleanCallbackArr, BaseData.DataBooleanCallback, BaseData.DataBooleanCallbackArr, BaseData.DataDoubleCallback, BaseData.DataDoubleCallbackArr, BaseData.DataFloatCallback, BaseData.DataFloatCallbackArr, BaseData.DataIntCallback, BaseData.DataIntCallbackArr, BaseData.DataObjectCallback, BaseData.DataObjectCallbackArr, BaseData.DataStringCallback, BaseData.DataStringCallbackArr, BaseData.DataVoidCallback, BaseData.DoubleCallback, BaseData.DoubleCallbackArr, BaseData.FloatCallback, BaseData.FloatCallbackArr, BaseData.IntCallback, BaseData.IntCallbackArr, BaseData.ObjectCallback, BaseData.ObjectCallbackArr, BaseData.StringCallback, BaseData.StringCallbackArr, BaseData.VoidCallback
-
-
Field Summary
-
Fields inherited from class net.minecraft.entity.Entity
addedToChunk, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, field_181016_an, field_181017_ao, field_181018_ap, fireResistance, firstUpdate, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj
-
-
Constructor Summary
Constructors Constructor Description EntityMinecart(World worldIn)EntityMinecart(World worldIn, double x, double y, double z)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidapplyDrag()voidapplyEntityCollision(Entity entity)+ Applies a velocity to each of the entities pushing them away from each other.booleanattackEntityFrom(DamageSource damagesource, float f)+ Called when the entity is attacked.booleancanBeCollidedWith()+ Returns true if other Entities should be prevented from moving through this Entity.booleancanBePushed()+ Returns true if this entity should push and be pushed by other entities when colliding.protected booleancanTriggerWalking()+ returns if this entity triggers Block.onEntityWalking on the blocks they walk on.protected voidentityInit()voidfunc_174899_a(IBlockState parIBlockState)static EntityMinecartfunc_180458_a(World worldIn, double parDouble1, double parDouble2, double parDouble3, EntityMinecart.EnumMinecartType parEnumMinecartType)protected voidfunc_180460_a(BlockPos parBlockPos, IBlockState parIBlockState)Vec3func_70489_a(double parDouble1, double parDouble2, double parDouble3)Vec3func_70495_a(double parDouble1, double parDouble2, double parDouble3, double parDouble4)AxisAlignedBBgetCollisionBoundingBox()+ Returns the collision bounding box for this entityAxisAlignedBBgetCollisionBox(Entity entity)+ Returns a boundingBox used to collide the entity with other entities and blocks.java.lang.StringgetCustomNameTag()floatgetDamage()+ Gets the current amount of damage the minecart has taken.IBlockStategetDefaultDisplayTile()intgetDefaultDisplayTileOffset()IChatComponentgetDisplayName()+ Get the formatted ChatComponent that will be used for the sender's username in chatIBlockStategetDisplayTile()intgetDisplayTileOffset()protected doublegetMaximumSpeed()+ Get's the maximum speed for a minecartabstract EntityMinecart.EnumMinecartTypegetMinecartType()doublegetMountedYOffset()+ Returns the Y offset from the entity's position for any entity riding this one.java.lang.StringgetName()+ Gets the name of this command sender (usually username, but possibly "Rcon")intgetRollingAmplitude()+ Gets the rolling amplitude the cart rolls while being attacked.intgetRollingDirection()+ Gets the rolling direction the cart rolls while being attacked.booleanhasCustomName()+ Returns true if this thing is namedbooleanhasDisplayTile()voidkillMinecart(DamageSource parDamageSource)protected voidmoveDerailedMinecart()+ Moves a minecart that is not attached to a railvoidonActivatorRailPass(int x, int y, int z, boolean receivingPower)+ Called every tick the minecart is on an activator rail.voidonUpdate()+ Called to update the entity's position/logic.voidperformHurtAnimation()+ Setups the entity to do the hurt animation.protected voidreadEntityFromNBT(NBTTagCompound nbttagcompound)+ (abstract) Protected helper method to read subclass entity data from NBT.voidsetCustomNameTag(java.lang.String s)+ Sets the custom name tag for this entityvoidsetDamage(float parFloat1)+ Sets the current amount of damage the minecart has taken.voidsetDead()+ Will get destroyed next tick.voidsetDisplayTileOffset(int parInt1)voidsetHasDisplayTile(boolean parFlag)voidsetPosition(double d0, double d1, double d2)+ Sets the x,y,z of the entity from the given parameters.voidsetPositionAndRotation2(double d0, double d1, double d2, float f, float f1, int i, boolean var10)voidsetRollingAmplitude(int parInt1)+ Sets the rolling amplitude the cart rolls while being attacked.voidsetRollingDirection(int parInt1)+ Sets the rolling direction the cart rolls while being attacked.voidsetVelocity(double d0, double d1, double d2)+ Sets the velocity to the args.protected voidwriteEntityToNBT(NBTTagCompound nbttagcompound)+ (abstract) Protected helper method to write subclass entity data to NBT.-
Methods inherited from class net.minecraft.entity.Entity
addChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, canAttackWithItem, canCommandSenderUseCommand, canRenderOnFire, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, fromNBT, func_181012_aH, func_181013_g, func_181014_aG, func_181015_d, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCommandSenderEntity, getDataWatcher, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getEyeHeight, getFlag, getHorizontalFacing, getHoverEvent, getInventory, getLook, getLookVec, getMaxFallHeight, getMaxInPortalTime, getNBTTagCompound, getParts, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getRotationYawHead, getSplashSound, getSwimSound, getUniqueID, getVectorForRotation, getYOffset, handleStatusUpdate, handleWaterMovement, hashCode, hitByEntity, interactAt, interactFirst, isBurning, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOutsideBorder, isPushedByWater, isRiding, isSilent, isSneaking, isSprinting, isWet, kill, loadPluginData, makePluginData, mountEntity, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onDataWatcherUpdate, onEntityUpdate, onKillCommand, onKillEntity, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, replaceItemInInventory, resetHeight, sendCommandFeedback, setAir, setAlwaysRenderNameTag, setAngles, setBeenAttacked, setCurrentItemOrArmor, setEating, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPositionAndRotation, setPositionAndUpdate, setRotation, setRotationYawHead, setSilent, setSize, setSneaking, setSprinting, setWorld, shouldSetPosAfterLoading, spawnRunningParticles, toNBT, toString, travelToDimension, updateFallState, updateRidden, updateRiderPosition, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptional
-
Methods inherited from class net.zxmushroom63.plugins.BaseData
execFuncBaseData, execFuncObject, execFuncString, getBaseData, getBaseDataArr, getBoolean, getBooleanArr, getByte, getByteArr, getChar, getCharArr, getDouble, getDoubleArr, getFloat, getFloatArr, getInt, getIntArr, getObject, getObjectArr, getShort, getShortArr, getString, getStringArr, has, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setCallbackBoolean, setCallbackBooleanArr, setCallbackBooleanArrWithDataArg, setCallbackBooleanWithDataArg, setCallbackDouble, setCallbackDoubleArr, setCallbackDoubleArrWithDataArg, setCallbackDoubleWithDataArg, setCallbackFloat, setCallbackFloatArr, setCallbackFloatArrWithDataArg, setCallbackFloatWithDataArg, setCallbackInt, setCallbackIntArr, setCallbackIntArrWithDataArg, setCallbackIntWithDataArg, setCallbackObject, setCallbackObjectArr, setCallbackObjectArrWithDataArg, setCallbackObjectWithDataArg, setCallbackString, setCallbackStringArr, setCallbackStringArrWithDataArg, setCallbackStringWithDataArg, setCallbackVoid, setCallbackVoidWithDataArg, setNull
-
-
-
-
Method Detail
-
func_180458_a
public static EntityMinecart func_180458_a(World worldIn, double parDouble1, double parDouble2, double parDouble3, EntityMinecart.EnumMinecartType parEnumMinecartType)
-
canTriggerWalking
protected boolean canTriggerWalking()
+ returns 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
-
entityInit
protected void entityInit()
- Specified by:
entityInitin classEntity
-
getCollisionBox
public AxisAlignedBB getCollisionBox(Entity entity)
+ Returns 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
-
getCollisionBoundingBox
public AxisAlignedBB getCollisionBoundingBox()
+ Returns the collision bounding box for this entity- Overrides:
getCollisionBoundingBoxin classEntity
-
canBePushed
public boolean canBePushed()
+ Returns true if this entity should push and be pushed by other entities when colliding.- Overrides:
canBePushedin classEntity
-
getMountedYOffset
public double getMountedYOffset()
+ Returns the Y offset from the entity's position for any entity riding this one.- Overrides:
getMountedYOffsetin classEntity
-
attackEntityFrom
public boolean attackEntityFrom(DamageSource damagesource, float f)
+ Called when the entity is attacked.- Overrides:
attackEntityFromin classEntity
-
killMinecart
public void killMinecart(DamageSource parDamageSource)
-
performHurtAnimation
public void performHurtAnimation()
+ Setups the entity to do the hurt animation. Only used by packets in multiplayer.- Overrides:
performHurtAnimationin classEntity
-
canBeCollidedWith
public boolean canBeCollidedWith()
+ Returns true if other Entities should be prevented from moving through this Entity.- Overrides:
canBeCollidedWithin classEntity
-
onUpdate
public void onUpdate()
+ Called to update the entity's position/logic.
-
getMaximumSpeed
protected double getMaximumSpeed()
+ Get's the maximum speed for a minecart
-
onActivatorRailPass
public void onActivatorRailPass(int x, int y, int z, boolean receivingPower)+ Called every tick the minecart is on an activator rail. Args: x, y, z, is the rail receiving power
-
moveDerailedMinecart
protected void moveDerailedMinecart()
+ Moves a minecart that is not attached to a rail
-
func_180460_a
protected void func_180460_a(BlockPos parBlockPos, IBlockState parIBlockState)
-
applyDrag
protected void applyDrag()
-
setPosition
public void setPosition(double d0, double d1, double d2)+ Sets the x,y,z of the entity from the given parameters. Also seems to set up a bounding box.- Overrides:
setPositionin classEntity
-
func_70495_a
public Vec3 func_70495_a(double parDouble1, double parDouble2, double parDouble3, double parDouble4)
-
func_70489_a
public Vec3 func_70489_a(double parDouble1, double parDouble2, double parDouble3)
-
readEntityFromNBT
protected void readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.- Specified by:
readEntityFromNBTin classEntity
-
writeEntityToNBT
protected void writeEntityToNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to write subclass entity data to NBT.- Specified by:
writeEntityToNBTin classEntity
-
applyEntityCollision
public void applyEntityCollision(Entity entity)
+ Applies a velocity to each of the entities pushing them away from each other. Args: entity- Overrides:
applyEntityCollisionin classEntity
-
setPositionAndRotation2
public void setPositionAndRotation2(double d0, double d1, double d2, float f, float f1, int i, boolean var10)- Overrides:
setPositionAndRotation2in classEntity
-
setVelocity
public void setVelocity(double d0, double d1, double d2)+ Sets the velocity to the args. Args: x, y, z- Overrides:
setVelocityin classEntity
-
setDamage
public void setDamage(float parFloat1)
+ Sets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over 40.
-
getDamage
public float getDamage()
+ Gets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over 40.
-
setRollingAmplitude
public void setRollingAmplitude(int parInt1)
+ Sets the rolling amplitude the cart rolls while being attacked.
-
getRollingAmplitude
public int getRollingAmplitude()
+ Gets the rolling amplitude the cart rolls while being attacked.
-
setRollingDirection
public void setRollingDirection(int parInt1)
+ Sets the rolling direction the cart rolls while being attacked. Can be 1 or -1.
-
getRollingDirection
public int getRollingDirection()
+ Gets the rolling direction the cart rolls while being attacked. Can be 1 or -1.
-
getMinecartType
public abstract EntityMinecart.EnumMinecartType getMinecartType()
-
getDisplayTile
public IBlockState getDisplayTile()
-
getDefaultDisplayTile
public IBlockState getDefaultDisplayTile()
-
getDisplayTileOffset
public int getDisplayTileOffset()
-
getDefaultDisplayTileOffset
public int getDefaultDisplayTileOffset()
-
func_174899_a
public void func_174899_a(IBlockState parIBlockState)
-
setDisplayTileOffset
public void setDisplayTileOffset(int parInt1)
-
hasDisplayTile
public boolean hasDisplayTile()
-
setHasDisplayTile
public void setHasDisplayTile(boolean parFlag)
-
setCustomNameTag
public void setCustomNameTag(java.lang.String s)
+ Sets the custom name tag for this entity- Overrides:
setCustomNameTagin classEntity
-
getName
public java.lang.String getName()
+ Gets the name of this command sender (usually username, but possibly "Rcon")- Specified by:
getNamein interfaceIWorldNameable- Overrides:
getNamein classEntity
-
hasCustomName
public boolean hasCustomName()
+ Returns true if this thing is named- Specified by:
hasCustomNamein interfaceIWorldNameable- Overrides:
hasCustomNamein classEntity
-
getCustomNameTag
public java.lang.String getCustomNameTag()
- Overrides:
getCustomNameTagin classEntity
-
getDisplayName
public IChatComponent getDisplayName()
+ Get the formatted ChatComponent that will be used for the sender's username in chat- Specified by:
getDisplayNamein interfaceIWorldNameable- Overrides:
getDisplayNamein classEntity
-
-