Available Methods
- getHeldItem ( )
- isSneaking ( )
- openGui ( )
- sendMessage ( )
- getDistanceSq ( )
- getCapability ( )
- isCreative ( )
- addPotionEffect ( )
- getEntityWorld ( )
- getHeldItemMainhand ( )
- getCurrentEquippedItem ( )
- sendStatusMessage ( )
- addChatMessage ( )
- addStat ( )
- canPlayerEdit ( )
- getCommandSenderName ( )
- swingItem ( )
- setActiveHand ( )
- playSound ( )
- dropItem ( )
- addChatComponentMessage ( )
- isPotionActive ( )
- mountEntity ( )
- getUniqueID ( )
- getCurrentArmor ( )
- getBukkitEntity ( )
- canEat ( )
- isInWater ( )
- getHealth ( )
- onItemPickup ( )
- addExhaustion ( )
- getEntityData ( )
- setHeldItem ( )
- getEyeHeight ( )
- dropPlayerItemWithRandomChoice ( )
- getEntityId ( )
- setPositionAndUpdate ( )
- isEntityAlive ( )
- isInsideOfMaterial ( )
- xpBarCap ( )
- getDistanceSqToEntity ( )
- getEntityAttribute ( )
- setAir ( )
- attackEntityFrom ( )
- getUUID ( )
- isInvisible ( )
- swingArm ( )
- jump ( )
- getAir ( )
- getLook ( )
- getHeldItemOffhand ( )
- startRiding ( )
- getInventoryEnderChest ( )
- onDeath ( )
- extinguish ( )
- isBurning ( )
- getMaxHealth ( )
- isHandActive ( )
- setCurrentItemOrArmor ( )
- sendChatToPlayer ( )
- displayGUIChest ( )
Related Classes
- java.util.Iterator
- java.util.UUID
- javax.annotation.Nullable
- javax.annotation.Nonnull
- org.lwjgl.opengl.GL11
- net.minecraft.world.World
- net.minecraft.item.ItemStack
- net.minecraft.block.Block
- net.minecraft.client.Minecraft
- net.minecraft.item.Item
- net.minecraft.entity.Entity
- net.minecraft.nbt.NBTTagCompound
- net.minecraft.tileentity.TileEntity
- net.minecraft.init.Blocks
- net.minecraft.entity.EntityLivingBase
- net.minecraft.entity.player.EntityPlayerMP
- net.minecraft.init.Items
- net.minecraft.util.math.BlockPos
- net.minecraft.entity.item.EntityItem
- net.minecraftforge.fml.relauncher.Side
- net.minecraftforge.fml.common.eventhandler.SubscribeEvent
- net.minecraft.client.resources.I18n
- net.minecraft.util.EnumFacing
- net.minecraftforge.fml.relauncher.SideOnly
- net.minecraft.util.math.MathHelper
Java Code Examples for net.minecraft.entity.player.EntityPlayer#jump()
The following examples show how to use
net.minecraft.entity.player.EntityPlayer#jump() .
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: GTEventOnLivingFall.java From GT-Classic with GNU Lesser General Public License v3.0 | 6 votes |
@SubscribeEvent public void onEntityFall(LivingFallEvent event) { if (event.getEntityLiving() instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.getEntityLiving(); for (ItemStack armor : player.getEquipmentAndArmor()) { if (armor.getItem() instanceof GTItemSpringBoots) { float amount = event.getDistance(); if (amount < 20) { event.setResult(Event.Result.DENY); event.setCanceled(true); } else { armor.damageItem(Math.round(amount), player); event.setDamageMultiplier(event.getDamageMultiplier() * 0.5F); player.jump(); event.getEntity().playSound(GTSounds.SPRING, 1.0F, 1.0F + player.getEntityWorld().rand.nextFloat()); } } } } }
Example 2
Source File: GTItemSpringBoots.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { Potion jump = MobEffects.JUMP_BOOST; if (!player.isPotionActive(jump)) { player.addPotionEffect(new PotionEffect(jump, 10, 2, false, false)); } if (player.onGround && player.isSprinting()) { player.jump(); player.playSound(GTSounds.SPRING, 1.0F, 1.0F + world.rand.nextFloat()); if (world.rand.nextInt(2) == 0) { stack.damageItem(1, player); } } }