Available Methods
- attackEntityFrom ( )
- getEyeHeight ( )
- isSneaking ( )
- setLocationAndAngles ( )
- getPositionVector ( )
- getEntityId ( )
- getLook ( )
- setDead ( )
- getEntityWorld ( )
- setFire ( )
- getBukkitEntity ( )
- isBeingRidden ( )
- getPosition ( )
- getPositionEyes ( )
- getEntityBoundingBox ( )
- setPosition ( )
- setGlowing ( )
- getCapability ( )
- isCreatureType ( )
- getDistanceSqToEntity ( )
- setWorld ( )
- startRiding ( )
- getDistanceToEntity ( )
- setVelocity ( )
- getClass ( )
- getDistanceSq ( )
- writeToNBT ( )
- getName ( )
- moveEntity ( )
- isEntityAlive ( )
- getVelocity ( )
- refreshPositionAndAngles ( )
- slowMovement ( )
- setPositionAndUpdate ( )
- getPassengers ( )
- getPos ( )
- getCustomNameTag ( )
- rayTrace ( )
- getY ( )
- isGlowing ( )
- isInWater ( )
- writeToNBTOptional ( )
- hasNoGravity ( )
- getEntityData ( )
- getExtendedProperties ( )
- getUniqueID ( )
- doesEntityNotTriggerPressurePlate ( )
- getCameraPosVec ( )
- hasCustomName ( )
- isRiding ( )
Related Classes
- java.util.Iterator
- java.util.UUID
- java.util.stream.Collectors
- javax.annotation.Nullable
- javax.annotation.Nonnull
- org.jetbrains.annotations.NotNull
- org.lwjgl.opengl.GL11
- net.minecraft.world.World
- net.minecraft.item.ItemStack
- net.minecraft.block.Block
- net.minecraft.client.Minecraft
- net.minecraftforge.common.MinecraftForge
- net.minecraft.entity.player.EntityPlayer
- net.minecraft.util.ResourceLocation
- net.minecraft.nbt.NBTTagCompound
- net.minecraft.tileentity.TileEntity
- net.minecraft.init.Blocks
- net.minecraft.block.material.Material
- net.minecraft.entity.EntityLivingBase
- net.minecraft.entity.player.EntityPlayerMP
- net.minecraft.util.math.BlockPos
- net.minecraft.server.MinecraftServer
- net.minecraft.entity.item.EntityItem
- net.minecraft.world.chunk.Chunk
- net.minecraftforge.fml.common.eventhandler.SubscribeEvent
Java Code Examples for net.minecraft.entity.Entity#getEntityData()
The following examples show how to use
net.minecraft.entity.Entity#getEntityData() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Nyan.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@SubscribeEvent public static void onLivingUpdate(LivingEvent.LivingUpdateEvent event) { final Entity entity = event.getEntity(); final World world = entity.getEntityWorld(); if(world.isRemote) { return; } final MinecraftServer server = world.getMinecraftServer(); final NBTTagCompound data = entity.getEntityData(); if(data.hasUniqueId(NYANED_ENTITY_UUID_KEY)) { final Entity nyanedEntity = server.getEntityFromUuid(data.getUniqueId(NYANED_ENTITY_UUID_KEY)); if(nyanedEntity == null || nyanedEntity.isDead) { world.removeEntity(entity); return; } } if(data.getBoolean(HAS_NYAN_ENTITY_KEY)) { updateNyanEntity(server, (WorldServer) world, entity, data); } else if(!data.hasKey(HAS_NYAN_ENTITY_KEY)) { if(entity instanceof EntityPlayer || random.nextInt(10) == 0) { data.setBoolean(HAS_NYAN_ENTITY_KEY, true); updateNyanEntity(server, (WorldServer) world, entity, data); } else { data.setBoolean(HAS_NYAN_ENTITY_KEY, false); } } }
Example 2
Source File: SlimeBlock.java From Et-Futurum with The Unlicense | 5 votes |
@Override public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { NBTTagCompound data = entity.getEntityData(); if (data.hasKey(Reference.MOD_ID + ":slime")) { entity.motionY = data.getDouble(Reference.MOD_ID + ":slime"); data.removeTag(Reference.MOD_ID + ":slime"); } if (Math.abs(entity.motionY) < 0.1 && !entity.isSneaking()) { double d = 0.4 + Math.abs(entity.motionY) * 0.2; entity.motionX *= d; entity.motionZ *= d; } }