From 1f79285e838aa8c5cec1c55b43c71a65f7b26002 Mon Sep 17 00:00:00 2001
From: Oleg4260 <49838022+Oleg4260@users.noreply.github.com>
Date: Thu, 23 Jan 2025 18:11:45 +0200
Subject: [PATCH 1/6] Update README.md
I had an issue of the program not opening when I switched to KDE and removed some gtk libraries i don't need, I found out that webkit2gtk-4.1 is required, so I think this should be in the FAQ as this might help others with the same issue
---
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 995cff4..1ec3ca3 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,9 @@ The project is named after the smallest city in Germany, Arnis[^2]. The city's s
- *I don't have Minecraft installed but want to generate a world for my kids. How?*
When selecting a world, click on 'Select existing world' and choose a directory. The world will be generated there.
- *Arnis instantly closes again or the window is empty!*
-If you're on Windows, please install the [Evergreen Bootstrapper from Microsoft](https://developer.microsoft.com/en-us/microsoft-edge/webview2/?form=MA13LH#download).
+ If you're on Windows, please install the [Evergreen Bootstrapper from Microsoft](https://developer.microsoft.com/en-us/microsoft-edge/webview2/?form=MA13LH#download).
+
+ If you're on Linux, your system might be missing the webkit2gtk-4.1 library, install the corresponding package using your distro's package manager.
- *What Minecraft version should I use?*
Please use Minecraft version 1.21.4 for the best results. Minecraft version 1.16.5 and below is currently not supported, but we are working on it!
- *The generation did finish, but there's nothing in the world!*
From 3f4536e04f81ccc8b4a6acef6cba246e6fbd1546 Mon Sep 17 00:00:00 2001
From: Oleg4260
Date: Thu, 23 Jan 2025 19:43:57 +0200
Subject: [PATCH 2/6] Replaced iron blocks under railways with gravel
---
src/element_processing/railways.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/element_processing/railways.rs b/src/element_processing/railways.rs
index ef4fb3f..804c3d5 100644
--- a/src/element_processing/railways.rs
+++ b/src/element_processing/railways.rs
@@ -43,7 +43,7 @@ pub fn generate_railways(editor: &mut WorldEditor, element: &ProcessedWay, groun
let (bx, _, bz) = smoothed_points[j];
let ground_level = ground.level(XZPoint::new(bx, bz));
- editor.set_block(IRON_BLOCK, bx, ground_level, bz, None, None);
+ editor.set_block(GRAVEL, bx, ground_level, bz, None, None);
let prev = if j > 0 {
Some(smoothed_points[j - 1])
From 718389e88d2f8e8897123d85fd289e7b5e7b3991 Mon Sep 17 00:00:00 2001
From: Oleg4260
Date: Thu, 23 Jan 2025 20:50:33 +0200
Subject: [PATCH 3/6] Revert "Replaced iron blocks under railways with gravel"
This reverts commit 3f4536e04f81ccc8b4a6acef6cba246e6fbd1546.
---
src/element_processing/railways.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/element_processing/railways.rs b/src/element_processing/railways.rs
index 804c3d5..ef4fb3f 100644
--- a/src/element_processing/railways.rs
+++ b/src/element_processing/railways.rs
@@ -43,7 +43,7 @@ pub fn generate_railways(editor: &mut WorldEditor, element: &ProcessedWay, groun
let (bx, _, bz) = smoothed_points[j];
let ground_level = ground.level(XZPoint::new(bx, bz));
- editor.set_block(GRAVEL, bx, ground_level, bz, None, None);
+ editor.set_block(IRON_BLOCK, bx, ground_level, bz, None, None);
let prev = if j > 0 {
Some(smoothed_points[j - 1])
From a57c5f1f1b967d769f61c305dab26e1338e43ee7 Mon Sep 17 00:00:00 2001
From: Oleg4260
Date: Thu, 23 Jan 2025 23:37:28 +0200
Subject: [PATCH 4/6] Add landuse for quarry and landfill
---
src/block_definitions.rs | 7 +++++++
src/element_processing/landuse.rs | 9 +++++++++
2 files changed, 16 insertions(+)
diff --git a/src/block_definitions.rs b/src/block_definitions.rs
index 6424966..63b8de3 100644
--- a/src/block_definitions.rs
+++ b/src/block_definitions.rs
@@ -144,6 +144,9 @@ impl Block {
114 => "andesite_wall",
115 => "stone_brick_wall",
116..=125 => "rail",
+ 126 => "coarse_dirt",
+ 127 => "iron_ore",
+ 128 => "coal_ore",
_ => panic!("Invalid id"),
}
}
@@ -400,6 +403,10 @@ pub const RAIL_NORTH_WEST: Block = Block::new(123);
pub const RAIL_SOUTH_EAST: Block = Block::new(124);
pub const RAIL_SOUTH_WEST: Block = Block::new(125);
+pub const COARSE_DIRT: Block = Block::new(126);
+pub const IRON_ORE: Block = Block::new(127);
+pub const COAL_ORE: Block = Block::new(128);
+
// Variations for building corners
pub fn building_corner_variations() -> Vec {
vec![
diff --git a/src/element_processing/landuse.rs b/src/element_processing/landuse.rs
index f6c92c6..b24a7d9 100644
--- a/src/element_processing/landuse.rs
+++ b/src/element_processing/landuse.rs
@@ -44,6 +44,15 @@ pub fn generate_landuse(
"industrial" => COBBLESTONE,
"military" => GRAY_CONCRETE,
"railway" => GRAVEL,
+ "landfill" => { // Gravel if man_made = spoil_heap, coarse dirt else
+ let manmade = element.tags.get("man_made").unwrap_or(&binding);
+ if manmade == "spoil_heap" {
+ GRAVEL
+ } else {
+ COARSE_DIRT
+ }
+ }
+ "quarry" => STONE, // TODO: add ores
_ => {
if args.winter {
SNOW_BLOCK
From a1c69b4cb0ac9311cbad9427f5f4fcf66cce5201 Mon Sep 17 00:00:00 2001
From: Oleg4260
Date: Fri, 24 Jan 2025 20:11:10 +0200
Subject: [PATCH 5/6] Did cargo fmt
---
src/block_definitions.rs | 7 +++++++
src/element_processing/landuse.rs | 10 ++++++++++
2 files changed, 17 insertions(+)
diff --git a/src/block_definitions.rs b/src/block_definitions.rs
index 6424966..63b8de3 100644
--- a/src/block_definitions.rs
+++ b/src/block_definitions.rs
@@ -144,6 +144,9 @@ impl Block {
114 => "andesite_wall",
115 => "stone_brick_wall",
116..=125 => "rail",
+ 126 => "coarse_dirt",
+ 127 => "iron_ore",
+ 128 => "coal_ore",
_ => panic!("Invalid id"),
}
}
@@ -400,6 +403,10 @@ pub const RAIL_NORTH_WEST: Block = Block::new(123);
pub const RAIL_SOUTH_EAST: Block = Block::new(124);
pub const RAIL_SOUTH_WEST: Block = Block::new(125);
+pub const COARSE_DIRT: Block = Block::new(126);
+pub const IRON_ORE: Block = Block::new(127);
+pub const COAL_ORE: Block = Block::new(128);
+
// Variations for building corners
pub fn building_corner_variations() -> Vec {
vec![
diff --git a/src/element_processing/landuse.rs b/src/element_processing/landuse.rs
index f6c92c6..9ca3283 100644
--- a/src/element_processing/landuse.rs
+++ b/src/element_processing/landuse.rs
@@ -44,6 +44,16 @@ pub fn generate_landuse(
"industrial" => COBBLESTONE,
"military" => GRAY_CONCRETE,
"railway" => GRAVEL,
+ "landfill" => {
+ // Gravel if man_made = spoil_heap, coarse dirt else
+ let manmade = element.tags.get("man_made").unwrap_or(&binding);
+ if manmade == "spoil_heap" {
+ GRAVEL
+ } else {
+ COARSE_DIRT
+ }
+ }
+ "quarry" => STONE, // TODO: add ores
_ => {
if args.winter {
SNOW_BLOCK
From 04d9d5269f8cdb72b8a164eaeda3a6707274e497 Mon Sep 17 00:00:00 2001
From: Oleg4260
Date: Fri, 24 Jan 2025 20:29:43 +0200
Subject: [PATCH 6/6] Put changes back again (i messed up with merging lmao)
---
src/element_processing/landuse.rs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/element_processing/landuse.rs b/src/element_processing/landuse.rs
index f6c92c6..9ca3283 100644
--- a/src/element_processing/landuse.rs
+++ b/src/element_processing/landuse.rs
@@ -44,6 +44,16 @@ pub fn generate_landuse(
"industrial" => COBBLESTONE,
"military" => GRAY_CONCRETE,
"railway" => GRAVEL,
+ "landfill" => {
+ // Gravel if man_made = spoil_heap, coarse dirt else
+ let manmade = element.tags.get("man_made").unwrap_or(&binding);
+ if manmade == "spoil_heap" {
+ GRAVEL
+ } else {
+ COARSE_DIRT
+ }
+ }
+ "quarry" => STONE, // TODO: add ores
_ => {
if args.winter {
SNOW_BLOCK