Skip to content

Commit

Permalink
Fix static logger access
Browse files Browse the repository at this point in the history
  • Loading branch information
kmecpp committed Mar 24, 2018
1 parent 158e095 commit 3db5ab0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions src/main/java/icbm/classic/CommandICBM.java
Expand Up @@ -183,4 +183,6 @@ public int compareTo(ICommand par1Obj)
{
return super.compareTo(par1Obj);
}


}
Expand Up @@ -106,7 +106,7 @@ public void onUpdate()
if (this.getBlast() == null || this.getBlast().controller != this || !this.getBlast().isAlive)
{
this.setDead();
ICBMClassic.INSTANCE.logger().error("Procedural explosion ended due to null! This is a bug!");
ICBMClassic.logger().error("Procedural explosion ended due to null! This is a bug!");
return;
}

Expand Down Expand Up @@ -191,7 +191,7 @@ protected void readEntityFromNBT(NBTTagCompound nbt)
}
catch (Exception e)
{
ICBMClassic.INSTANCE.logger().error("ICBM error in loading an explosion!");
ICBMClassic.logger().error("ICBM error in loading an explosion!");
e.printStackTrace();
}
}
Expand Down
Expand Up @@ -200,11 +200,11 @@ public void launch(Pos target)
RadarRegistry.add(this);
if (target != null)
{
ICBMClassic.INSTANCE.logger().info("Launching " + this.getEntityName() + " (" + this.getEntityId() + ") from " + sourceOfProjectile.xi() + ", " + sourceOfProjectile.yi() + ", " + sourceOfProjectile.zi() + " to " + targetPos.xi() + ", " + targetPos.yi() + ", " + targetPos.zi());
ICBMClassic.logger().info("Launching " + this.getEntityName() + " (" + this.getEntityId() + ") from " + sourceOfProjectile.xi() + ", " + sourceOfProjectile.yi() + ", " + sourceOfProjectile.zi() + " to " + targetPos.xi() + ", " + targetPos.yi() + ", " + targetPos.zi());
}
else
{
ICBMClassic.INSTANCE.logger().info("Launching " + this.getEntityName() + " (" + this.getEntityId() + ") from " + sourceOfProjectile.xi() + ", " + sourceOfProjectile.yi() + ", " + sourceOfProjectile.zi());
ICBMClassic.logger().info("Launching " + this.getEntityName() + " (" + this.getEntityId() + ") from " + sourceOfProjectile.xi() + ", " + sourceOfProjectile.yi() + ", " + sourceOfProjectile.zi());
}
}

Expand Down Expand Up @@ -520,12 +520,12 @@ public void doExplosion()
}

//Log that the missile impacted
ICBMClassic.INSTANCE.logger().info(this.getEntityName() + " (" + this.getEntityId() + ") exploded in " + (int) this.posX + ", " + (int) this.posY + ", " + (int) this.posZ);
ICBMClassic.logger().info(this.getEntityName() + " (" + this.getEntityId() + ") exploded in " + (int) this.posX + ", " + (int) this.posY + ", " + (int) this.posZ);
}
}
catch (Exception e)
{
ICBMClassic.INSTANCE.logger().error("EntityMissile#normalExplode() - Unexpected error while triggering explosive on missile", e);
ICBMClassic.logger().error("EntityMissile#normalExplode() - Unexpected error while triggering explosive on missile", e);
}
}

Expand Down Expand Up @@ -605,4 +605,4 @@ public NBTTagCompound getExplosiveData()
return this.nbtData;
}

}
}
Expand Up @@ -153,7 +153,7 @@ public void doExplode()
}
catch (Exception e)
{
ICBMClassic.INSTANCE.logger().error("Failed to teleport entity to the End.", e);
ICBMClassic.logger().error("Failed to teleport entity to the End.", e);
}
}
}
Expand Down
Expand Up @@ -126,7 +126,7 @@ public void doExplode()
else
{
this.controller.endExplosion();
ICBMClassic.INSTANCE.logger().error("Something went wrong with multi-threading while detonating the nuclear explosive.");
ICBMClassic.logger().error("Something went wrong with multi-threading while detonating the nuclear explosive.");
}
}
}
Expand All @@ -150,7 +150,7 @@ public void doPostExplode()
}
catch (Exception e)
{
ICBMClassic.INSTANCE.logger().error("Nuclear-type detonation Failed!", e);
ICBMClassic.logger().error("Nuclear-type detonation Failed!", e);
}

this.doDamageEntities(this.getBlastRadius(), this.energy * 1000);
Expand Down
Expand Up @@ -54,7 +54,7 @@ public void doExplode()
}
catch (Exception e)
{
ICBMClassic.INSTANCE.logger().error("ICBM Rejuvenation Failed!", e);
ICBMClassic.logger().error("ICBM Rejuvenation Failed!", e);
}
}
}
Expand Down
Expand Up @@ -140,7 +140,7 @@ public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, Entity

if (entityLiving != null)
{
ICBMClassic.INSTANCE.logger().info("ICBMClassic>>BlockExplosive#onBlockPlacedBy: " + entityLiving.getName() + " placed " + ex.handler.getExplosiveName() + " in: " + pos);
ICBMClassic.logger().info("ICBMClassic>>BlockExplosive#onBlockPlacedBy: " + entityLiving.getName() + " placed " + ex.handler.getExplosiveName() + " in: " + pos);
}
}
}
Expand Down

0 comments on commit 3db5ab0

Please sign in to comment.