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 class
EntityMinecart.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 void
applyDrag()
void
applyEntityCollision(Entity entity)
+ Applies a velocity to each of the entities pushing them away from each other.boolean
attackEntityFrom(DamageSource damagesource, float f)
+ 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
canTriggerWalking()
+ returns if this entity triggers Block.onEntityWalking on the blocks they walk on.protected void
entityInit()
void
func_174899_a(IBlockState parIBlockState)
static EntityMinecart
func_180458_a(World worldIn, double parDouble1, double parDouble2, double parDouble3, EntityMinecart.EnumMinecartType parEnumMinecartType)
protected void
func_180460_a(BlockPos parBlockPos, IBlockState parIBlockState)
Vec3
func_70489_a(double parDouble1, double parDouble2, double parDouble3)
Vec3
func_70495_a(double parDouble1, double parDouble2, double parDouble3, double parDouble4)
AxisAlignedBB
getCollisionBoundingBox()
+ Returns the collision bounding box for this entityAxisAlignedBB
getCollisionBox(Entity entity)
+ Returns a boundingBox used to collide the entity with other entities and blocks.java.lang.String
getCustomNameTag()
float
getDamage()
+ Gets the current amount of damage the minecart has taken.IBlockState
getDefaultDisplayTile()
int
getDefaultDisplayTileOffset()
IChatComponent
getDisplayName()
+ Get the formatted ChatComponent that will be used for the sender's username in chatIBlockState
getDisplayTile()
int
getDisplayTileOffset()
protected double
getMaximumSpeed()
+ Get's the maximum speed for a minecartabstract EntityMinecart.EnumMinecartType
getMinecartType()
double
getMountedYOffset()
+ Returns the Y offset from the entity's position for any entity riding this one.java.lang.String
getName()
+ Gets the name of this command sender (usually username, but possibly "Rcon")int
getRollingAmplitude()
+ Gets the rolling amplitude the cart rolls while being attacked.int
getRollingDirection()
+ Gets the rolling direction the cart rolls while being attacked.boolean
hasCustomName()
+ Returns true if this thing is namedboolean
hasDisplayTile()
void
killMinecart(DamageSource parDamageSource)
protected void
moveDerailedMinecart()
+ Moves a minecart that is not attached to a railvoid
onActivatorRailPass(int x, int y, int z, boolean receivingPower)
+ Called every tick the minecart is on an activator rail.void
onUpdate()
+ Called to update the entity's position/logic.void
performHurtAnimation()
+ Setups the entity to do the hurt animation.protected void
readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.void
setCustomNameTag(java.lang.String s)
+ Sets the custom name tag for this entityvoid
setDamage(float parFloat1)
+ Sets the current amount of damage the minecart has taken.void
setDead()
+ Will get destroyed next tick.void
setDisplayTileOffset(int parInt1)
void
setHasDisplayTile(boolean parFlag)
void
setPosition(double d0, double d1, double d2)
+ Sets the x,y,z of the entity from the given parameters.void
setPositionAndRotation2(double d0, double d1, double d2, float f, float f1, int i, boolean var10)
void
setRollingAmplitude(int parInt1)
+ Sets the rolling amplitude the cart rolls while being attacked.void
setRollingDirection(int parInt1)
+ Sets the rolling direction the cart rolls while being attacked.void
setVelocity(double d0, double d1, double d2)
+ Sets the velocity to the args.protected void
writeEntityToNBT(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:
canTriggerWalking
in classEntity
-
entityInit
protected void entityInit()
- Specified by:
entityInit
in 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:
getCollisionBox
in classEntity
-
getCollisionBoundingBox
public AxisAlignedBB getCollisionBoundingBox()
+ Returns the collision bounding box for this entity- Overrides:
getCollisionBoundingBox
in classEntity
-
canBePushed
public boolean canBePushed()
+ Returns true if this entity should push and be pushed by other entities when colliding.- Overrides:
canBePushed
in classEntity
-
getMountedYOffset
public double getMountedYOffset()
+ Returns the Y offset from the entity's position for any entity riding this one.- Overrides:
getMountedYOffset
in classEntity
-
attackEntityFrom
public boolean attackEntityFrom(DamageSource damagesource, float f)
+ Called when the entity is attacked.- Overrides:
attackEntityFrom
in 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:
performHurtAnimation
in classEntity
-
canBeCollidedWith
public boolean canBeCollidedWith()
+ Returns true if other Entities should be prevented from moving through this Entity.- Overrides:
canBeCollidedWith
in 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:
setPosition
in 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:
readEntityFromNBT
in classEntity
-
writeEntityToNBT
protected void writeEntityToNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to write subclass entity data to NBT.- Specified by:
writeEntityToNBT
in classEntity
-
applyEntityCollision
public void applyEntityCollision(Entity entity)
+ Applies a velocity to each of the entities pushing them away from each other. Args: entity- Overrides:
applyEntityCollision
in classEntity
-
setPositionAndRotation2
public void setPositionAndRotation2(double d0, double d1, double d2, float f, float f1, int i, boolean var10)
- Overrides:
setPositionAndRotation2
in classEntity
-
setVelocity
public void setVelocity(double d0, double d1, double d2)
+ Sets the velocity to the args. Args: x, y, z- Overrides:
setVelocity
in 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:
setCustomNameTag
in classEntity
-
getName
public java.lang.String getName()
+ Gets the name of this command sender (usually username, but possibly "Rcon")- Specified by:
getName
in interfaceIWorldNameable
- Overrides:
getName
in classEntity
-
hasCustomName
public boolean hasCustomName()
+ Returns true if this thing is named- Specified by:
hasCustomName
in interfaceIWorldNameable
- Overrides:
hasCustomName
in classEntity
-
getCustomNameTag
public java.lang.String getCustomNameTag()
- Overrides:
getCustomNameTag
in classEntity
-
getDisplayName
public IChatComponent getDisplayName()
+ Get the formatted ChatComponent that will be used for the sender's username in chat- Specified by:
getDisplayName
in interfaceIWorldNameable
- Overrides:
getDisplayName
in classEntity
-
-