本文整理汇总了Java中org.bukkit.entity.Blaze类的典型用法代码示例。如果您正苦于以下问题:Java Blaze类的具体用法?Java Blaze怎么用?Java Blaze使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Blaze类属于org.bukkit.entity包,在下文中一共展示了Blaze类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBukkitEntity
import org.bukkit.entity.Blaze; //导入依赖的package包/类
@Override
public Blaze getBukkitEntity() {
return (Blaze) super.getBukkitEntity();
}
示例2: CanaryBlaze
import org.bukkit.entity.Blaze; //导入依赖的package包/类
public CanaryBlaze(net.canarymod.api.entity.living.monster.Blaze entity) {
super(entity);
}
示例3: spawnBlaze
import org.bukkit.entity.Blaze; //导入依赖的package包/类
public Blaze spawnBlaze(Location location) {
return (Blaze) location.getWorld().spawnEntity(location, EntityType.BLAZE);
}
示例4: teleportCheck
import org.bukkit.entity.Blaze; //导入依赖的package包/类
/** Checks that player is not trying to combatlog/is allowed to teleport
* Returns an error message to be displayed if the player is not allowed
* to teleport
* Returns null if the player is allowed to teleport
*/
private static String teleportCheck(Player player) {
Location pLoc = player.getLocation();
World world = player.getWorld();
/* Check if there are any players within 50 blocks */
for (Player p : world.getPlayers()) {
if (!p.equals(player)
&& p.getLocation().distance(pLoc) < 50
&& player.canSee(p)
&& !p.isDead()) {
return ChatColor.RED + "You cannot use this command while within 50 blocks of any other players.";
}
}
/* Check if there are any hostile mobs within 5 blocks */
for (Entity entity : world.getEntitiesByClasses(
Blaze.class,
CaveSpider.class,
Creeper.class,
Enderman.class,
Ghast.class,
MagmaCube.class,
PigZombie.class,
Skeleton.class,
Silverfish.class,
Slime.class,
Spider.class,
Witch.class,
Zombie.class)) {
if (entity.getLocation().distance(pLoc) < 5) {
return ChatColor.RED + "You cannot use this command while within 5 blocks of any hostile mobs.";
}
}
/* Check if the player is falling */
if (player.getVelocity().getY() < -0.079
|| player.getVelocity().getY() > 0.08) {
return ChatColor.RED + "You cannot use this command while falling.";
}
/* Check if the player is burning */
if (player.getFireTicks() > 0
&& !player.hasPotionEffect(
PotionEffectType.FIRE_RESISTANCE)) {
return ChatColor.RED + "You cannot use this command while on fire.";
}
/* Default to allow teleport */
return null;
}
示例5: RemoteBlaze
import org.bukkit.entity.Blaze; //导入依赖的package包/类
public RemoteBlaze(int inID, RemoteBlazeEntity inEntity, EntityManager inManager)
{
super(inID, RemoteEntityType.Blaze, inManager);
this.m_entity = inEntity;
}