物品命令:/give @p erukabaubles:transform_powder 1
用途:修改被修改过物品类型的拔刀剑
用法:手持该物品左键点击置有拔刀剑的刀挂台。
其他用途:和 flammpfeil.slashblade:slashbladenamed 类型物品或刀魂结晶合成铁锭x8。
该物品代码层面方法示例:
@Override
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
if(entity instanceof mods.flammpfeil.slashblade.entity.EntityBladeStand && !(player.world.isRemote)) {
EntityBladeStand stand = (EntityBladeStand)entity;
ItemStack blade = ItemStack.EMPTY;
if(stand.hasBlade()) {
NBTTagCompound bladeTag = ItemSlashBlade.getItemTagCompound(stand.getBlade());
blade = stand.getBlade();
if(stand.getBlade().getItem().getRegistryName().getNamespace().equalsIgnoreCase("lastsmith") && stand.getBlade().getItem().getRegistryName().getPath().equalsIgnoreCase(".slashblade.named")) {
ItemStack resultBlade = SlashBlade.findItemStack("flammpfeil.slashblade", "bladeNamed", 1);
resultBlade.setTagCompound(bladeTag);
stand.setBlade(resultBlade);
}
if(ItemSlashBladeNamed.CurrentItemName.get(bladeTag).equalsIgnoreCase("flammpfeil.slashblade.named.fox.white") || ItemSlashBladeNamed.CurrentItemName.get(bladeTag).equalsIgnoreCase("flammpfeil.slashblade.named.fox.black")) {
ItemStack resultBlade = SlashBlade.findItemStack("flammpfeil.slashblade", "slashbladeWrapper", 1);
resultBlade.setTagCompound(bladeTag);
stand.setBlade(resultBlade);
}
if(stand.getStandType() == -1) {
stand.setGlowing(true);
}
if(!player.capabilities.isCreativeMode) {
stack.shrink(1);
}
}
}
return super.onLeftClickEntity(stack, player, entity);
}
资料分类: | 联动:拔刀剑:材料 |
最大叠加: | 1个 / 组 |