public ItemStack getAsStack(int _stackSize)
{
ItemStack item = new ItemStack(Material.FIREWORK, _stackSize);
FireworkEffect.Builder effect = FireworkEffect.builder();
String colorString = "";
for (int cc = 1; cc <= colorCounter; cc++) {
effect.withColor(colors[cc]);
colorString = colorString + " " + this.colorToString(colors[cc]);
}
FireworkMeta meta = (FireworkMeta) item.getItemMeta();
meta.setDisplayName("Firework: " + colorString + " " + this.effectToString(this.type) );
effect.with(type);
if (this.fadeTo != null) {
effect.withFade(fadeTo);
}
meta.setPower(this.duration);
meta.addEffect(effect.build());
item.setItemMeta(meta);
return item;
}
FireworksFactory.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:tregmine
作者:
评论列表
文章目录