本文整理汇总了Java中net.minecraft.server.EntityEnderDragon类的典型用法代码示例。如果您正苦于以下问题:Java EntityEnderDragon类的具体用法?Java EntityEnderDragon怎么用?Java EntityEnderDragon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EntityEnderDragon类属于net.minecraft.server包,在下文中一共展示了EntityEnderDragon类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initializeEntityActivationState
import net.minecraft.server.EntityEnderDragon; //导入依赖的package包/类
/**
* These entities are excluded from Activation range checks.
*
* @param entity
* @param world
* @return boolean If it should always tick.
*/
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
if ( ( entity.activationType == 3 && config.miscActivationRange == 0 )
|| ( entity.activationType == 2 && config.animalActivationRange == 0 )
|| ( entity.activationType == 1 && config.monsterActivationRange == 0 )
|| entity instanceof EntityHuman
|| entity instanceof EntityProjectile
|| entity instanceof EntityEnderDragon
|| entity instanceof EntityComplexPart
|| entity instanceof EntityWither
|| entity instanceof EntityFireball
|| entity instanceof EntityWeather
|| entity instanceof EntityTNTPrimed
|| entity instanceof EntityEnderCrystal
|| entity instanceof EntityFireworks )
{
return true;
}
return false;
}
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:29,代码来源:ActivationRange.java
示例2: damage
import net.minecraft.server.EntityEnderDragon; //导入依赖的package包/类
public void damage(double amount, org.bukkit.entity.Entity source) {
DamageSource reason = DamageSource.GENERIC;
if (source instanceof HumanEntity) {
reason = DamageSource.playerAttack(((CraftHumanEntity) source).getHandle());
} else if (source instanceof LivingEntity) {
reason = DamageSource.mobAttack(((CraftLivingEntity) source).getHandle());
}
if (entity instanceof EntityEnderDragon) {
((EntityEnderDragon) entity).dealDamage(reason, (float) amount);
} else {
entity.damageEntity(reason, (float) amount);
}
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:16,代码来源:CraftLivingEntity.java
示例3: damage
import net.minecraft.server.EntityEnderDragon; //导入依赖的package包/类
public void damage(int amount, org.bukkit.entity.Entity source) {
DamageSource reason = DamageSource.GENERIC;
if (source instanceof HumanEntity) {
reason = DamageSource.playerAttack(((CraftHumanEntity) source).getHandle());
} else if (source instanceof LivingEntity) {
reason = DamageSource.mobAttack(((CraftLivingEntity) source).getHandle());
}
if (entity instanceof EntityEnderDragon) {
((EntityEnderDragon) entity).dealDamage(reason, amount);
} else {
entity.damageEntity(reason, amount);
}
}
开发者ID:didoupimpon,项目名称:Craft-city,代码行数:16,代码来源:CraftLivingEntity.java
示例4: CraftEnderDragon
import net.minecraft.server.EntityEnderDragon; //导入依赖的package包/类
public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
super(server, entity);
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:4,代码来源:CraftEnderDragon.java
示例5: getHandle
import net.minecraft.server.EntityEnderDragon; //导入依赖的package包/类
@Override
public EntityEnderDragon getHandle() {
return (EntityEnderDragon) entity;
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:5,代码来源:CraftEnderDragon.java
示例6: getParent
import net.minecraft.server.EntityEnderDragon; //导入依赖的package包/类
public ComplexLivingEntity getParent() {
return (ComplexLivingEntity) ((EntityEnderDragon) getHandle().owner).getBukkitEntity();
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:4,代码来源:CraftComplexPart.java
示例7: getPhase
import net.minecraft.server.EntityEnderDragon; //导入依赖的package包/类
@Override
public Phase getPhase() {
return Phase.values()[getHandle().getDataWatcher().get(EntityEnderDragon.PHASE)];
}
开发者ID:bergerkiller,项目名称:SpigotSource,代码行数:5,代码来源:CraftEnderDragon.java
注:本文中的net.minecraft.server.EntityEnderDragon类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论