Optimize saveShip()

This commit is contained in:
Disasm 2013-07-11 00:50:20 +04:00
parent 5b66c1d84c
commit fc1ab2d8e7

View file

@ -357,15 +357,14 @@ public class EntityJump extends Entity {
* Saving ship to memory
*
* @param shipSize
* @param deleteShip
*/
public void saveShip(int shipSize) {
ship = new JumpBlock[shipSize];
int index = 0;
for (int y = minY; y <= maxY; y++) {
for (int x = minX; x <= maxX; x++) {
for (int z = minZ; z <= maxZ; z++) {
for (int x = minX; x <= maxX; x++) {
for (int z = minZ; z <= maxZ; z++) {
for (int y = minY; y <= maxY; y++) {
if (ship == null) {
killEntity("ship is null!");
return;
@ -393,7 +392,7 @@ public class EntityJump extends Entity {
System.out.println((new StringBuilder()).append("[JUMP] Ship saved: ").append((new StringBuilder()).append(ship.length).append(" blocks")).toString());
}
/**
*Ship moving
*/