This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Would it be possible to make a modtick that sets a specific mob to attack another?
The code i have keeps giving me an error:
victim = []; attacker = [];
function entityAddedHook(e){ if(Entity.getEntityTypeId(e)==EntityType.SPIDER){ victim.push(e); } if(Entity.getEntityTypeId(e)==EntityType.ZOMBIE){ attacker.push(e); }}
function modTick(){ for(i=0;i<victim.length;i++){ for(ii=0;ii<attacker.length;ii++){ Entity.setTarget(attacker[ii],victim); }}}
Would it be possible to make a modtick that sets a specific mob to attack another?
The code i have keeps giving me an error:
victim = [];
attacker = [];
function entityAddedHook(e){
if(Entity.getEntityTypeId(e)==EntityType.SPIDER){
victim.push(e);
}
if(Entity.getEntityTypeId(e)==EntityType.ZOMBIE){
attacker.push(e);
}}
function modTick(){
for(i=0;i<victim.length;i++){
for(ii=0;ii<attacker.length;ii++){
Entity.setTarget(attacker[ii],victim);
}}}