在各大整合包中,添加巫术学的并不在少数。但对其的魔改往往只限于在config里禁用一些法术,使得同质化严重。实际上,魔改巫术学并不困难。


    第一种方式是打开mod文件——assets——ebwizardry——spells,提取当中的JSON文件,再于config——ebwizardry文件夹下创建spells——ebwizardry(如果是古代咒法则是spells——ancientspellcraft),置于其中。打开JSON文件,便能改动一些基础设置。如下是一个魔改后的凋零图腾法术。注意只能修改他给出的条目数据。相信这些非常基础的英文大家都能看懂。


1.12.2巫术学魔改案例-第1张图片


   需要注意的是有些法术实际上调用了其他法术,例如冰霜冲击的碎片实际上就是冰霜碎片,那么他的伤害就在后者中更改;古代咒法的芬布尔之冬调用冲击和碎片,凤凰调用火焰射线,骷髅巫师调用某些基础法术等等,还请自行研究。


    法术书的获取也可以调整。譬如我们可以禁用原本的获得方式,改由某些写了特定咒语的书进行星辉转化获得。(\n代表换行)


mods.astralsorcery.StarlightInfusion.addInfusion(<minecoprocessors:book_code>.withTag({pages: ["(标题)\n\n起始句\n(次句)\n\n(单双行来回转换)\n(后文类此)"], selected: 0}),<ct法术书>,false,0,(星辉转化时长));


    譬如斗转星移:    

潮水的呼吸追逐云海的交界,

轻风的舞步踏阅时光的洪流。

 是谁拨动星河的齿轮而纵横天幕的光影,

 谁倒映繁星的泡影洒照人世春秋?

 ……(后一半就不提了)之类的~


    如果要谈及魔改,crt及其附属的事件必然是一个不可回避的话题。比起大佬们水平还是太菜了,所以不敢丢进crt分区。以下是一些案例:


    0.使得某种属性的法杖只能使用某些法术:


#reloadable
import crafttweaker.event.EntityLivingUseItemEvent.Start;

events.onEntityLivingUseItemStart(function(event as Start) {
    var player = event.player;
    var stack = event.item;
    if ( event.isPlayer && <ebwizardry:master_earth_wand(比如自然法杖)>.definition.id == stack.definition.id) {
        if (stack.hasTag) {
            var spells = stack.tag.spells;
            var earth as int[] = [法术的编号,将绑定法术的法杖/ct hand查看];
            var selected = stack.tag.selectedSpell;
            if(!isNull(spells)) {
                var held as int = 0;
                if(!isNull(selected)) {
                    held = selected as int;
                for i in 0 .. earth.length {
                if(spells[held] == earth[i]) {
                    player.addPotionEffect(<给予的负面buff>.makePotionEffect(X, X, false, true));
                    }}}}}}});


    1.幽冥影刃造成伤害时附加一次同等数值的虚空伤害


1.12.2巫术学魔改案例-第2张图片


    2.召唤凤凰:凤凰在自然消失前若被杀死,便原地产生一个持续6秒的黑洞,黑洞消失时产生一场爆炸,同时凤凰重生。


1.12.2巫术学魔改案例-第3张图片


    3.使用大师级治愈魔杖施放活体彗星落地后获得680tick的浴火效果,并于666tick后在原地产生一场威力为32.0F的爆炸,杀死所有生物,蒸发半径360格的所有方块,清除所有掉落(为了电脑性能考虑,这里是用小木斧创造了一个半径为360的空气球体),有666t冷却时间。(注:原版活体彗星落地后会为玩家添加1秒左右的抗火1效果)


1.12.2巫术学魔改案例-第4张图片


    4.使用地狱审判击中敌人后开始判定——在之后6秒若连续击中敌人6次,最后一次将对击中目标为中心半径为6的正方中所有生物造成

2147483647点虚空伤害;若没能击中6次,则对玩家造成2147483647点魔法伤害。(注:古代咒法的curse_of_death buff是未完成buff,没有任何效果)


#reloadable
import crafttweaker.player.IPlayer;
import crafttweaker.damage.IDamageSource;
import crafttweaker.event.EntityLivingHurtEvent;
import crafttweaker.event.EntityLivingUpdateEvent;
import crafttweaker.entity.IEntityLivingBase;
import crafttweaker.entity.IEntity;
import crafttweaker.item.IItemStack;
import crafttweaker.util.Position3f;
import crafttweaker.world.IWorld;

