Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(BlockRegion): adjust for changes to BlockRegion #121

Merged
merged 2 commits into from
Dec 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion module.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "MetalRenegades",
"version": "1.1.0",
"version": "1.1.0-SNAPSHOT",
"author": "Wabadump & AndyTechGuy",
"displayName": "Metal Renegades",
"description": "A harsh western world with a robotic twist. A student project for GSOC 2019.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import org.terasology.structureTemplates.components.SpawnBlockRegionsComponent;
import org.terasology.world.block.Block;
import org.terasology.world.block.BlockManager;
import org.terasology.world.block.BlockRegionIterable;
import org.terasology.world.block.BlockRegions;
import org.terasology.world.chunks.CoreChunk;
import org.terasology.world.generation.Region;
import org.terasology.world.generation.WorldRasterizer;
Expand Down Expand Up @@ -75,7 +73,7 @@ public void generateChunk(CoreChunk chunk, Region chunkRegion) {
Block block = regionToFill.blockType;

Vector3i value = new Vector3i();
for (Vector3ic pos : BlockRegions.iterable(regionToFill.region)) {
for (Vector3ic pos : regionToFill.region) {
value.set(pos).add(structurePosition);
if (chunkRegion.getRegion().encompasses(JomlUtil.from(value))) {
chunk.setBlock(ChunkMath.calcRelativeBlockPos(value, new Vector3i()), block);
Expand Down