本文整理汇总了Java中net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent.getEntity方法的典型用法代码示例。如果您正苦于以下问题:Java LivingJumpEvent.getEntity方法的具体用法?Java LivingJumpEvent.getEntity怎么用?Java LivingJumpEvent.getEntity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent
的用法示例。
在下文中一共展示了LivingJumpEvent.getEntity方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onLivingJump
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onLivingJump(LivingJumpEvent event)
{
if (event.getEntity() == this.victim)
{
event.getEntity().motionY += 0.2D;
}
}
示例2: onJump
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onJump(@Nonnull final LivingJumpEvent event) {
if (!ModOptions.enableJumpSound)
return;
if (event.getEntity() == null || event.getEntity().world == null)
return;
if (event.getEntity().world.isRemote && EnvironState.isPlayer(event.getEntity())) {
final BasicSound<?> sound = makeSound(Sounds.JUMP);
SoundEffectHandler.INSTANCE.playSound(sound);
}
}
示例3: onJump
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onJump(LivingJumpEvent e) {
final Entity entity = e.getEntity();
JumpInfo boost = jumpBoosts.remove(entity);
if (boost != null) {
boost.modifyVelocity(entity);
if (OpenMods.proxy.isClientPlayer(entity)) {
KeyBinding.setKeyBindState(Minecraft.getMinecraft().gameSettings.keyBindJump.getKeyCode(), false);
}
}
}