-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove distinction between populators and samplers
- Loading branch information
Showing
58 changed files
with
753 additions
and
685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/net/gegy1000/earth/server/world/coordinate/DebugLatLngCoordinateState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...n/java/net/gegy1000/earth/server/world/pipeline/composer/DebugSignDecorationComposer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/net/gegy1000/earth/server/world/pipeline/layer/DebugCoverPopulator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package net.gegy1000.earth.server.world.pipeline.layer; | ||
|
||
import net.gegy1000.terrarium.server.world.pipeline.DataLayerProducer; | ||
import net.gegy1000.terrarium.server.world.pipeline.DataView; | ||
import net.gegy1000.terrarium.server.world.pipeline.source.tile.CoverRasterTile; | ||
|
||
public class DebugCoverPopulator implements DataLayerProducer<CoverRasterTile> { | ||
@Override | ||
public CoverRasterTile apply(DataView view) { | ||
CoverRasterTile result = new CoverRasterTile(view); | ||
int viewX = view.getX(); | ||
int viewY = view.getY(); | ||
for (int localZ = 0; localZ < view.getHeight(); localZ++) { | ||
for (int localX = 0; localX < view.getWidth(); localX++) { | ||
result.set(localX, localZ, DebugMap.getCover(localX + viewX, localZ + viewY).getCoverType()); | ||
} | ||
} | ||
return result; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...er/world/pipeline/populator/DebugMap.java → ...server/world/pipeline/layer/DebugMap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/net/gegy1000/earth/server/world/pipeline/layer/OsmPopulatorLayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package net.gegy1000.earth.server.world.pipeline.layer; | ||
|
||
import net.gegy1000.earth.server.world.pipeline.source.tile.OsmTile; | ||
import net.gegy1000.terrarium.server.world.pipeline.DataLayerProcessor; | ||
import net.gegy1000.terrarium.server.world.pipeline.DataView; | ||
|
||
public class OsmPopulatorLayer implements DataLayerProcessor<OsmTile, OsmTile> { | ||
@Override | ||
public OsmTile apply(DataView view, OsmTile parent, DataView parentView) { | ||
return parent; | ||
} | ||
|
||
@Override | ||
public DataView getParentView(DataView view) { | ||
return view.grow(8, 8, 8, 8); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.