//审判开始
events.onEntityLivingHurt(function(event as EntityLivingHurtEvent) {
    //获取造成伤害的实体
    val trueSource as IEntity = event.damageSource.getTrueSource();
    //获取伤害类型记录为damageSource
    val damageSource as IDamageSource = event.damageSource;
    //如果伤害来源为玩家
    if(trueSource instanceof IPlayer && trueSource instanceof IEntityLivingBase){
    //定义player
    val player as IPlayer = trueSource;
    //定义Base
    val Base as IEntityLivingBase = trueSource;
    //获取药水效果记为potions
    var potions = Base.activePotionEffects;
    for potion in potions {
        if (potion.effectName != "potion.ancientspellcraft:curse_of_death"){
            //定义stack为玩家手持物品并将其与幽冥统御比较
            val stack as IItemStack = player.currentItem;
                if (!isNull(player.currentItem) && <ebwizardry:master_necromancy_wand>.definition.id == stack.definition.id) {
                    if (stack.hasTag) {
                        var spells = stack.tag.spells;
                        var selected = stack.tag.selectedSpell;
                            if (!isNull(spells) && !isNull(selected)) {
                            for i in 0 .. spells.length {
                                if (spells[i] == 212 && i == selected) {
                                    //添加效果
                                    player.addPotionEffect(<potion:ancientspellcraft:curse_of_death>.makePotionEffect(120, 0, false, true));}}}}}}}}});

//审判叠层
events.onEntityLivingHurt(function(event as EntityLivingHurtEvent) {
    //获取造成伤害的实体
    val trueSource as IEntity = event.damageSource.getTrueSource();
    //获取伤害类型记录为damageSource
    val damageSource as IDamageSource = event.damageSource;
    //如果伤害来源为玩家
    if(trueSource instanceof IPlayer && trueSource instanceof IEntityLivingBase){
    //定义player
    val player as IPlayer = trueSource;
    //定义Base
    val Base as IEntityLivingBase = trueSource;
    //获取药水效果记为potions
    var potions = Base.activePotionEffects;
    for potion in potions {
        if (potion.effectName == "potion.ancientspellcraft:curse_of_death"){
            val potion = potion;
            val x as int = potion.amplifier;
            val X as int = x+1;
            val T as int = potion.duration;
            if (X==0 || X==1 || X==2 || X==3 || X==4 || X==5 || X==6){
            //定义stack为玩家手持物品并将其与幽冥统御比较
            val stack as IItemStack = player.currentItem;
                if (!isNull(player.currentItem) && <ebwizardry:master_necromancy_wand>.definition.id == stack.definition.id) {
                    if (stack.hasTag) {
                        var spells = stack.tag.spells;
                        var selected = stack.tag.selectedSpell;
                            if (!isNull(spells) && !isNull(selected)) {
                            for i in 0 .. spells.length {
                                if (spells[i] == 212 && i == selected) {
                                    //添加效果
                                    player.addPotionEffect(<potion:ancientspellcraft:curse_of_death>.makePotionEffect(T, X, false, true));}}}}}}}}}});

//审判成功
events.onEntityLivingHurt(function(event as EntityLivingHurtEvent) {
    //获取实体
    val entity as IEntity = event.entity;
    val entityLivingBase as IEntityLivingBase = event.entityLivingBase;
    var world as IWorld = entity.world;
    //获取造成伤害的实体
    val trueSource as IEntity = event.damageSource.getTrueSource();
    //获取伤害类型记录为damageSource
    val damageSource as IDamageSource = event.damageSource;
    //如果伤害来源为玩家
    if(trueSource instanceof IPlayer && trueSource instanceof IEntityLivingBase){
    //定义player
    val player as IPlayer = trueSource;
    //定义Base
    val Base as IEntityLivingBase = trueSource;
    //获取药水效果记为potions
    var potions = Base.activePotionEffects;
    for potion in potions {
        if (potion.effectName == "potion.ancientspellcraft:curse_of_death"){
            val potion = potion;
            val x as int = potion.amplifier;
            val T as int = potion.duration;
            if (x==6){
            //定义stack为玩家手持物品并将其与幽冥统御比较
            val stack as IItemStack = player.currentItem;
                if (!isNull(player.currentItem) && <ebwizardry:master_necromancy_wand>.definition.id == stack.definition.id) {
                    if (stack.hasTag) {
                        var spells = stack.tag.spells;
                        var selected = stack.tag.selectedSpell;
                            if (!isNull(spells) && !isNull(selected)) {
                            for i in 0 .. spells.length {
                                if (spells[i] == 212 && i == selected) {
                                    //添加效果
                                    var pos = entity.position;
                                    var pos1 as Position3f = Position3f.create(pos.getX() + 6, pos.getY() + 6, pos.getZ() + 6);
                                    var pos2 as Position3f = Position3f.create(pos.getX() - 6, pos.getY() - 6, pos.getZ() - 6);
                                    for entity in world.getEntitiesInArea(pos1, pos2) {
                                        if(!isNull(entity)){
                                            if(entity instanceof IEntityLivingBase){
                                                var living as IEntityLivingBase = entity;
                                                living.attackEntityFrom(<damageSource:OUT_OF_WORLD>, 2147483647);
                                                player.addPotionEffect(<potion:potioncore:cure>.makePotionEffect(1, 0, false, true));}}}}}}}}}}}}});

