本文整理汇总了Java中org.bukkit.entity.LivingEntity.setMetadata方法的典型用法代码示例。如果您正苦于以下问题:Java LivingEntity.setMetadata方法的具体用法?Java LivingEntity.setMetadata怎么用?Java LivingEntity.setMetadata使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.entity.LivingEntity
的用法示例。
在下文中一共展示了LivingEntity.setMetadata方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_8_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例2: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_8_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例3: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_9_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例4: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_9_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例5: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_9_R2.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例6: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_9_R2.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例7: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_10_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例8: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_10_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例9: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_12_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例10: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_12_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例11: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_11_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例12: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_11_R1.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例13: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_8_R3.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例14: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_8_R3.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}
示例15: spawn
import org.bukkit.entity.LivingEntity; //导入方法依赖的package包/类
/**
* Spawns the entity at the given location
*
* @param mLocation location
*/
@Override
public void spawn(Object mLocation) {
final Location location = (Location) mLocation;
final LivingEntity entity = (LivingEntity) this.getEntity();
final net.minecraft.server.v1_8_R2.World mcWorld = ((CraftWorld) location.getWorld()).getHandle();
this.setPosition(location.getX(), location.getY(), location.getZ());
mcWorld.addEntity(this, SpawnReason.CUSTOM);
entity.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 9999999, 1));
entity.setMetadata("keep", this.getKeepField());
entity.setCustomNameVisible(false);
entity.setCustomName("PetBlockIdentifier");
}