脚本代码:#loader contenttweakerimport mods.contenttweaker.VanillaFactory;
import mods.contenttweaker.Item;
import mods.contenttweaker.IItemRightClick;
import mods.contenttweaker.Commands;
import mods.contenttweaker.Fluid;
import mods.contenttweaker.Color;
import mods.contenttweaker.MaterialSystem;
import mods.contenttweaker.Material;
import crafttweaker.entity.IEntityLivingBase;
import crafttweaker.entity.IEntity;
import crafttweaker.player.IPlayer;
import crafttweaker.events.IEventManager;
import crafttweaker.item.IItemStack;
import crafttweaker.item.IIngredient;
var book = VanillaFactory.createItem("book");
book.maxStackSize = 1;
book.creativeTab = <creativetab:misc>;
book.rarity = "epic";
book.glowing = true;
book.itemRightClick = function(stack, world, player, hand) {
if(player.offHandHeldItem == <item:bloodmagic:activation_crystal:2>) {
Commands.call("summon minecraft:lightning_bolt", player, world);
Commands.call("clear @p", player, world);
Commands.call("give @p projecte:item.pe_tome", player, world);
player.attackEntityFrom(<damageSource:OUT_OF_WORLD>, 1000000000000000.0f);
} else {
player.attackEntityFrom(<damageSource:OUT_OF_WORLD>, 1000000000000000.0f);
}
return "Pass";
};
book.register();
crafttweaker.log.txt
(7.25 KB, 下载次数: 2)
|