//审判失败
events.onEntityLivingUpdate(function(event as EntityLivingUpdateEvent) {
    //获取实体记为living
    val living as IEntityLivingBase = event.entityLivingBase;
    if (living instanceof IPlayer){
    //获取药水效果记为potions
    var potions = living.activePotionEffects;
    //如果药水效果为
    for potion in potions {
        if (!isNull(living) && !isNull(potions) && !isNull(potion) && potion.effectName == "potion.ancientspellcraft:curse_of_death" && potion.duration == 1)
        living.attackEntityFrom(<damageSource:MAGIC>, 2147483647);}}});


    5.施放火蚁丘后生成半径为36的地狱岩球体(提前把幽冥方块的贴图换成了地狱岩),火蚁丘每隔一段时间生成一只谜影蛾。谜影蛾每隔几秒受到一次伤害,在原地生成一格持续2秒的岩浆类流体(其实是熔融炽铁)。在球体范围中被炽铁灼伤的个体身边会随机生成各种(随机池中的)怪物。所有被召唤怪物受到精神控制,替你作战。约一分钟后球体,火蚁丘,飞蛾与怪物全部消失。

#reloadable
import mods.ctutils.utils.Math;
import mods.ctutils.world.World;
import crafttweaker.world.IWorld;
import crafttweaker.player.IPlayer;
import crafttweaker.entity.IEntity;
import crafttweaker.world.IBlockPos;
import crafttweaker.util.Position3f;
import crafttweaker.entity.IEntityLivingBase;
import crafttweaker.event.EntityJoinWorldEvent;
import crafttweaker.event.EntityLivingHurtEvent;
import crafttweaker.event.EntityLivingDeathEvent;
import crafttweaker.event.EntityLivingAttackedEvent;


//1.无余归寂处

    //生灭去来
    events.onEntityLivingAttacked(function(event as EntityLivingAttackedEvent) {
        val living as IEntityLivingBase = event.entityLivingBase;
        val type as string = event.damageSource.getDamageType();
        if(!isNull(living.definition) && "ancientspellcraft:entity_volcano" == living.definition.id && type != "outOfWorld"){
        event.cancel();}});

    //埋骨弘川
    events.onEntityJoinWorld(function(event as EntityJoinWorldEvent) {
        var Entity = event.entity;
        var world = Entity.world;
        if(!world.remote && !isNull(Entity) && Entity instanceof IEntityLivingBase){
            val living as IEntityLivingBase = Entity;
                if(!isNull(living.definition) && "ancientspellcraft:entity_volcano" == living.definition.id){
                    living.addPotionEffect(<potion:ancientspellcraft:growth>.makePotionEffect(1200, 3, false, true));
                    living.addPotionEffect(<potion:minecraft:levitation>.makePotionEffect(1200, -1, false, true));
                    living.addPotionEffect(<potion:ebwizardry:containment>.makePotionEffect(1200, 3, false, true));
                    Entity.world.catenation()
                                .sleep(20)
                                    .then(function(world, context) {
                                        living.attackEntityFrom(<damageSource:OUT_OF_WORLD>, 2.0f);})
                                            .start();

    //常夜鸣鸦
    var pos = Entity.position;
        var pos1 as Position3f = Position3f.create(pos.getX() + 64, pos.getY() + 64, pos.getZ() + 64);
        var pos2 as Position3f = Position3f.create(pos.getX() - 64, pos.getY() - 64, pos.getZ() - 64);
            for entity in world.getEntitiesInArea(pos1, pos2) {
                if(!isNull(entity) && entity instanceof IPlayer){
                    val player as IPlayer = entity;
                    server.commandManager.executeCommand(player,"//sphere air 36");
                    server.commandManager.executeCommand(player,"//hsphere ebwizardry:spectral_block 36");
                    player.addPotionEffect(<potion:minecraft:levitation>.makePotionEffect(1200, -1, false, true));
                    player.addPotionEffect(<potion:ebwizardry:transience>.makePotionEffect(1200, 0, false, true));
                    player.addPotionEffect(<potion:minecraft:night_vision>.makePotionEffect(1200, 0, false, true));}
                if(!isNull(entity) && entity instanceof IEntityLivingBase){
                    val entity = entity;
                    val base as IEntityLivingBase = entity;
                    base.addPotionEffect(<potion:extraalchemy:effect.sinking>.makePotionEffect(1200, 2, false, true));}}}}

    //死蝶浮月
        if(!isNull(Entity) && Entity instanceof IEntityLivingBase){
            val living as IEntityLivingBase = Entity;
                if(!isNull(living.definition) && "mod_lavacow:enigmoth" == living.definition.id){
                    var pos = Entity.position;
                    var pos1 as Position3f = Position3f.create(pos.getX() + 64, pos.getY() + 64, pos.getZ() + 64);
                    var pos2 as Position3f = Position3f.create(pos.getX() - 64, pos.getY() - 64, pos.getZ() - 64);
                    for entity in world.getEntitiesInArea(pos1, pos2) {
                    if(!isNull(entity) && entity instanceof IEntityLivingBase){
                        val entity as IEntity = entity;
                        val entitylivingbase as IEntityLivingBase = entity;
                        if(!isNull(entitylivingbase) && !isNull(entitylivingbase.definition) && entitylivingbase.definition.id == "ancientspellcraft:entity_volcano"){
                        living.addPotionEffect(<potion:minecraft:wither>.makePotionEffect(1200, 0, false, true));}}}}}});

