diff --git a/assets/cubyz/biomes/decorative/stone_rock.zig.zon b/assets/cubyz/biomes/decorative/stone_rock.zig.zon index 6d3a5eb94..af12a8a72 100644 --- a/assets/cubyz/biomes/decorative/stone_rock.zig.zon +++ b/assets/cubyz/biomes/decorative/stone_rock.zig.zon @@ -54,5 +54,9 @@ .id = "cubyz:tundra/patchy", .chance = 6, }, + .{ + .id = "cubyz:rare/tuften/fields", + .chance = 3, + }, }, } diff --git a/assets/cubyz/biomes/rare/tuften/fields.zig.zon b/assets/cubyz/biomes/rare/tuften/fields.zig.zon new file mode 100644 index 000000000..47b82926e --- /dev/null +++ b/assets/cubyz/biomes/rare/tuften/fields.zig.zon @@ -0,0 +1,67 @@ +.{ + .properties = .{}, + .minHeightLimit = 7, + .minHeight = 40, + .maxHeight = 60, + .maxHeightLimit = 50, + .smoothBeaches = true, + .minRadius = 256, + .maxRadius = 320, + .roughness = 1, + .hills = 15, + .chance = 0.02, + .music = "cubyz:sunrise", + .validPlayerSpawn = true, + .ground_structure = .{ + "cubyz:grass", + "2 to 3 cubyz:soil", + }, + .structures = .{ + .{ + .id = "cubyz:boulder", + .chance = 0.00016, + .block = "cubyz:slate", + .size = 5, + .size_variance = 1, + }, + .{ + .id = "cubyz:flower_patch", + .block = "cubyz:daisies", + .chance = 0.01, + .width = 10, + .variation = 6, + .density = 0.3, + .priority = 0.1, + }, + .{ + .id = "cubyz:flower_patch", + .block = "cubyz:dandelions", + .chance = 0.01, + .width = 6, + .variation = 4, + .density = 0.3, + .priority = 0.1, + }, + .{ + .id = "cubyz:sbb", + .structure = "cubyz:tree/tuften/tuft_tree", + .placeMode = .degradable, + .chance = 0.05, + }, + .{ + .id = "cubyz:sbb", + .structure = "cubyz:tree/tuften/young_tuft_tree", + .placeMode = .degradable, + .chance = 0.03, + }, + .{ + .id = "cubyz:flower_patch", + .block = "cubyz:grass_vegetation", + .chance = 0.1, + .width = 5, + .variation = 8, + .density = 0.5, + .priority = 0.2, + }, + }, +} diff --git a/assets/cubyz/blocks/candy_cane/block.zig.zon b/assets/cubyz/blocks/candy_cane/block.zig.zon new file mode 100644 index 000000000..e7b7db1d1 --- /dev/null +++ b/assets/cubyz/blocks/candy_cane/block.zig.zon @@ -0,0 +1,10 @@ +.{ + .tags = .{.choppable, .wood}, + .blockHealth = 8, + .drops = .{ + .{.items = .{.auto}}, + }, + .rotation = "cubyz:stairs", + .model = "cubyz:cube", + .texture = "cubyz:candy_cane/block", +} diff --git a/assets/cubyz/blocks/candy_cane/branch.zig.zon b/assets/cubyz/blocks/candy_cane/branch.zig.zon new file mode 100644 index 000000000..986cc705c --- /dev/null +++ b/assets/cubyz/blocks/candy_cane/branch.zig.zon @@ -0,0 +1,31 @@ +.{ + .tags = .{.choppable, .wood}, + .blockHealth = 4, + .drops = .{ + .{.items = .{.auto}}, + }, + .absorbedLight = 0x202830, + .rotation = "cubyz:branch", + .model = .{ + .radius = 4, + }, + .texture0 = "cubyz:candy_cane/branch/dot", + .texture1 = "cubyz:candy_cane/branch/half_line", + .texture2 = "cubyz:candy_cane/branch/line", + .texture3 = "cubyz:candy_cane/branch/bend", + .texture4 = "cubyz:candy_cane/branch/intersection", + .texture5 = "cubyz:candy_cane/branch/cross", + .item = .{ + .material = .{ + .durability = 260, + .massDamage = 1.5, + .hardnessDamage = 0.5, + .swingSpeed = 4.2, + .textureRoughness = 0.7, + .colors = .{ + 0xffc4a6a8, 0xffce2632, 0xfffff1ec, 0xfff0424e, 0xffffffff, + }, + }, + .texture = "candy_cane.png", + }, +} diff --git a/assets/cubyz/blocks/textures/candy_cane/block.png b/assets/cubyz/blocks/textures/candy_cane/block.png new file mode 100644 index 000000000..bfa1d00dc Binary files /dev/null and b/assets/cubyz/blocks/textures/candy_cane/block.png differ diff --git a/assets/cubyz/blocks/textures/candy_cane/branch/bend.png b/assets/cubyz/blocks/textures/candy_cane/branch/bend.png new file mode 100644 index 000000000..f4d7c2e88 Binary files /dev/null and b/assets/cubyz/blocks/textures/candy_cane/branch/bend.png differ diff --git a/assets/cubyz/blocks/textures/candy_cane/branch/cross.png b/assets/cubyz/blocks/textures/candy_cane/branch/cross.png new file mode 100644 index 000000000..5ff5754f1 Binary files /dev/null and b/assets/cubyz/blocks/textures/candy_cane/branch/cross.png differ diff --git a/assets/cubyz/blocks/textures/candy_cane/branch/dot.png b/assets/cubyz/blocks/textures/candy_cane/branch/dot.png new file mode 100644 index 000000000..4d152c99f Binary files /dev/null and b/assets/cubyz/blocks/textures/candy_cane/branch/dot.png differ diff --git a/assets/cubyz/blocks/textures/candy_cane/branch/half_line.png b/assets/cubyz/blocks/textures/candy_cane/branch/half_line.png new file mode 100644 index 000000000..12ac8bc5b Binary files /dev/null and b/assets/cubyz/blocks/textures/candy_cane/branch/half_line.png differ diff --git a/assets/cubyz/blocks/textures/candy_cane/branch/intersection.png b/assets/cubyz/blocks/textures/candy_cane/branch/intersection.png new file mode 100644 index 000000000..8bf51efb1 Binary files /dev/null and b/assets/cubyz/blocks/textures/candy_cane/branch/intersection.png differ diff --git a/assets/cubyz/blocks/textures/candy_cane/branch/line.png b/assets/cubyz/blocks/textures/candy_cane/branch/line.png new file mode 100644 index 000000000..4e3f1c717 Binary files /dev/null and b/assets/cubyz/blocks/textures/candy_cane/branch/line.png differ diff --git a/assets/cubyz/blocks/textures/gold_ore.png b/assets/cubyz/blocks/textures/gold_ore.png index 22be501a9..8446088b8 100644 Binary files a/assets/cubyz/blocks/textures/gold_ore.png and b/assets/cubyz/blocks/textures/gold_ore.png differ diff --git a/assets/cubyz/blocks/textures/gold_ore_reflectivity.png b/assets/cubyz/blocks/textures/gold_ore_reflectivity.png index 824020285..e6d1ab72b 100644 Binary files a/assets/cubyz/blocks/textures/gold_ore_reflectivity.png and b/assets/cubyz/blocks/textures/gold_ore_reflectivity.png differ diff --git a/assets/cubyz/items/textures/candy_cane.png b/assets/cubyz/items/textures/candy_cane.png new file mode 100644 index 000000000..a891f19bb Binary files /dev/null and b/assets/cubyz/items/textures/candy_cane.png differ diff --git a/assets/cubyz/items/textures/raw_gold.png b/assets/cubyz/items/textures/raw_gold.png index df0861511..2482989cf 100644 Binary files a/assets/cubyz/items/textures/raw_gold.png and b/assets/cubyz/items/textures/raw_gold.png differ diff --git a/assets/cubyz/items/textures/raw_silver.png b/assets/cubyz/items/textures/raw_silver.png index 8d3465bee..16079a3b4 100644 Binary files a/assets/cubyz/items/textures/raw_silver.png and b/assets/cubyz/items/textures/raw_silver.png differ diff --git a/assets/cubyz/recipes/wood_recipes.zig.zon b/assets/cubyz/recipes/wood_recipes.zig.zon index 6741c87c1..13bfe05a4 100644 --- a/assets/cubyz/recipes/wood_recipes.zig.zon +++ b/assets/cubyz/recipes/wood_recipes.zig.zon @@ -183,6 +183,10 @@ .inputs = .{"cubyz:log/glimmergill"}, .output = "2 cubyz:glimmergill_branch", }, + .{ + .inputs = .{"cubyz:candy_cane/block"}, + .output = "2 cubyz:candy_cane/branch", + }, .{ .inputs = .{"cubyz:birch_planks", "cubyz:coal_ore"}, diff --git a/assets/cubyz/sbb/tree/tuften/stem/askew/10.blp b/assets/cubyz/sbb/tree/tuften/stem/askew/10.blp new file mode 100644 index 000000000..1e546d678 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/askew/10.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/askew/7.blp b/assets/cubyz/sbb/tree/tuften/stem/askew/7.blp new file mode 100644 index 000000000..d437b3369 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/askew/7.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/askew/8.blp b/assets/cubyz/sbb/tree/tuften/stem/askew/8.blp new file mode 100644 index 000000000..fafac6763 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/askew/8.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/curvy/10.blp b/assets/cubyz/sbb/tree/tuften/stem/curvy/10.blp new file mode 100644 index 000000000..a2afbf3ff Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/curvy/10.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/curvy/7.blp b/assets/cubyz/sbb/tree/tuften/stem/curvy/7.blp new file mode 100644 index 000000000..be1bb8ce0 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/curvy/7.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/curvy/8.blp b/assets/cubyz/sbb/tree/tuften/stem/curvy/8.blp new file mode 100644 index 000000000..ce4e6f790 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/curvy/8.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/straight/10.blp b/assets/cubyz/sbb/tree/tuften/stem/straight/10.blp new file mode 100644 index 000000000..564aed366 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/straight/10.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/straight/5.blp b/assets/cubyz/sbb/tree/tuften/stem/straight/5.blp new file mode 100644 index 000000000..d911c1ddd Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/straight/5.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/straight/6.blp b/assets/cubyz/sbb/tree/tuften/stem/straight/6.blp new file mode 100644 index 000000000..7d59ec0b9 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/straight/6.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/straight/7.blp b/assets/cubyz/sbb/tree/tuften/stem/straight/7.blp new file mode 100644 index 000000000..3b4f96bf0 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/straight/7.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/straight/8.blp b/assets/cubyz/sbb/tree/tuften/stem/straight/8.blp new file mode 100644 index 000000000..99974ba95 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/straight/8.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/straight/9.blp b/assets/cubyz/sbb/tree/tuften/stem/straight/9.blp new file mode 100644 index 000000000..f9ef47c65 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/straight/9.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/tilt/10.blp b/assets/cubyz/sbb/tree/tuften/stem/tilt/10.blp new file mode 100644 index 000000000..0fefc9d2f Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/tilt/10.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/tilt/7.blp b/assets/cubyz/sbb/tree/tuften/stem/tilt/7.blp new file mode 100644 index 000000000..134c9fee1 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/tilt/7.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/tilt/8.blp b/assets/cubyz/sbb/tree/tuften/stem/tilt/8.blp new file mode 100644 index 000000000..daa855750 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/tilt/8.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/stem/tilt/9.blp b/assets/cubyz/sbb/tree/tuften/stem/tilt/9.blp new file mode 100644 index 000000000..7138eb151 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/stem/tilt/9.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tuft_canopy.zig.zon b/assets/cubyz/sbb/tree/tuften/tuft_canopy.zig.zon new file mode 100644 index 000000000..ee6aebb26 --- /dev/null +++ b/assets/cubyz/sbb/tree/tuften/tuft_canopy.zig.zon @@ -0,0 +1,19 @@ +.{ + .blueprints = .{ + .{.id = "cubyz:tree/tuften/tufts/small/0/violet"}, + .{.id = "cubyz:tree/tuften/tufts/small/0/pink"}, + .{.id = "cubyz:tree/tuften/tufts/small/0/red"}, + .{.id = "cubyz:tree/tuften/tufts/small/0/orange"}, + .{.id = "cubyz:tree/tuften/tufts/small/0/yellow"}, + .{.id = "cubyz:tree/tuften/tufts/small/1/violet"}, + .{.id = "cubyz:tree/tuften/tufts/small/1/pink"}, + .{.id = "cubyz:tree/tuften/tufts/small/1/red"}, + .{.id = "cubyz:tree/tuften/tufts/small/1/orange"}, + .{.id = "cubyz:tree/tuften/tufts/small/1/yellow"}, + .{.id = "cubyz:tree/tuften/tufts/big/violet"}, + .{.id = "cubyz:tree/tuften/tufts/big/pink"}, + .{.id = "cubyz:tree/tuften/tufts/big/red"}, + .{.id = "cubyz:tree/tuften/tufts/big/orange"}, + .{.id = "cubyz:tree/tuften/tufts/big/yellow"}, + }, +} diff --git a/assets/cubyz/sbb/tree/tuften/tuft_tree.zig.zon b/assets/cubyz/sbb/tree/tuften/tuft_tree.zig.zon new file mode 100644 index 000000000..862371ba8 --- /dev/null +++ b/assets/cubyz/sbb/tree/tuften/tuft_tree.zig.zon @@ -0,0 +1,24 @@ +.{ + .blueprints = .{ + .{.id = "cubyz:tree/tuften/stem/straight/5"}, + .{.id = "cubyz:tree/tuften/stem/straight/6"}, + .{.id = "cubyz:tree/tuften/stem/straight/7"}, + .{.id = "cubyz:tree/tuften/stem/straight/8", .chance = 0.5}, + .{.id = "cubyz:tree/tuften/stem/straight/9", .chance = 0.5}, + .{.id = "cubyz:tree/tuften/stem/straight/10", .chance = 0.5}, + .{.id = "cubyz:tree/tuften/stem/tilt/7"}, + .{.id = "cubyz:tree/tuften/stem/tilt/8"}, + .{.id = "cubyz:tree/tuften/stem/tilt/9"}, + .{.id = "cubyz:tree/tuften/stem/tilt/10"}, + .{.id = "cubyz:tree/tuften/stem/curvy/7"}, + .{.id = "cubyz:tree/tuften/stem/askew/8"}, + .{.id = "cubyz:tree/tuften/stem/askew/8"}, + .{.id = "cubyz:tree/tuften/stem/askew/10"}, + .{.id = "cubyz:tree/tuften/stem/curvy/7"}, + .{.id = "cubyz:tree/tuften/stem/curvy/8"}, + .{.id = "cubyz:tree/tuften/stem/curvy/10"}, + }, + .children = .{ + .pink = "cubyz:tree/tuften/tuft_canopy", + }, +} diff --git a/assets/cubyz/sbb/tree/tuften/tufts/big/orange.blp b/assets/cubyz/sbb/tree/tuften/tufts/big/orange.blp new file mode 100644 index 000000000..cc9766bbc Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/big/orange.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/big/pink.blp b/assets/cubyz/sbb/tree/tuften/tufts/big/pink.blp new file mode 100644 index 000000000..10ad2ef5c Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/big/pink.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/big/red.blp b/assets/cubyz/sbb/tree/tuften/tufts/big/red.blp new file mode 100644 index 000000000..23bbfcb52 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/big/red.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/big/violet.blp b/assets/cubyz/sbb/tree/tuften/tufts/big/violet.blp new file mode 100644 index 000000000..df72cb555 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/big/violet.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/big/yellow.blp b/assets/cubyz/sbb/tree/tuften/tufts/big/yellow.blp new file mode 100644 index 000000000..b3b278a09 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/big/yellow.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/0/orange.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/0/orange.blp new file mode 100644 index 000000000..29d6e4fbc Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/0/orange.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/0/pink.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/0/pink.blp new file mode 100644 index 000000000..a3b006043 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/0/pink.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/0/red.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/0/red.blp new file mode 100644 index 000000000..dd285c25b Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/0/red.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/0/violet.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/0/violet.blp new file mode 100644 index 000000000..dc02b9ae9 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/0/violet.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/0/yellow.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/0/yellow.blp new file mode 100644 index 000000000..d0f72dcea Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/0/yellow.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/1/orange.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/1/orange.blp new file mode 100644 index 000000000..1c61bfdb2 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/1/orange.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/1/pink.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/1/pink.blp new file mode 100644 index 000000000..3a47188d1 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/1/pink.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/1/red.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/1/red.blp new file mode 100644 index 000000000..87a29dc81 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/1/red.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/1/violet.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/1/violet.blp new file mode 100644 index 000000000..046f5db5f Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/1/violet.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/tufts/small/1/yellow.blp b/assets/cubyz/sbb/tree/tuften/tufts/small/1/yellow.blp new file mode 100644 index 000000000..a09197df4 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/tufts/small/1/yellow.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/stem/curvy/6.blp b/assets/cubyz/sbb/tree/tuften/young/stem/curvy/6.blp new file mode 100644 index 000000000..a10398157 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/stem/curvy/6.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/stem/curvy/7.blp b/assets/cubyz/sbb/tree/tuften/young/stem/curvy/7.blp new file mode 100644 index 000000000..a6027d52f Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/stem/curvy/7.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/stem/straight/4.blp b/assets/cubyz/sbb/tree/tuften/young/stem/straight/4.blp new file mode 100644 index 000000000..9b5c91ae3 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/stem/straight/4.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/stem/straight/5.blp b/assets/cubyz/sbb/tree/tuften/young/stem/straight/5.blp new file mode 100644 index 000000000..ecf4279b2 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/stem/straight/5.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/stem/straight/6.blp b/assets/cubyz/sbb/tree/tuften/young/stem/straight/6.blp new file mode 100644 index 000000000..34e619742 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/stem/straight/6.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/stem/straight/7.blp b/assets/cubyz/sbb/tree/tuften/young/stem/straight/7.blp new file mode 100644 index 000000000..1123978b1 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/stem/straight/7.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/stem/tilt/5.blp b/assets/cubyz/sbb/tree/tuften/young/stem/tilt/5.blp new file mode 100644 index 000000000..9cd48f637 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/stem/tilt/5.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/stem/tilt/6.blp b/assets/cubyz/sbb/tree/tuften/young/stem/tilt/6.blp new file mode 100644 index 000000000..27b01c462 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/stem/tilt/6.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/stem/tilt/7.blp b/assets/cubyz/sbb/tree/tuften/young/stem/tilt/7.blp new file mode 100644 index 000000000..6ca660d42 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/stem/tilt/7.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/big/orange.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/big/orange.blp new file mode 100644 index 000000000..5a6b5782d Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/big/orange.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/big/pink.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/big/pink.blp new file mode 100644 index 000000000..bc336a30b Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/big/pink.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/big/red.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/big/red.blp new file mode 100644 index 000000000..86806a6ab Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/big/red.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/big/violet.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/big/violet.blp new file mode 100644 index 000000000..9ad0fe140 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/big/violet.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/big/yellow.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/big/yellow.blp new file mode 100644 index 000000000..d1697069f Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/big/yellow.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/small/orange.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/small/orange.blp new file mode 100644 index 000000000..ccc9cc7bc Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/small/orange.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/small/pink.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/small/pink.blp new file mode 100644 index 000000000..aa72daccb Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/small/pink.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/small/red.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/small/red.blp new file mode 100644 index 000000000..f624d8d20 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/small/red.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/small/violet.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/small/violet.blp new file mode 100644 index 000000000..023c14645 Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/small/violet.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young/tufts/small/yellow.blp b/assets/cubyz/sbb/tree/tuften/young/tufts/small/yellow.blp new file mode 100644 index 000000000..dfe9d9bfd Binary files /dev/null and b/assets/cubyz/sbb/tree/tuften/young/tufts/small/yellow.blp differ diff --git a/assets/cubyz/sbb/tree/tuften/young_tuft_canopy.zig.zon b/assets/cubyz/sbb/tree/tuften/young_tuft_canopy.zig.zon new file mode 100644 index 000000000..079b6357b --- /dev/null +++ b/assets/cubyz/sbb/tree/tuften/young_tuft_canopy.zig.zon @@ -0,0 +1,14 @@ +.{ + .blueprints = .{ + .{.id = "cubyz:tree/tuften/young/tufts/small/violet"}, + .{.id = "cubyz:tree/tuften/young/tufts/small/pink"}, + .{.id = "cubyz:tree/tuften/young/tufts/small/red"}, + .{.id = "cubyz:tree/tuften/young/tufts/small/orange"}, + .{.id = "cubyz:tree/tuften/young/tufts/small/yellow"}, + .{.id = "cubyz:tree/tuften/young/tufts/big/violet"}, + .{.id = "cubyz:tree/tuften/young/tufts/big/pink"}, + .{.id = "cubyz:tree/tuften/young/tufts/big/red"}, + .{.id = "cubyz:tree/tuften/young/tufts/big/orange"}, + .{.id = "cubyz:tree/tuften/young/tufts/big/yellow"}, + }, +} diff --git a/assets/cubyz/sbb/tree/tuften/young_tuft_tree.zig.zon b/assets/cubyz/sbb/tree/tuften/young_tuft_tree.zig.zon new file mode 100644 index 000000000..643b3459a --- /dev/null +++ b/assets/cubyz/sbb/tree/tuften/young_tuft_tree.zig.zon @@ -0,0 +1,15 @@ +.{ + .blueprints = .{ + .{.id = "cubyz:tree/tuften/young/stem/straight/4"}, + .{.id = "cubyz:tree/tuften/young/stem/straight/5"}, + .{.id = "cubyz:tree/tuften/young/stem/straight/6"}, + .{.id = "cubyz:tree/tuften/young/stem/straight/7"}, + .{.id = "cubyz:tree/tuften/young/stem/tilt/5"}, + .{.id = "cubyz:tree/tuften/young/stem/tilt/6"}, + .{.id = "cubyz:tree/tuften/young/stem/curvy/6"}, + .{.id = "cubyz:tree/tuften/young/stem/curvy/7"}, + }, + .children = .{ + .pink = "cubyz:tree/tuften/young_tuft_canopy", + }, +} diff --git a/src/gui/GuiWindow.zig b/src/gui/GuiWindow.zig index 3051c530a..96dcfb34d 100644 --- a/src/gui/GuiWindow.zig +++ b/src/gui/GuiWindow.zig @@ -1,6 +1,7 @@ const std = @import("std"); const main = @import("main"); +const utils = main.utils; const graphics = main.graphics; const draw = graphics.draw; const Texture = graphics.Texture; @@ -164,39 +165,41 @@ pub fn getButtonPositions(self: *const GuiWindow) [3]f32 { const zoomInPos = zoomOutPos - iconWidth*self.scale; return .{closePos, zoomOutPos, zoomInPos}; } + pub fn mainButtonReleased(self: *GuiWindow, mousePosition: Vec2f) void { - if(grabPosition != null and @reduce(.And, grabPosition.? == mousePosition) and grabbedWindow == self) { - if(self.showTitleBar or gui.reorderWindows) { - const btnPos = self.getButtonPositions(); - const closePos = btnPos[0]; - const zoomOutPos = btnPos[1]; - const zoomInPos = btnPos[2]; - if(mousePosition[0] - self.pos[0] > zoomInPos) { - if(mousePosition[0] - self.pos[0] > zoomOutPos) { - if(mousePosition[0] - self.pos[0] > closePos) { - // Close - if(self.closeable) gui.closeWindowFromRef(self); - } else { - // Zoom out - if(self.scale > 1) { - self.scale -= 0.5; - } else { - self.scale -= 0.25; - } - self.scale = @max(self.scale, 0.25); - gui.updateWindowPositions(); - gui.save(); - } + if(grabPosition != null and grabbedWindow == self and (self.showTitleBar or gui.reorderWindows)) { + const btnPos = self.getButtonPositions(); + const closePos = btnPos[0]; + const zoomOutPos = btnPos[1]; + const zoomInPos = btnPos[2]; + const mousePositionRelative = mousePosition - self.pos; + const grabPositionRelative = if(grabPosition) |gp| gp - self.pos else @as(@Vector(2, f32), .{0.0, 0.0}); + + if(mousePositionRelative[1] >= 0 and mousePositionRelative[1] <= titleBarHeight) { + if(mousePositionRelative[0] > zoomInPos and mousePositionRelative[0] <= zoomOutPos and grabPositionRelative[0] > zoomInPos and grabPositionRelative[0] <= zoomOutPos) { + // Zoom in + if(self.scale >= 1) { + self.scale += 0.5; + } else { + self.scale += 0.25; + } + gui.updateWindowPositions(); + gui.save(); + } + if(mousePositionRelative[0] > zoomOutPos and mousePositionRelative[0] <= closePos and grabPositionRelative[0] > zoomOutPos and grabPositionRelative[0] <= closePos) { + // Zoom out + if(self.scale > 1) { + self.scale -= 0.5; } else { - // Zoom in - if(self.scale >= 1) { - self.scale += 0.5; - } else { - self.scale += 0.25; - } - gui.updateWindowPositions(); - gui.save(); + self.scale -= 0.25; } + self.scale = @max(self.scale, 0.25); + gui.updateWindowPositions(); + gui.save(); + } + if(mousePositionRelative[0] > closePos and grabPositionRelative[0] > closePos) { + // Close + if(self.closeable) gui.closeWindowFromRef(self); } } } diff --git a/src/renderer.zig b/src/renderer.zig index e0fdaf617..a1c25aa72 100644 --- a/src/renderer.zig +++ b/src/renderer.zig @@ -971,7 +971,7 @@ pub const MeshSelection = struct { // MARK: MeshSelection } fn canPlaceBlock(pos: Vec3i, block: main.blocks.Block) bool { - if(main.game.collision.collideWithBlock(block, pos[0], pos[1], pos[2], main.game.Player.getPosBlocking() + main.game.Player.outerBoundingBox.center(), main.game.Player.outerBoundingBox.extent() - @as(Vec3d, @splat(0.00005)), .{0, 0, 0}) != null) { + if(main.game.collision.collideWithBlock(block, pos[0], pos[1], pos[2], main.game.Player.getPosBlocking() + main.game.Player.outerBoundingBox.center(), main.game.Player.outerBoundingBox.extent(), .{0, 0, 0}) != null) { return false; } return true; // TODO: Check other entities