From b633953e51605b4bed244e4384801168e59ef641 Mon Sep 17 00:00:00 2001 From: LemADEC Date: Mon, 4 Aug 2014 10:32:48 +0200 Subject: [PATCH] Drowning nerf Removed drowning air display (not working) Updated drowning damage back to 2 in all cases --- src/cr0s/WarpDrive/SpaceEventHandler.java | 17 +++-------------- .../WarpDrive/machines/BlockPowerReactor.java | 4 ++-- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/cr0s/WarpDrive/SpaceEventHandler.java b/src/cr0s/WarpDrive/SpaceEventHandler.java index a26cff72..a3d45bbf 100644 --- a/src/cr0s/WarpDrive/SpaceEventHandler.java +++ b/src/cr0s/WarpDrive/SpaceEventHandler.java @@ -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)); } } diff --git a/src/cr0s/WarpDrive/machines/BlockPowerReactor.java b/src/cr0s/WarpDrive/machines/BlockPowerReactor.java index 57e75f0b..3db9d5c4 100644 --- a/src/cr0s/WarpDrive/machines/BlockPowerReactor.java +++ b/src/cr0s/WarpDrive/machines/BlockPowerReactor.java @@ -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) {