本文整理汇总了Java中net.minecraftforge.event.entity.player.PlayerFlyableFallEvent类的典型用法代码示例。如果您正苦于以下问题:Java PlayerFlyableFallEvent类的具体用法?Java PlayerFlyableFallEvent怎么用?Java PlayerFlyableFallEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlayerFlyableFallEvent类属于net.minecraftforge.event.entity.player包,在下文中一共展示了PlayerFlyableFallEvent类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onFlyFall
import net.minecraftforge.event.entity.player.PlayerFlyableFallEvent; //导入依赖的package包/类
@SubscribeEvent
public void onFlyFall(PlayerFlyableFallEvent event) {
if (event.getEntityPlayer().getEntityWorld().provider.getDimension() == 0) {
if (event.getEntityPlayer().fallDistance >= ConfigValues.underworldFallDistance) {
BlockPos location = event.getEntityPlayer().getPosition();
BlockPos bedrock = PosUtils.checkNeighborBlocksThoroughly(event.getEntity().getEntityWorld(), location, Blocks.BEDROCK);
if (bedrock != null) {
if (event.getEntity().getEntityWorld().getBlockState(bedrock).getBlock() == Blocks.BEDROCK) {
TeleportUtil.teleportToDimension(event.getEntityPlayer(), Wizardry.underWorld.getId(), 0, 300, 0);
((EntityPlayer) event.getEntity()).addPotionEffect(new PotionEffect(ModPotions.NULLIFY_GRAVITY, 100, 0, true, false));
fallResetter.add(event.getEntity().getUniqueID());
}
}
}
}
}
开发者ID:TeamWizardry,项目名称:Wizardry,代码行数:17,代码来源:EventHandler.java
示例2: fall
import net.minecraftforge.event.entity.player.PlayerFlyableFallEvent; //导入依赖的package包/类
protected void fall(float p_70069_1_)
{
if (!this.capabilities.allowFlying)
{
if (p_70069_1_ >= 2.0F)
{
this.addStat(StatList.distanceFallenStat, (int)Math.round((double)p_70069_1_ * 100.0D));
}
super.fall(p_70069_1_);
}
else
{
MinecraftForge.EVENT_BUS.post(new PlayerFlyableFallEvent(this, p_70069_1_));
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:17,代码来源:EntityPlayer.java
示例3: fall
import net.minecraftforge.event.entity.player.PlayerFlyableFallEvent; //导入依赖的package包/类
/**
* Called when the mob is falling. Calculates and applies fall damage.
*/
protected void fall(float par1)
{
if (!this.capabilities.allowFlying)
{
if (par1 >= 2.0F)
{
this.addStat(StatList.distanceFallenStat, (int)Math.round((double)par1 * 100.0D));
}
super.fall(par1);
}
else
{
MinecraftForge.EVENT_BUS.post(new PlayerFlyableFallEvent(this, par1));
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:20,代码来源:EntityPlayer.java
示例4: fall
import net.minecraftforge.event.entity.player.PlayerFlyableFallEvent; //导入依赖的package包/类
protected void fall(float p_70069_1_)
{
if (!this.capabilities.allowFlying)
{
if (p_70069_1_ >= 2.0F) {
addStat(StatList.distanceFallenStat, (int)Math.round(p_70069_1_ * 100.0D));
}
super.fall(p_70069_1_);
}
else
{
MinecraftForge.EVENT_BUS.post(new PlayerFlyableFallEvent(this, p_70069_1_));
}
}
开发者ID:4Space,项目名称:4Space-5,代码行数:15,代码来源:EntityPlayer.java
示例5: onCreativeFall
import net.minecraftforge.event.entity.player.PlayerFlyableFallEvent; //导入依赖的package包/类
@SubscribeEvent
public void onCreativeFall(PlayerFlyableFallEvent event) {
ZSSPlayerSkills skills = ZSSPlayerSkills.get(event.entityPlayer);
if (skills.isSkillActive(SkillBase.leapingBlow)) {
((LeapingBlow) skills.getPlayerSkill(SkillBase.leapingBlow)).onImpact(event.entityPlayer, event.distance);
}
}
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:8,代码来源:ZSSEntityEvents.java
示例6: onPlayerFall
import net.minecraftforge.event.entity.player.PlayerFlyableFallEvent; //导入依赖的package包/类
public static void onPlayerFall(EntityPlayer player, float distance, float multiplier)
{
MinecraftForge.EVENT_BUS.post(new PlayerFlyableFallEvent(player, distance, multiplier));
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:ForgeEventFactory.java
注:本文中的net.minecraftforge.event.entity.player.PlayerFlyableFallEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论