//2.地狱六道变

    //恶鬼道
    events.onEntityLivingHurt(function(event as EntityLivingHurtEvent) {
        val entity as IEntity = event.entity;
        val world as IWorld = entity.world;
        val living as IEntityLivingBase = event.entityLivingBase;
            if (!isNull(entity) && !isNull(living) && !isNull(living.definition) && !world.remote && living.definition.id == "ancientspellcraft:entity_volcano"){
                val type as string = event.damageSource.getDamageType();
                if(type == "outOfWorld"){
                    living.addPotionEffect(<potion:minecraft:resistance>.makePotionEffect(120, 4, false, true));
                    var enigmoth = <entity:mod_lavacow:enigmoth>.createEntity(world);
                    enigmoth.setPosition(entity.position);
                    world.spawnEntity(enigmoth);
                    world.spawnEntity(enigmoth);
                        entity.world.catenation()
                            .sleep(125)
                            .then(function(world, context) {
                            living.attackEntityFrom(<damageSource:OUT_OF_WORLD>, 2.0f);})
                            .start();}}
                            if (!isNull(entity) && !isNull(living) && !isNull(living.definition) && !world.remote && living.definition.id == "mod_lavacow:enigmoth"){
                                living.addPotionEffect(<potion:minecraft:resistance>.makePotionEffect(66, 4, false, true));
                                val pos = entity.position;
                                world.setBlockState(<block:twilightforest:molten_fierymetal>, pos);
                                    entity.world.catenation()
                                        .sleep(40)
                                        .then(function(world, context) {
                                        world.setBlockState(<block:minecraft:air>, pos);})
                                        .start();}});

    //地狱道
    events.onEntityLivingHurt(function(event as EntityLivingHurtEvent) {
        val Entity as IEntity = event.entity;
        val living as IEntityLivingBase = event.entityLivingBase;
        var pos = Entity.position;
        val world as IWorld = Entity.world;
        var pos1 as Position3f = Position3f.create(pos.getX() + 64, pos.getY() + 64, pos.getZ() + 64);
        var pos2 as Position3f = Position3f.create(pos.getX() - 64, pos.getY() - 64, pos.getZ() - 64);
        for entity in world.getEntitiesInArea(pos1, pos2) {
            if(!isNull(entity) && entity instanceof IEntityLivingBase){
                val base as IEntityLivingBase = entity;
                if(!isNull(base) && !isNull(base.definition) && base.definition.id == "ancientspellcraft:entity_volcano"){
                    val type as string = event.damageSource.getDamageType();
                        if(!isNull(type) && type == "lava"){
                            var potions = living.activePotionEffects;
                                for potion in potions {
                                    if (potion.effectName == "effect.sinking"){
                                        living.addPotionEffect(<potion:minecraft:resistance>.makePotionEffect(80, 4, false, true));

    //畜生道
        var a = <entity:mod_lavacow:sludgelord>.createEntity(world);
        var b = <entity:mod_lavacow:ithaqua>.createEntity(world);
        var c = <entity:mod_lavacow:banshee>.createEntity(world);
        var d = <entity:mod_lavacow:boneworm>.createEntity(world);
        var e = <entity:mod_lavacow:scarecrow>.createEntity(world);
        var f = <entity:iceandfire:dread_knight>.createEntity(world);
        var g = <entity:iceandfire:dread_horse>.createEntity(world);
        var h = <entity:ancientbeasts:netherhound>.createEntity(world);
        var i = <entity:ancientbeasts:rifted_enderman>.createEntity(world);
        var j = <entity:mowziesmobs:foliaath>.createEntity(world);
        var l = <entity:iceandfire:dread_scuttler>.createEntity(world);
        var w = <entity:twilightforest:roving_cube>.createEntity(world);
        var p = <entity:twilightforest:ice_crystal>.createEntity(world);
        var q = <entity:iceandfire:gorgon>.createEntity(world);
        var r = <entity:cqrepoured:giant_spider>.createEntity(world);
            a.setPosition(Entity.position);
            b.setPosition(Entity.position);
            c.setPosition(Entity.position);
            d.setPosition(Entity.position);
            e.setPosition(Entity.position);
            f.setPosition(Entity.position);
            g.setPosition(Entity.position);
            h.setPosition(Entity.position);
            i.setPosition(Entity.position);
            j.setPosition(Entity.position);
            l.setPosition(Entity.position);
            q.setPosition(Entity.position);
            w.setPosition(Entity.position);
            p.setPosition(Entity.position);
            r.setPosition(Entity.position);
                var x = Math.random();
                if(x < 0.1 && x > 0.0){world.spawnEntity(a);}
                if(x < 0.2 && x > 0.1){world.spawnEntity(b);}
                if(x < 0.3 && x > 0.2){world.spawnEntity(c);}
                if(x < 0.4 && x > 0.3){world.spawnEntity(d);}
                if(x < 0.5 && x > 0.4){world.spawnEntity(e);}
                if(x < 0.6 && x > 0.5){world.spawnEntity(h);}
                if(x < 0.7 && x > 0.6){world.spawnEntity(i);}
                if(x < 0.8 && x > 0.7){world.spawnEntity(j);}
                if(x < 0.9 && x > 0.8){world.spawnEntity(l);}
                if(x < 1.0 && x > 0.9){world.spawnEntity(f);}
                if(x < 1.0 && x > 0.9){world.spawnEntity(g);}
                if(x < 0.997 && x > 0.996){world.spawnEntity(q);}
                if(x < 0.998 && x > 0.997){world.spawnEntity(w);}
                if(x < 0.999 && x > 0.998){world.spawnEntity(p);}
                if(x < 1.000 && x > 0.999){world.spawnEntity(r);}}}}}}}});


