Drowning nerf

Removed drowning air display (not working)
Updated drowning damage back to 2 in all cases
This commit is contained in:
LemADEC 2014-08-04 10:32:48 +02:00
parent 923ab61b9d
commit b633953e51
2 changed files with 5 additions and 16 deletions

View file

@ -120,38 +120,30 @@ public class SpaceEventHandler {
hasHelmet = true;
if (air == null) {// new player in space => grace period
player_airTank.put(player.username, AIR_TANK_TICKS);
player.setAir(300);
} else if (air <= 1) {
if (breathHelmet.removeAir(player)) {
player_airTank.put(player.username, AIR_TANK_TICKS);
player.setAir(Math.round(air * 300.0F / AIR_TANK_TICKS));
} else {
player_airTank.put(player.username, AIR_DROWN_TICKS);
player.setAir(Math.round(AIR_DROWN_TICKS * 300.0F / AIR_TANK_TICKS));
player.attackEntityFrom(DamageSource.drown, 5.0F);
player.attackEntityFrom(DamageSource.drown, 2.0F);
}
} else {
player_airTank.put(player.username, air - 1);
player.setAir(Math.round(air * 300.0F / AIR_TANK_TICKS));
}
}
} else if (WarpDriveConfig.SpaceHelmets.contains(helmetStack.itemID)) {
hasHelmet = true;
if (air == null) {// new player in space => grace period
player_airTank.put(player.username, AIR_TANK_TICKS);
player.setAir(300);
} else if (air <= 1) {
if (consumeO2(player.inventory.mainInventory, player)) {
player_airTank.put(player.username, AIR_TANK_TICKS);
player.setAir(Math.round(air * 300.0F / AIR_TANK_TICKS));
} else {
player_airTank.put(player.username, AIR_DROWN_TICKS);
player.setAir(Math.round(AIR_DROWN_TICKS * 300.0F / AIR_TANK_TICKS));
entity.attackEntityFrom(DamageSource.drown, 5.0F);
entity.attackEntityFrom(DamageSource.drown, 2.0F);
}
} else {
player_airTank.put(player.username, air - 1);
player.setAir(Math.round(air * 300.0F / AIR_TANK_TICKS));
}
}
}
@ -159,14 +151,11 @@ public class SpaceEventHandler {
if (!hasHelmet) {
if (air == null) {// new player in space => grace period
player_airTank.put(player.username, AIR_TANK_TICKS);
player.setAir(300);
} else if (air <= 1) {
player_airTank.put(player.username, AIR_DROWN_TICKS);
player.setAir(Math.round(AIR_DROWN_TICKS * 300.0F / AIR_TANK_TICKS));
entity.attackEntityFrom(DamageSource.drown, 5.0F);
entity.attackEntityFrom(DamageSource.drown, 2.0F);
} else {
player_airTank.put(player.username, air - 1);
player.setAir(Math.round(air * 300.0F / AIR_TANK_TICKS));
}
}

View file

@ -49,8 +49,8 @@ public class BlockPowerReactor extends BlockContainer {
public void breakBlock(World w,int x,int y,int z, int oid,int om) {
super.breakBlock(w, x, y, z, oid, om);
int[] xo = {-2,2,0,0};
int[] zo = {0,0,-2,2};
int[] xo = {-2, 2, 0, 0};
int[] zo = { 0, 0,-2, 2};
for(int i = 0; i < 4; i++) {
TileEntity te = w.getBlockTileEntity(x+xo[i], y, z+zo[i]);
if(te instanceof TileEntityPowerLaser) {