From 459c498d82e488b09f065db8d42f5d076615c0ec Mon Sep 17 00:00:00 2001 From: Martin Steiger Date: Thu, 29 Oct 2015 18:37:31 +0100 Subject: [PATCH] Minor code and javadoc cleanup --- .../terasology/cities/CityWorldGenerator.java | 16 ---------------- .../org/terasology/cities/bldg/gen/Turtle.java | 10 ++++------ 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/terasology/cities/CityWorldGenerator.java b/src/main/java/org/terasology/cities/CityWorldGenerator.java index c58070a..70996a7 100644 --- a/src/main/java/org/terasology/cities/CityWorldGenerator.java +++ b/src/main/java/org/terasology/cities/CityWorldGenerator.java @@ -60,7 +60,6 @@ import org.terasology.registry.In; import org.terasology.world.block.BlockManager; import org.terasology.world.generation.BaseFacetedWorldGenerator; -import org.terasology.world.generation.World; import org.terasology.world.generation.WorldBuilder; import org.terasology.world.generator.RegisterWorldGenerator; import org.terasology.world.generator.plugin.WorldGeneratorPluginLibrary; @@ -68,8 +67,6 @@ @RegisterWorldGenerator(id = "city", displayName = "City World") public class CityWorldGenerator extends BaseFacetedWorldGenerator { - World world; - private final Spawner spawner = new CitySpawner(); @In @@ -84,19 +81,6 @@ public CityWorldGenerator(SimpleUri uri) { super(uri); } - @Override - public void initialize() { - super.initialize(); - -// noiseMap = new NoiseHeightMap(); -// heightMap = HeightMaps.symmetric(noiseMap, Symmetries.alongNegativeDiagonal()); - -// register(new HeightMapTerrainGenerator(heightMap)); -// register(new BoundaryGenerator(heightMap)); -// register(new CityTerrainGenerator(heightMap)); -// register(new FloraGeneratorFast(heightMap)); - } - @Override public Vector3f getSpawnPosition(EntityRef entity) { return spawner.getSpawnPosition(getWorld(), entity); diff --git a/src/main/java/org/terasology/cities/bldg/gen/Turtle.java b/src/main/java/org/terasology/cities/bldg/gen/Turtle.java index 229c64e..31a1c10 100644 --- a/src/main/java/org/terasology/cities/bldg/gen/Turtle.java +++ b/src/main/java/org/terasology/cities/bldg/gen/Turtle.java @@ -18,7 +18,6 @@ import org.terasology.cities.common.Edges; import org.terasology.commonworld.Orientation; -import org.terasology.math.geom.BaseVector2f; import org.terasology.math.geom.BaseVector2i; import org.terasology.math.geom.ImmutableVector2i; import org.terasology.math.geom.Rect2i; @@ -28,8 +27,7 @@ * A turtle has a position and direction. It can be used to define 2D shapes in a relative * coordinate system. */ -public class Turtle -{ +public class Turtle { private Orientation orient; private Vector2i pos; @@ -56,11 +54,11 @@ public Turtle rotate(int degrees) { /** * Sets the position independent of current position/location - * @param pos the new coordinates + * @param newPos the new coordinates * @return this */ - public Turtle setPosition(BaseVector2i pos) { - return setPosition(pos.getX(), pos.getY()); + public Turtle setPosition(BaseVector2i newPos) { + return setPosition(newPos.getX(), newPos.getY()); } /**