//骷髅幻戏图

    //色不异空
    events.onEntityJoinWorld(function(event as EntityJoinWorldEvent) {
        var Entity = event.entity;
        var world = Entity.world;
        if(!isNull(Entity) && Entity instanceof IEntityLivingBase){
            val living as IEntityLivingBase = Entity;
            if(!isNull(living.definition)){
                if ("ancientspellcraft:fire_ant" == living.definition.id  ||
                    "mod_lavacow:lilsludge" == living.definition.id ||
                    "mod_lavacow:seagull" == living.definition.id ||
                    "mod_lavacow:raven" == living.definition.id){
                    event.cancel();}
                if ("mod_lavacow:enigmoth" == living.definition.id){
                    var pos = Entity.position;
                    var pos1 as Position3f = Position3f.create(pos.getX() + 64, pos.getY() + 64, pos.getZ() + 64);
                    var pos2 as Position3f = Position3f.create(pos.getX() - 64, pos.getY() - 64, pos.getZ() - 64);
                    for entity in world.getEntitiesInArea(pos1, pos2) {
                        if(!isNull(entity) && entity instanceof IEntityLivingBase){
                            val entitylivingbase as IEntityLivingBase = entity;
                            val entity as IEntity = entity;
                            if(!isNull(entitylivingbase) && !isNull(entitylivingbase.definition) && entitylivingbase.definition.id == "ancientspellcraft:entity_volcano"){
                                var m = entity.nbt.casterUUIDMost;
                                var l = entity.nbt.casterUUIDLeast;
                                living.updateNBT({ForgeData:{controllingEntityMost: m}});
                                living.updateNBT({ForgeData:{controllingEntityLeast: l}});
                                living.addPotionEffect(<potion:ebwizardry:mind_control>.makePotionEffect(1200, 0, false, true));}}}}

    //空不异色
    if ("iceandfire:gorgon" == living.definition.id||
        "mod_lavacow:banshee" == living.definition.id||
        "mod_lavacow:ithaqua" == living.definition.id||
        "mowziesmobs:foliaath" == living.definition.id||
        "mod_lavacow:boneworm" == living.definition.id||
        "mod_lavacow:scarecrow" == living.definition.id||
        "iceandfire:dread_horse" == living.definition.id||
        "mod_lavacow:sludgelord" == living.definition.id||
        "cqrepoured:giant_spider" == living.definition.id||
        "iceandfire:dread_knight" == living.definition.id||
        "ancientbeasts:netherhound" == living.definition.id||
        "iceandfire:dread_scuttler" == living.definition.id||
        "twilightforest:ice_crystal" == living.definition.id||
        "ancientbeasts:rifted_enderman" == living.definition.id){
            var pos = Entity.position;
            var pos1 as Position3f = Position3f.create(pos.getX() + 64, pos.getY() + 64, pos.getZ() + 64);
            var pos2 as Position3f = Position3f.create(pos.getX() - 64, pos.getY() - 64, pos.getZ() - 64);
                for entity in world.getEntitiesInArea(pos1, pos2) {
                    if(!isNull(entity) && entity instanceof IEntityLivingBase){
                        val entitylivingbase as IEntityLivingBase = entity;
                        val entity as IEntity = entity;
                        if(!isNull(entitylivingbase) && !isNull(entitylivingbase.definition) && entitylivingbase.definition.id == "ancientspellcraft:entity_volcano"){
                            var m = entity.nbt.casterUUIDMost;
                            var l = entity.nbt.casterUUIDLeast;
                            living.updateNBT({ForgeData:{controllingEntityMost: m}});
                            living.updateNBT({ForgeData:{controllingEntityLeast: l}});
                            living.addPotionEffect(<potion:minecraft:resistance>.makePotionEffect(1200, 13, false, true));
                            living.addPotionEffect(<potion:ancientspellcraft:growth>.makePotionEffect(1200, 4, false, true));
                            living.addPotionEffect(<potion:ebwizardry:mind_control>.makePotionEffect(1200, 0, false, true));}}}}}}});

    //如露如电
    events.onEntityLivingDeath(function(event as EntityLivingDeathEvent) {
        var Entity = event.entity;
        var world = Entity.world;
        if (!isNull(Entity.definition) && "twilightforest:roving_cube" == Entity.definition.id) {
            var pos = Entity.position;
                var pos1 as Position3f = Position3f.create(pos.getX() + 64, pos.getY() + 64, pos.getZ() + 64);
                var pos2 as Position3f = Position3f.create(pos.getX() - 64, pos.getY() - 64, pos.getZ() - 64);
                for entity in world.getEntitiesInArea(pos1, pos2) {
                    if(!isNull(entity) && entity instanceof IEntityLivingBase) {
                        val living as IEntityLivingBase = entity;
                        living.attackEntityFrom(<damageSource:OUT_OF_WORLD>, 666666.0f);}}}

    //梦幻泡影
    if (!isNull(Entity.definition) && "ancientspellcraft:entity_volcano" == Entity.definition.id) {
        var pos = Entity.position;
        var pos1 as Position3f = Position3f.create(pos.getX() + 64, pos.getY() + 64, pos.getZ() + 64);
        var pos2 as Position3f = Position3f.create(pos.getX() - 64, pos.getY() - 64, pos.getZ() - 64);
        for entity in world.getEntitiesInArea(pos1, pos2) {
            if(!isNull(entity) && entity instanceof IEntityLivingBase){
                val Lentity as IEntity = entity;
                val living as IEntityLivingBase = entity;
                var potions = living.activePotionEffects;
                for potion in potions {
                    if (potion.effectName == "potion.ebwizardry:mind_control"){
                        var posl = Lentity.position;
                        var posY as Position3f = Position3f.create(posl.getX(), posl.getY() - 360, posl.getZ());
                        Lentity.setPosition(posY);}}}}}});



看到这的大佬求轻喷啊,咱天天就是在吕布才的案例里ctrl+cv,不好意思拿人家当挡箭牌的……