damage loop-entity by 50 with damagesource {_TNTdmg}
damage loop-entity by 50 with damagesource {_TNTdmg}
でダメージを与えています。
この{_TNTdmg}は、set {_TNTdmg} to new damage source with type "ENTITY_EXPLOSION" で設定しています。
これでダメージを与えると、damage causeがattackになってしまいます。
コード:
on place: if {Chosen_wolf::*} contains player: if player's tool is creeper head item: send "{@prefix} &a地雷を設置しました。" set {_TNTdmg} to new damage source with type "ENTITY_EXPLOSION" set damage source attacker of {_TNTdmg} to player loop 1000 times: wait 5 tick if "%block at location of event-block%" is "SKULL": loop all entities in radius 2 around location of event-block: loop-entity is set loop-entity is not arrow {Chosen_wolf::*} does not contain loop-entity {Chosen_mad::*} does not contain loop-entity {Chosen_fan::*} does not contain loop-entity damage loop-entity by 50 with damage source {_TNTdmg} send "{@prefix} &c地雷が発動しました。" set block at location of event-block to air stop loop else: stop loop
on place: if {Chosen_wolf::*} contains player: if player's tool is creeper head item: send "{@prefix} &a地雷を設置しました。" set {_TNTdmg} to new damage source with type "ENTITY_EXPLOSION" set damage source attacker of {_TNTdmg} to player loop 1000 times: wait 5 tick if "%block at location of event-block%" is "SKULL": loop all entities in radius 2 around location of event-block: loop-entity is set loop-entity is not arrow {Chosen_wolf::*} does not contain loop-entity {Chosen_mad::*} does not contain loop-entity {Chosen_fan::*} does not contain loop-entity damage loop-entity by 50 with damage source {_TNTdmg} send "{@prefix} &c地雷が発動しました。" set block at location of event-block to air stop loop else: stop loop