本文整理汇总了Java中org.bukkit.entity.ComplexEntityPart类的典型用法代码示例。如果您正苦于以下问题:Java ComplexEntityPart类的具体用法?Java ComplexEntityPart怎么用?Java ComplexEntityPart使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ComplexEntityPart类属于org.bukkit.entity包,在下文中一共展示了ComplexEntityPart类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RemoteEnderDragon
import org.bukkit.entity.ComplexEntityPart; //导入依赖的package包/类
public RemoteEnderDragon(int inID, RemoteEnderDragonEntity inEntity, EntityManager inManager)
{
super(inID, RemoteEntityType.EnderDragon, inManager);
this.m_entity = inEntity;
Bukkit.getPluginManager().registerEvents(new Listener() {
@EventHandler
public void onEntityExplode(EntityExplodeEvent event)
{
if(event.getEntity() instanceof EnderDragon)
{
if(event.getEntity() == getBukkitEntity() && !shouldDestroyBlocks())
event.setCancelled(true);
}
else if(event.getEntity() instanceof ComplexEntityPart)
{
if(((ComplexEntityPart)event.getEntity()).getParent() == getBukkitEntity() && !shouldDestroyBlocks())
event.setCancelled(true);
}
}
}, this.m_manager.getPlugin()
);
}
示例2: ControllableEnderDragonBase
import org.bukkit.entity.ComplexEntityPart; //导入依赖的package包/类
public ControllableEnderDragonBase(int id, EntityManager manager) {
super(id, ControllableEntityType.ENDERDRAGON, manager);
Bukkit.getPluginManager().registerEvents(new Listener() {
@EventHandler
public void onEntityExplode(EntityExplodeEvent event) {
if (!shouldDestroyBlocks()) {
Entity entity = event.getEntity();
if (entity instanceof EnderDragon && entity.equals(getBukkitEntity())) {
event.setCancelled(true);
} else if (entity instanceof ComplexEntityPart && ((ComplexEntityPart) entity).getParent().equals(getBukkitEntity())) {
event.setCancelled(true);
}
}
}
}, EntityAPI.getCore());
}
示例3: getParts
import org.bukkit.entity.ComplexEntityPart; //导入依赖的package包/类
public Set<ComplexEntityPart> getParts() {
Builder<ComplexEntityPart> builder = ImmutableSet.builder();
for (EntityDragonPart part : getHandle().dragonPartArray) {
builder.add((ComplexEntityPart) part.getBukkitEntity());
}
return builder.build();
}
示例4: getParts
import org.bukkit.entity.ComplexEntityPart; //导入依赖的package包/类
public Set<ComplexEntityPart> getParts() {
Builder<ComplexEntityPart> builder = ImmutableSet.builder();
for (EntityComplexPart part : getHandle().children) {
builder.add((ComplexEntityPart) part.getBukkitEntity());
}
return builder.build();
}
示例5: getParts
import org.bukkit.entity.ComplexEntityPart; //导入依赖的package包/类
public Set<ComplexEntityPart> getParts() {
Builder<ComplexEntityPart> builder = ImmutableSet.builder();
for (net.minecraft.entity.boss.EntityDragonPart part : getHandle().field_70977_g) {
builder.add((ComplexEntityPart) part.getBukkitEntity());
}
return builder.build();
}
示例6: getParts
import org.bukkit.entity.ComplexEntityPart; //导入依赖的package包/类
public Set<ComplexEntityPart> getParts() {
throw new NotImplementedException("getParts()");
}
示例7: getParts
import org.bukkit.entity.ComplexEntityPart; //导入依赖的package包/类
@Override
public Set<ComplexEntityPart> getParts() {
return Sets.newHashSet(Collections2.transform(getHandle().getParts(),
PoreComplexEntityPart::of
));
}
示例8: getParts
import org.bukkit.entity.ComplexEntityPart; //导入依赖的package包/类
@Override
public Set<ComplexEntityPart> getParts() {
return super.getParts();
}
示例9: getParts
import org.bukkit.entity.ComplexEntityPart; //导入依赖的package包/类
Set<ComplexEntityPart> getParts();