event.load("player_toss"); event.load("entity_click"); event.load("living_death"); randblock_x1 = -2984; randblock_x2 = -3003; randblock_z1 = -997; randblock_z2 = -1009; middleloc = -2994; @checkgame wait(); if(event == "living_death"){ if(entity.getType(living_entity) == "falling_block"){ p = "SirTerence7"; }else{ goto("checkgame"); } }else{ p = player.getName(player); } if(p == "SirTerence7" || p == "Mareeeen" || p == "marvinius"){ ignoreGoto(event); } goto("checkgame"); @player_toss cancel = true; item = entity.getEquip(player, "hand"); item_type = item.getType(item); if(item_type == "minecraft:bedrock") { location = entity.getLocation(player); array = entity.getLook(player); array2 = entity.getMotion(player); x = array[0] + array2[0]*0.5; y = array[1] + math.abs(array2[1])*0.5; z = array[2] + array2[2]*0.5; falling_block_entity = entity.spawn("falling_block", location, "{BlockState:{Name:\"minecraft:bedrock\"},Time:1,Motion:[0.0,1.0,0.0],DropItem:0,HurtEntities:1}"); entity.throw(falling_block_entity, x, y, z); sgoto(5, "loop"); } goto("checkgame"); @entity_click entity_type = entity.getType(entity); if(entity_type == "falling_block"){ location = entity.getLocation(player); array = entity.getLook(player); array2 = entity.getMotion(player); x = array[0]*0.5 + array2[0]*0.5; y = array[1]*0.5 + math.abs(array2[1])*0.5; z = array[2]*0.5 + array2[2]*0.5; entity.throw(falling_block_entity, x, y, z); } goto("checkgame"); @living_death x = loc.getX(entity.getLocation(living_entity)); if(x > middleloc){ msg("dev", "Team 1 - Punkt"); //team = 0; //team2 = 1; }else{ msg("dev", "Team 2 - Punkt"); //team = 1; //team2 = 0; } //map.add(points, team, map.get(points, team) + 1); //updateDisplay(); //minigame.speakAll(gamename,"§eThe ", map.get(teamcolortext2,team), "§eTeam scored a point."); //if(map.get(points, team) == maxpoints){ // winning_team = team; // goto("win"); //} //goto("Aufschlag"); goto("checkgame"); @loop ent_loc_x = loc.getX(entity.getLocation(falling_block_entity)); ent_loc_z = loc.getZ(entity.getLocation(falling_block_entity)); if(ent_loc_x >= randblock_x1 || ent_loc_x <= randblock_x2){ motion = entity.getMotion(falling_block_entity); x = -motion[0]; y = motion[1]; z = motion[2]; entity.throw(falling_block_entity, x, y, z); } if(ent_loc_z >= randblock_z1 || ent_loc_z <= randblock_z2){ motion = entity.getMotion(falling_block_entity); x = motion[0]; y = motion[1]; z = -motion[2]; entity.throw(falling_block_entity, x, y, z); } sgoto(5, "loop"); goto("checkgame");