Fixed console spam with unusual EMP blasts
This commit is contained in:
parent
b4adeb704d
commit
3cab938906
1 changed files with 15 additions and 6 deletions
|
@ -30,6 +30,7 @@ public abstract class BlockAbstractContainer extends BlockContainer implements I
|
||||||
|
|
||||||
protected boolean isRotating = false;
|
protected boolean isRotating = false;
|
||||||
protected boolean hasSubBlocks = false;
|
protected boolean hasSubBlocks = false;
|
||||||
|
private static boolean isInvalidEMPreported = false;
|
||||||
|
|
||||||
protected BlockAbstractContainer(Material material) {
|
protected BlockAbstractContainer(Material material) {
|
||||||
super(material);
|
super(material);
|
||||||
|
@ -136,9 +137,13 @@ public abstract class BlockAbstractContainer extends BlockContainer implements I
|
||||||
} else if (explosiveEMP.getRadius() == 50.0F) {
|
} else if (explosiveEMP.getRadius() == 50.0F) {
|
||||||
onEMP(world, x, y, z, 0.70F);
|
onEMP(world, x, y, z, 0.70F);
|
||||||
} else {
|
} else {
|
||||||
|
if (!isInvalidEMPreported) {
|
||||||
|
isInvalidEMPreported = true;
|
||||||
WarpDrive.logger.warn(String.format("EMP received @ DIM%d (%d %d %d) from %s with energy %d and unsupported radius %.1f",
|
WarpDrive.logger.warn(String.format("EMP received @ DIM%d (%d %d %d) from %s with energy %d and unsupported radius %.1f",
|
||||||
world.provider.dimensionId, x, y, z,
|
world.provider.dimensionId, x, y, z,
|
||||||
explosiveEMP, explosiveEMP.getEnergy(), explosiveEMP.getRadius()));
|
explosiveEMP, explosiveEMP.getEnergy(), explosiveEMP.getRadius()));
|
||||||
|
Commons.dumpAllThreads();
|
||||||
|
}
|
||||||
onEMP(world, x, y, z, 0.02F);
|
onEMP(world, x, y, z, 0.02F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,9 +163,13 @@ public abstract class BlockAbstractContainer extends BlockContainer implements I
|
||||||
} else if (explosiveEMP.getRadius() == 50.0F) {
|
} else if (explosiveEMP.getRadius() == 50.0F) {
|
||||||
onEMP(world, x, y, z, 0.70F);
|
onEMP(world, x, y, z, 0.70F);
|
||||||
} else {
|
} else {
|
||||||
|
if (!isInvalidEMPreported) {
|
||||||
|
isInvalidEMPreported = true;
|
||||||
WarpDrive.logger.warn(String.format("EMP received @ DIM%d (%d %d %d) from %s with energy %d and unsupported radius %.1f",
|
WarpDrive.logger.warn(String.format("EMP received @ DIM%d (%d %d %d) from %s with energy %d and unsupported radius %.1f",
|
||||||
world.provider.dimensionId, x, y, z,
|
world.provider.dimensionId, x, y, z,
|
||||||
explosiveEMP, explosiveEMP.getEnergy(), explosiveEMP.getRadius()));
|
explosiveEMP, explosiveEMP.getEnergy(), explosiveEMP.getRadius()));
|
||||||
|
Commons.dumpAllThreads();
|
||||||
|
}
|
||||||
onEMP(world, x, y, z, 0.02F);
|
onEMP(world, x, y, z, 0.02F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue