Skip to content

Commit 2ae66d3

Browse files
committed
chore: add a few presets
1 parent ed27d9e commit 2ae66d3

1 file changed

Lines changed: 99 additions & 7 deletions

File tree

src/lib/editor/presets.ts

Lines changed: 99 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,102 @@
1-
export const presets = [{
2-
label: "Partial Declaration Test",
3-
content: `
4-
namespace xyz;
1+
export const presets = [
2+
{
3+
label: 'Simple Surface Conditions',
4+
content: `
5+
namespace myPack;
56
6-
MyVariable := SurfaceRule {
7-
Block
7+
8+
InFriendlyBiome := SurfaceCondition { Biome [ forest plains beach ] }
9+
InUnfriendlyBiome := SurfaceCondition { Biome [ forest plains beach ] }
10+
11+
HoneySurface := SurfaceRule { Block honey }
12+
SlimeSurface := SurfaceRule { Block slime }
13+
14+
15+
MyStrangeSurface := SurfaceRule {
16+
Sequence [
17+
If (InFriendlyBiome) HoneySurface
18+
If (InUnfriendlyBiome) SlimeSurface
19+
Block magma
20+
]
821
}
922
`.trim()
10-
}]
23+
},
24+
{
25+
label: 'Vanilla Overwordl Badlands',
26+
content: `
27+
namespace MySpace;
28+
29+
InBadlands := SurfaceCondition {
30+
Biome [
31+
minecraft:badlands
32+
minecraft:eroded_badlands
33+
minecraft:wooded_badlands
34+
]
35+
}
36+
37+
SkyTerracotta := SurfaceRule {
38+
If (AboveSurface) Block stone
39+
}
40+
41+
NonHoleOrangeTerracotta := SurfaceRule { If (!Hole) Block orange_terracotta }
42+
43+
TerracottaBands := SurfaceRule {
44+
If (StoneDepth Floor 0 sub 0)
45+
Sequence [
46+
If (YAbove Absolute(74) 1 add)
47+
Sequence [
48+
If (or (
49+
Noise minecraft:surface [-0.909, -0.5454]
50+
Noise minecraft:surface [-0.1818, 0.1818]
51+
Noise minecraft:surface [0.5454, 0.909]
52+
))
53+
Block minecraft:terracotta
54+
55+
Bandlands
56+
]
57+
]
58+
}
59+
60+
WhiteTerracotta := SurfaceRule { If (AboveWater -6 -1 add) Block white_terracotta }
61+
OrangeTerracotta := SurfaceRule { If (YAbove Absolute(63) 0 sub ) Block orange_terracotta }
62+
StoneAndGravel := SurfaceRule {
63+
Sequence [
64+
If (StoneDepth Ceiling 0 sub 0) Block stone
65+
Block Gravel
66+
]
67+
}
68+
69+
SurfaceSands := SurfaceRule {
70+
If (AboveWater -1 0 sub) Sequence [
71+
If (StoneDepth Ceiling 0 sub 0) Block minecraft:red_sandstone
72+
Block minecraft:red_sand
73+
]
74+
}
75+
76+
OrangeTerracottaEdge := SurfaceRule {
77+
If ( and (
78+
YAbove Absolute(63) 0 sub
79+
!YAbove Absolute(74) 1 add
80+
) ) Block minecraft:orange_terracotta
81+
}
82+
83+
Badlands := SurfaceRule {
84+
If (InBadlands) Sequence [
85+
If (YAbove Absolute(63) 0 sub) Sequence [
86+
SkyTerracotta
87+
TerracottaBands
88+
SurfaceSands
89+
NonHoleOrangeTerracotta
90+
WhiteTerracotta
91+
StoneAndGravel
92+
]
93+
If (YAbove Absolute(63) -1 add) Sequence [
94+
OrangeTerracottaEdge
95+
Bandlands
96+
]
97+
If (StoneDepth Floor 0 add 0) WhiteTerracotta
98+
]
99+
}
100+
`
101+
}
102+
];

0 commit comments

Comments
 (0)