12345678910111213141516171819202122232425262728293031323334353637383940 |
- event.load("living_pre_hurt");
- //event.load("player_move");
- @wait
- wait();
- //funktioniert leider nicht, da prehurt zu spät kommt
- //mgl mit area besser event.addMoveData usw
- /*
- loc = setArea(loc.mod(entity.getLoc(player)));
- id = event.addMoveData(loc, loc.mod(loc,0.5,1,0.5), -1, -1, player);
- if(event == player_move){
- event.removeMoveData(id);
- }
- function setArea(loc){
- for(a = loc.getY(loc); blocktest(loc); a--){}
- return loc;
- }
- function blocktest(loc){
- loc = loc.mod(loc, 0, -1, 0);
- if(block.isAir(loc) && loc.getY(loc) > -1){
- return true;
- }
- return false;
- }
- */
- if(isPlayer(living_entity)){
- if(player.getName(living_entity) == "SirTerence7"){
- damage_type = damage.getType(damage_source);
- if(damage_type == "fall"){
- cancel = true;
- array = entity.getMotion(living_entity);
- x = array[0];
- y = math.abs(array[1]);
- z = array[2];
- entity.throw(living_entity, x, y, z);
- }
- }
- }
- goto("wait");
|