Update to 1.19.4

This commit is contained in:
Motschen
2023-04-13 16:17:24 +02:00
parent 2e5958af80
commit ae97a76d0b
71 changed files with 3379 additions and 274 deletions

View File

@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'fabric-loom' version '1.1-SNAPSHOT'
id 'maven-publish'
}
@@ -12,6 +12,20 @@ group = project.maven_group
loom {
accessWidenerPath = file("src/main/resources/thisrocks.accesswidener")
runs {
//
// This adds a new gradle task that runs the datagen API: "gradlew runDatagenClient"
//
datagenClient {
inherit client
name "Data Generation"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}"
vmArg "-Dfabric-api.datagen.modid=rocks"
runDir "build/datagen"
}
}
}
repositories {
@@ -53,6 +67,15 @@ tasks.withType(JavaCompile).configureEach {
// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 17
}
sourceSets {
main {
resources {
srcDirs += [
'src/main/generated'
]
}
}
}
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task

View File

@@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx2G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.14.8
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.2
loader_version=0.14.19
# Mod Properties
mod_version = 1.6.1
mod_version = 1.7.0
maven_group = eu.midnightdust.motschen
archives_base_name = rocks
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.56.0+1.19
midnightlib_version=0.5.2
fabric_version=0.78.0+1.19.4
midnightlib_version=1.3.0-fabric

View File

@@ -0,0 +1,51 @@
// 1.19.4 2023-04-13T15:52:48.359803058 This Rocks!/rocks
dcc0d9933482f519f2f7e50417b78be0a515918d data/rocks/worldgen/placed_feature/soul_soil_rock.json
456ca559dda509eeffabef971214c9fc6bbaf932 data/rocks/worldgen/placed_feature/warped_stick.json
9ee56411c9172a4b40b4e2b3099a4739448ca08e data/rocks/worldgen/configured_feature/spruce_stick.json
1919d79e82602199e121c571751b5b57081fe710 data/rocks/worldgen/configured_feature/underwater_starfish.json
d3df56defedd0e0711d6bd9e3e1f07b065b93079 data/rocks/worldgen/placed_feature/red_sand_rock.json
5b3ad85a032f0ddc6768dd5d8f5be96eafb77d00 data/rocks/worldgen/placed_feature/acacia_stick.json
6a74e22433f148cffb0b879c8b38f0c7fd200e13 data/rocks/worldgen/placed_feature/crimson_stick.json
7fbc9d652d5a02582c260b4c76d05566339a68a1 data/rocks/worldgen/configured_feature/granite_rock.json
683bc011a2fa35ca0a457d0eeaab4a900ee6dd55 data/rocks/worldgen/placed_feature/rock.json
9a4bf562fe53bfcff21a39bfe6043a48986ab87d data/rocks/worldgen/placed_feature/sand_rock.json
c33151e25a50dcc5a826e65933ab9719ad639d6d data/rocks/worldgen/placed_feature/end_stone_rock.json
3a37c1f098d280104c74d2ddff197ec9d2225f39 data/rocks/worldgen/configured_feature/diorite_rock.json
7f14a9567453f2faf68722640d55102cc5e96af1 data/rocks/worldgen/configured_feature/oak_stick.json
2f7cdca56829a8e66ec6bb6cc3fff2f2bdb95b38 data/rocks/worldgen/configured_feature/red_sand_rock.json
93f0ff373f22b3fe818305c03cf3a947dc0016d0 data/rocks/worldgen/placed_feature/gravel_rock.json
10cc68baeee62813b71a8881a24ec5270c385aa9 data/rocks/worldgen/placed_feature/jungle_stick.json
33c1f1089e71f5ea1252749c994eefd893b27893 data/rocks/worldgen/configured_feature/warped_stick.json
002f484872e9c3642d8fd7568f5533c4badadf55 data/rocks/worldgen/configured_feature/acacia_stick.json
5e1c33acb6043e8e33561f06650d0973382d6054 data/rocks/worldgen/placed_feature/nether_geyser.json
6b1fa178181fd3ec1138da12e220976bf11f831c data/rocks/worldgen/configured_feature/nether_gravel_rock.json
16e9b2f47ac483b8f672c42a5c36194d14e7f7f7 data/rocks/worldgen/placed_feature/nether_gravel_rock.json
a09aa0e744166ba6c07e640a55dcb6570c34936f data/rocks/worldgen/placed_feature/andesite_rock.json
07245b68ad42948f36707d5b83dc995ded4b3038 data/rocks/worldgen/placed_feature/seashell.json
de8a64d00b10892f62b21dd3e034608836b4215b data/rocks/worldgen/configured_feature/netherrack_rock.json
26574f35fb852a572ad10c2882160b4fc280aad8 data/rocks/worldgen/configured_feature/sand_rock.json
6b1fa178181fd3ec1138da12e220976bf11f831c data/rocks/worldgen/configured_feature/gravel_rock.json
4554733520656e979093beaa05d881213ad81415 data/rocks/worldgen/configured_feature/underwater_seashell.json
a2553fb89e8382c0e04dcf3ded89ffcad51b111b data/rocks/worldgen/configured_feature/andesite_rock.json
8d525964606767ac06f52fb03e331029444d934f data/rocks/worldgen/placed_feature/snowy_geyser.json
483c5b5fefbc122e1e28d5303c9a6287fc3405d0 data/rocks/worldgen/configured_feature/dark_oak_stick.json
9413155a906186256fb8395d7c892833db2390bc data/rocks/worldgen/configured_feature/end_stone_rock.json
8210691068079b5f1652a95b854c1ffd37548a22 data/rocks/worldgen/configured_feature/rock.json
d0179c57f1a557cd656ebcd902bfbb57fd877e16 data/rocks/worldgen/configured_feature/seashell.json
6e4c12f66d3ca1b09f0b0e5586e6bcc85f985216 data/rocks/worldgen/configured_feature/jungle_stick.json
2ac994ff2e7818ea340b0c4bd527386e80dbcf52 data/rocks/worldgen/placed_feature/underwater_seashell.json
527e35b402cf6f3ee07e767affe58f75257748ad data/rocks/worldgen/placed_feature/starfish.json
5bc6faa179ca69a8a89cc04910f0288621ce89ea data/rocks/worldgen/configured_feature/nether_geyser.json
07933044c5169dee4eb3c88ca569981e005f21c4 data/rocks/worldgen/placed_feature/birch_stick.json
384c6ad8b5505b2b9900c159f9cf9ff7e0ff7a62 data/rocks/worldgen/placed_feature/netherrack_rock.json
3543cb07163388142629427a44900841e9da1869 data/rocks/worldgen/configured_feature/soul_soil_rock.json
a09cce68c2604042b64b254081cc47202c84168e data/rocks/worldgen/placed_feature/spruce_stick.json
b6706c0647a808959373d31b0ca7c2cdc6f53fa6 data/rocks/worldgen/configured_feature/crimson_stick.json
381bcd86b6fe3c65116f21f14ac61927628cf1cb data/rocks/worldgen/placed_feature/dark_oak_stick.json
f9b95c245164e443738638e4af012ed92b8180e0 data/rocks/worldgen/configured_feature/starfish.json
735c703ef4e0d25978d492d203e7f9979d601524 data/rocks/worldgen/placed_feature/underwater_starfish.json
c25b0c3bdb96f8e3469481cb787691807bfc3fa3 data/rocks/worldgen/configured_feature/snowy_geyser.json
8d296ba93c8580775e9b55dc9c247191e072d499 data/rocks/worldgen/configured_feature/birch_stick.json
58ab91cffdd6df6e9956d2cf8c88a39f36e1a52a data/rocks/worldgen/placed_feature/oak_stick.json
0d79544af5d224d8067936bbfd447f1c533e27b5 data/rocks/worldgen/placed_feature/granite_rock.json
6565d3f0e44737341c4e9f8fadf927d4fa8c2c3e data/rocks/worldgen/placed_feature/diorite_rock.json

View File

@@ -0,0 +1,37 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:acacia_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:acacia_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:acacia_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:andesite_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:andesite_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:andesite_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:andesite_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,37 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:birch_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:birch_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:birch_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,37 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:crimson_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:crimson_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:crimson_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,37 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:dark_oak_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:dark_oak_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:dark_oak_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:diorite_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:diorite_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:diorite_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:diorite_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:end_stone_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:end_stone_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:end_stone_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:end_stone_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:granite_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:granite_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:granite_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:granite_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,37 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:jungle_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:jungle_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:jungle_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,19 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:nether_geyser",
"Properties": {
"active": "false"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:netherrack_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:netherrack_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:netherrack_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:netherrack_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,37 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:oak_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:oak_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:oak_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:red_sand_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:red_sand_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:red_sand_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:red_sand_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:sand_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:sand_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:sand_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:sand_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,40 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:seashell",
"Properties": {
"variation": "yellow",
"waterlogged": "false"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:seashell",
"Properties": {
"variation": "pink",
"waterlogged": "false"
}
},
"weight": 2
},
{
"data": {
"Name": "rocks:seashell",
"Properties": {
"variation": "white",
"waterlogged": "false"
}
},
"weight": 6
}
]
}
}
}

View File

@@ -0,0 +1,6 @@
{
"type": "minecraft:snowy_geyser",
"config": {
"probability": 1.0
}
}

View File

@@ -0,0 +1,46 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:soul_soil_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:soul_soil_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:soul_soil_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:soul_soil_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,43 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:spruce_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:spruce_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:spruce_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
},
{
"data": {
"Name": "rocks:pinecone"
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,40 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:starfish",
"Properties": {
"variation": "red",
"waterlogged": "false"
}
},
"weight": 2
},
{
"data": {
"Name": "rocks:starfish",
"Properties": {
"variation": "pink",
"waterlogged": "false"
}
},
"weight": 6
},
{
"data": {
"Name": "rocks:starfish",
"Properties": {
"variation": "orange",
"waterlogged": "false"
}
},
"weight": 7
}
]
}
}
}

View File

@@ -0,0 +1,6 @@
{
"type": "minecraft:underwater_seashell",
"config": {
"probability": 1.0
}
}

View File

@@ -0,0 +1,6 @@
{
"type": "minecraft:underwater_starfish",
"config": {
"probability": 1.0
}
}

View File

@@ -0,0 +1,37 @@
{
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:warped_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:warped_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:warped_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
}

View File

@@ -0,0 +1,80 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:acacia_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:acacia_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:acacia_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:grass_block",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,89 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:andesite_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:andesite_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:andesite_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:andesite_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:andesite",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,80 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:birch_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:birch_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:birch_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:grass_block",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,88 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:crimson_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:crimson_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:crimson_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 90
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"below_top": 0
},
"min_inclusive": {
"above_bottom": 0
}
}
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:crimson_nylium",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,80 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:dark_oak_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:dark_oak_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:dark_oak_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:grass_block",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,89 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:diorite_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:diorite_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:diorite_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:diorite_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:diorite",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,89 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:end_stone_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:end_stone_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:end_stone_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:end_stone_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "MOTION_BLOCKING"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:end_stone",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,89 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:granite_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:granite_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:granite_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:granite_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:granite",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,89 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:gravel",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,80 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:jungle_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:jungle_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:jungle_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:grass_block",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,70 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:nether_geyser",
"Properties": {
"active": "false"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 15
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"below_top": 0
},
"min_inclusive": {
"above_bottom": 0
}
}
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:netherrack",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,97 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:gravel_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 30
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"below_top": 0
},
"min_inclusive": {
"above_bottom": 0
}
}
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:gravel",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,101 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:netherrack_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:netherrack_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:netherrack_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:netherrack_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 90
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"below_top": 0
},
"min_inclusive": {
"above_bottom": 0
}
}
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": [
"minecraft:netherrack",
"minecraft:warped_nylium",
"minecraft:crimson_nylium"
],
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,80 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:oak_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:oak_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:oak_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:grass_block",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,92 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:red_sand_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:red_sand_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:red_sand_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:red_sand_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": [
"minecraft:red_sand",
"minecraft:red_sandstone"
],
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,97 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:not",
"predicate": {
"type": "minecraft:matching_blocks",
"blocks": [
"minecraft:ice",
"minecraft:sand",
"minecraft:red_sand",
"minecraft:end_stone"
],
"offset": [
0,
-1,
0
]
}
}
]
}
}
]
}

View File

@@ -0,0 +1,92 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:sand_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:sand_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:sand_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:sand_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": [
"minecraft:sand",
"minecraft:sandstone"
],
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,88 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:seashell",
"Properties": {
"variation": "yellow",
"waterlogged": "false"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:seashell",
"Properties": {
"variation": "pink",
"waterlogged": "false"
}
},
"weight": 2
},
{
"data": {
"Name": "rocks:seashell",
"Properties": {
"variation": "white",
"waterlogged": "false"
}
},
"weight": 6
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 1
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": [
"minecraft:sand",
"minecraft:sandstone",
"minecraft:red_sand",
"minecraft:red_sandstone"
],
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,28 @@
{
"feature": {
"type": "minecraft:snowy_geyser",
"config": {
"probability": 1.0
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}

View File

@@ -0,0 +1,100 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:soul_soil_rock",
"Properties": {
"variation": "tiny"
}
},
"weight": 10
},
{
"data": {
"Name": "rocks:soul_soil_rock",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:soul_soil_rock",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:soul_soil_rock",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 60
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"below_top": 0
},
"min_inclusive": {
"above_bottom": 0
}
}
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": [
"minecraft:soul_soil",
"minecraft:soul_sand"
],
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,86 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:spruce_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:spruce_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:spruce_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
},
{
"data": {
"Name": "rocks:pinecone"
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:grass_block",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,88 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:starfish",
"Properties": {
"variation": "red",
"waterlogged": "false"
}
},
"weight": 2
},
{
"data": {
"Name": "rocks:starfish",
"Properties": {
"variation": "pink",
"waterlogged": "false"
}
},
"weight": 6
},
{
"data": {
"Name": "rocks:starfish",
"Properties": {
"variation": "orange",
"waterlogged": "false"
}
},
"weight": 7
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 1
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": [
"minecraft:sand",
"minecraft:sandstone",
"minecraft:red_sand",
"minecraft:red_sandstone"
],
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,28 @@
{
"feature": {
"type": "minecraft:underwater_seashell",
"config": {
"probability": 1.0
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}

View File

@@ -0,0 +1,28 @@
{
"feature": {
"type": "minecraft:underwater_starfish",
"config": {
"probability": 1.0
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}

View File

@@ -0,0 +1,88 @@
{
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"data": {
"Name": "rocks:warped_stick",
"Properties": {
"variation": "small"
}
},
"weight": 7
},
{
"data": {
"Name": "rocks:warped_stick",
"Properties": {
"variation": "medium"
}
},
"weight": 5
},
{
"data": {
"Name": "rocks:warped_stick",
"Properties": {
"variation": "large"
}
},
"weight": 1
}
]
}
}
},
"placement": [
{
"type": "minecraft:count",
"count": 90
},
{
"type": "minecraft:rarity_filter",
"chance": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"below_top": 0
},
"min_inclusive": {
"above_bottom": 0
}
}
},
{
"type": "minecraft:biome"
},
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:warped_nylium",
"offset": [
0,
-1,
0
]
}
]
}
}
]
}

View File

@@ -0,0 +1,60 @@
package eu.midnightdust.motschen.rocks;
import eu.midnightdust.motschen.rocks.world.FeatureInjector;
import eu.midnightdust.motschen.rocks.world.configured_feature.MiscFeatures;
import eu.midnightdust.motschen.rocks.world.configured_feature.NetherFeatures;
import eu.midnightdust.motschen.rocks.world.configured_feature.RockFeatures;
import eu.midnightdust.motschen.rocks.world.configured_feature.StickFeatures;
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricDynamicRegistryProvider;
import net.minecraft.registry.RegistryBuilder;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.RegistryWrapper;
import java.util.concurrent.CompletableFuture;
public class RocksDataGen implements DataGeneratorEntrypoint {
@Override
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
FabricDataGenerator.Pack pack = fabricDataGenerator.createPack();
pack.addProvider(WorldGenData::new);
System.out.println("out");
}
@Override
public String getEffectiveModId() {
return "rocks";
}
@Override
public void buildRegistry(RegistryBuilder registryBuilder) {
System.out.println("building registry");
registryBuilder.addRegistry(RegistryKeys.CONFIGURED_FEATURE, RockFeatures::initConfigured);
registryBuilder.addRegistry(RegistryKeys.PLACED_FEATURE, RockFeatures::initPlaced);
registryBuilder.addRegistry(RegistryKeys.CONFIGURED_FEATURE, StickFeatures::initConfigured);
registryBuilder.addRegistry(RegistryKeys.PLACED_FEATURE, StickFeatures::initPlaced);
registryBuilder.addRegistry(RegistryKeys.CONFIGURED_FEATURE, NetherFeatures::initConfigured);
registryBuilder.addRegistry(RegistryKeys.PLACED_FEATURE, NetherFeatures::initPlaced);
registryBuilder.addRegistry(RegistryKeys.CONFIGURED_FEATURE, MiscFeatures::initConfigured);
registryBuilder.addRegistry(RegistryKeys.PLACED_FEATURE, MiscFeatures::initPlaced);
}
public static class WorldGenData extends FabricDynamicRegistryProvider {
public WorldGenData(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
super(output, registriesFuture);
}
@Override
protected void configure(RegistryWrapper.WrapperLookup registries, Entries entries) {
System.out.println("configure");
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.CONFIGURED_FEATURE));
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.PLACED_FEATURE));
}
@Override
public String getName() {
return RocksMain.MOD_ID;
}
}
}

View File

@@ -8,21 +8,21 @@ import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation;
import eu.midnightdust.motschen.rocks.blockstates.StickVariation;
import eu.midnightdust.motschen.rocks.config.RocksConfig;
import eu.midnightdust.motschen.rocks.world.*;
import eu.midnightdust.motschen.rocks.world.configured_feature.MiscFeatures;
import eu.midnightdust.motschen.rocks.world.configured_feature.NetherFeatures;
import eu.midnightdust.motschen.rocks.world.configured_feature.RockFeatures;
import eu.midnightdust.motschen.rocks.world.configured_feature.StickFeatures;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
import net.minecraft.block.Block;
import net.minecraft.item.*;
import net.minecraft.state.property.EnumProperty;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import java.util.ArrayList;
import java.util.List;
import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.registerBlockWithItem;
import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.registerItem;
public class RocksMain implements ModInitializer {
public static final String MOD_ID = "rocks";
public static final ItemGroup RocksGroup = FabricItemGroupBuilder.build(new Identifier(MOD_ID, "rocks"), () -> new ItemStack(RocksMain.Rock));
public static final EnumProperty<RockVariation> ROCK_VARIATION = EnumProperty.of("variation", RockVariation.class);
public static final EnumProperty<StickVariation> STICK_VARIATION = EnumProperty.of("variation", StickVariation.class);
@@ -55,85 +55,66 @@ public class RocksMain implements ModInitializer {
public static Block Geyser = new OverworldGeyser();
public static Block NetherGeyser = new NetherGeyser();
public static Item CobblestoneSplitter = new Item(new Item.Settings().group(RocksMain.RocksGroup));
public static Item GraniteSplitter = new Item(new Item.Settings().group(RocksMain.RocksGroup));
public static Item DioriteSplitter = new Item(new Item.Settings().group(RocksMain.RocksGroup));
public static Item AndesiteSplitter = new Item(new Item.Settings().group(RocksMain.RocksGroup));
public static Item SandStoneSplitter = new Item(new Item.Settings().group(RocksMain.RocksGroup));
public static Item RedSandStoneSplitter = new Item(new Item.Settings().group(RocksMain.RocksGroup));
public static Item EndStoneSplitter = new Item(new Item.Settings().group(RocksMain.RocksGroup));
public static Item NetherrackSplitter = new Item(new Item.Settings().group(RocksMain.RocksGroup));
public static Item SoulSoilSplitter = new Item(new Item.Settings().group(RocksMain.RocksGroup));
public static Item CobblestoneSplitter = new Item(new Item.Settings());
public static Item GraniteSplitter = new Item(new Item.Settings());
public static Item DioriteSplitter = new Item(new Item.Settings());
public static Item AndesiteSplitter = new Item(new Item.Settings());
public static Item SandStoneSplitter = new Item(new Item.Settings());
public static Item RedSandStoneSplitter = new Item(new Item.Settings());
public static Item EndStoneSplitter = new Item(new Item.Settings());
public static Item NetherrackSplitter = new Item(new Item.Settings());
public static Item SoulSoilSplitter = new Item(new Item.Settings());
public static List<ItemStack> groupItems = new ArrayList<>();
public static ItemGroup RocksGroup;
@Override
public void onInitialize() {
RocksConfig.init("rocks", RocksConfig.class);
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"rock"), Rock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"rock"), new BlockItem(Rock, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"granite_rock"), GraniteRock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"granite_rock"), new BlockItem(GraniteRock, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"diorite_rock"), DioriteRock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"diorite_rock"), new BlockItem(DioriteRock, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"andesite_rock"), AndesiteRock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"andesite_rock"), new BlockItem(AndesiteRock, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"sand_rock"), SandRock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"sand_rock"), new BlockItem(SandRock, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"red_sand_rock"), RedSandRock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"red_sand_rock"), new BlockItem(RedSandRock, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"gravel_rock"), GravelRock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"gravel_rock"), new BlockItem(GravelRock, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"end_stone_rock"), EndstoneRock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"end_stone_rock"), new BlockItem(EndstoneRock, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"netherrack_rock"), NetherrackRock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"netherrack_rock"), new BlockItem(NetherrackRock, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"soul_soil_rock"), SoulSoilRock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"soul_soil_rock"), new BlockItem(SoulSoilRock, new Item.Settings().group(RocksMain.RocksGroup)));
registerBlockWithItem(new Identifier(MOD_ID,"rock"), Rock);
registerBlockWithItem(new Identifier(MOD_ID,"granite_rock"), GraniteRock);
registerBlockWithItem(new Identifier(MOD_ID,"diorite_rock"), DioriteRock);
registerBlockWithItem(new Identifier(MOD_ID,"andesite_rock"), AndesiteRock);
registerBlockWithItem(new Identifier(MOD_ID,"sand_rock"), SandRock);
registerBlockWithItem(new Identifier(MOD_ID,"red_sand_rock"), RedSandRock);
registerBlockWithItem(new Identifier(MOD_ID,"gravel_rock"), GravelRock);
registerBlockWithItem(new Identifier(MOD_ID,"end_stone_rock"), EndstoneRock);
registerBlockWithItem(new Identifier(MOD_ID,"netherrack_rock"), NetherrackRock);
registerBlockWithItem(new Identifier(MOD_ID,"soul_soil_rock"), SoulSoilRock);
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"oak_stick"), OakStick);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"oak_stick"), new BlockItem(OakStick, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"spruce_stick"), SpruceStick);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"spruce_stick"), new BlockItem(SpruceStick, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"birch_stick"), BirchStick);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"birch_stick"), new BlockItem(BirchStick, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"acacia_stick"), AcaciaStick);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"acacia_stick"), new BlockItem(AcaciaStick, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"jungle_stick"), JungleStick);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"jungle_stick"), new BlockItem(JungleStick, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"dark_oak_stick"), DarkOakStick);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"dark_oak_stick"), new BlockItem(DarkOakStick, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"crimson_stick"), CrimsonStick);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"crimson_stick"), new BlockItem(CrimsonStick, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"warped_stick"), WarpedStick);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"warped_stick"), new BlockItem(WarpedStick, new Item.Settings().group(RocksMain.RocksGroup)));
registerBlockWithItem(new Identifier(MOD_ID,"oak_stick"), OakStick);
registerBlockWithItem(new Identifier(MOD_ID,"spruce_stick"), SpruceStick);
registerBlockWithItem(new Identifier(MOD_ID,"birch_stick"), BirchStick);
registerBlockWithItem(new Identifier(MOD_ID,"acacia_stick"), AcaciaStick);
registerBlockWithItem(new Identifier(MOD_ID,"jungle_stick"), JungleStick);
registerBlockWithItem(new Identifier(MOD_ID,"dark_oak_stick"), DarkOakStick);
registerBlockWithItem(new Identifier(MOD_ID,"crimson_stick"), CrimsonStick);
registerBlockWithItem(new Identifier(MOD_ID,"warped_stick"), WarpedStick);
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"geyser"), Geyser);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"geyser"), new BlockItem(Geyser, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"nether_geyser"), NetherGeyser);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"nether_geyser"), new BlockItem(NetherGeyser, new Item.Settings().group(RocksMain.RocksGroup)));
registerBlockWithItem(new Identifier(MOD_ID,"geyser"), Geyser);
registerBlockWithItem(new Identifier(MOD_ID,"nether_geyser"), NetherGeyser);
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"pinecone"), Pinecone);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"pinecone"), new BlockItem(Pinecone, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"seashell"), Seashell);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"seashell"), new BlockItem(Seashell, new Item.Settings().group(RocksMain.RocksGroup)));
Registry.register(Registry.BLOCK, new Identifier(MOD_ID,"starfish"), Starfish);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"starfish"), new BlockItem(Starfish, new Item.Settings().group(RocksMain.RocksGroup)));
registerBlockWithItem(new Identifier(MOD_ID,"pinecone"), Pinecone);
registerBlockWithItem(new Identifier(MOD_ID,"seashell"), Seashell);
registerBlockWithItem(new Identifier(MOD_ID,"starfish"), Starfish);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"cobblestone_splitter"), CobblestoneSplitter);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"granite_splitter"), GraniteSplitter);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"diorite_splitter"), DioriteSplitter);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"andesite_splitter"), AndesiteSplitter);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"sandstone_splitter"), SandStoneSplitter);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"red_sandstone_splitter"), RedSandStoneSplitter);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"end_stone_splitter"), EndStoneSplitter);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"netherrack_splitter"), NetherrackSplitter);
Registry.register(Registry.ITEM, new Identifier(MOD_ID,"soul_soil_splitter"), SoulSoilSplitter);
registerItem(new Identifier(MOD_ID,"cobblestone_splitter"), CobblestoneSplitter);
registerItem(new Identifier(MOD_ID,"granite_splitter"), GraniteSplitter);
registerItem(new Identifier(MOD_ID,"diorite_splitter"), DioriteSplitter);
registerItem(new Identifier(MOD_ID,"andesite_splitter"), AndesiteSplitter);
registerItem(new Identifier(MOD_ID,"sandstone_splitter"), SandStoneSplitter);
registerItem(new Identifier(MOD_ID,"red_sandstone_splitter"), RedSandStoneSplitter);
registerItem(new Identifier(MOD_ID,"end_stone_splitter"), EndStoneSplitter);
registerItem(new Identifier(MOD_ID,"netherrack_splitter"), NetherrackSplitter);
registerItem(new Identifier(MOD_ID,"soul_soil_splitter"), SoulSoilSplitter);
RockFeatures.init();
StickFeatures.init();
MiscFeatures.init();
NetherFeatures.init();
RocksGroup = FabricItemGroup.builder(new Identifier(MOD_ID, "rocks")).icon(() -> new ItemStack(RocksMain.Rock)).entries(((displayContext, entries) -> {
entries.addAll(groupItems);
})).build();
new FeatureRegistry<>();
FeatureInjector.init();
BlockEntityInit.init();
}
}

View File

@@ -0,0 +1,39 @@
package eu.midnightdust.motschen.rocks;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.*;
import net.minecraft.util.Identifier;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import net.minecraft.world.gen.feature.PlacedFeature;
public class RocksRegistryUtils {
public static void registerBlockWithItem(Identifier id, Block block) {
Registry.register(Registries.BLOCK, id, block);
registerItem(id, new BlockItem(block, new Item.Settings()));
}
public static void registerItem(Identifier id, Item item) {
Registry.register(Registries.ITEM, id, item);
if (id.equals(new Identifier(RocksMain.MOD_ID, "starfish"))) putStarfishItems(item);
else RocksMain.groupItems.add(new ItemStack(item));
}
private static void putStarfishItems(Item starfish) {
ItemStack redStarfish = new ItemStack(starfish);
redStarfish.getOrCreateNbt().putString("variation", "red");
RocksMain.groupItems.add(redStarfish);
ItemStack orangeStarfish = new ItemStack(starfish);
orangeStarfish.getOrCreateNbt().putString("variation", "orange");
RocksMain.groupItems.add(orangeStarfish);
ItemStack pinkStarfish = new ItemStack(starfish);
pinkStarfish.getOrCreateNbt().putString("variation", "pink");
RocksMain.groupItems.add(pinkStarfish);
}
public static void register(Registerable<ConfiguredFeature<?, ?>> context, String name, ConfiguredFeature<?, ?> feature) {
context.register(RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, new Identifier(RocksMain.MOD_ID, name)), feature);
}
public static void register(Registerable<PlacedFeature> context, String name, PlacedFeature feature) {
context.register(RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier(RocksMain.MOD_ID, name)), feature);
}
}

View File

@@ -3,15 +3,16 @@ package eu.midnightdust.motschen.rocks.block.blockentity;
import eu.midnightdust.motschen.rocks.RocksMain;
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
public class BlockEntityInit {
public static BlockEntityType<OverworldGeyserBlockEntity> OVERWORLD_GEYSER_BE;
public static BlockEntityType<NetherGeyserBlockEntity> NETHER_GEYSER_BE;
public static void init() {
OVERWORLD_GEYSER_BE = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(RocksMain.MOD_ID,"overworld_geyser_blockentity"), FabricBlockEntityTypeBuilder.create(OverworldGeyserBlockEntity::new, RocksMain.Geyser).build(null));
NETHER_GEYSER_BE = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(RocksMain.MOD_ID,"nether_geyser_blockentity"), FabricBlockEntityTypeBuilder.create(NetherGeyserBlockEntity::new, RocksMain.NetherGeyser).build(null));
OVERWORLD_GEYSER_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(RocksMain.MOD_ID,"overworld_geyser_blockentity"), FabricBlockEntityTypeBuilder.create(OverworldGeyserBlockEntity::new, RocksMain.Geyser).build(null));
NETHER_GEYSER_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(RocksMain.MOD_ID,"nether_geyser_blockentity"), FabricBlockEntityTypeBuilder.create(NetherGeyserBlockEntity::new, RocksMain.NetherGeyser).build(null));
}
}

View File

@@ -4,7 +4,6 @@ import eu.midnightdust.motschen.rocks.RocksMain;
import eu.midnightdust.motschen.rocks.block.NetherGeyser;
import net.minecraft.block.BlockState;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.math.BlockPos;
@@ -27,9 +26,9 @@ public class NetherGeyserBlockEntity extends BlockEntity {
if (player != null) {
world.setBlockState(pos, state.with(NetherGeyser.ACTIVE, true));
player.damage(DamageSource.ON_FIRE, 1);
player.damage(world.getDamageSources().onFire(), 1);
if (player2 != null) {
player2.damage(DamageSource.ON_FIRE, 4);
player2.damage(world.getDamageSources().onFire(), 4);
}
blockEntity.countdown = 1000;
} else {

View File

@@ -3,36 +3,38 @@ package eu.midnightdust.motschen.rocks.config;
import eu.midnightdust.lib.config.MidnightConfig;
public class RocksConfig extends MidnightConfig {
@Comment public static Comment needs_restart;
public final static String rocks = "rocks";
@Comment public static Comment rocks;
@Entry(name = "block.rocks.rock") public static int rock_count = 3;
@Entry(name = "block.rocks.granite_rock") public static int granite_rock_count = 3;
@Entry(name = "block.rocks.diorite_rock") public static int diorite_rock_count = 3;
@Entry(name = "block.rocks.andesite_rock") public static int andesite_rock_count = 3;
@Entry(name = "block.rocks.sand_rock") public static int sand_rock_count = 3;
@Entry(name = "block.rocks.red_sand_rock") public static int red_sand_rock_count = 3;
@Entry(name = "block.rocks.gravel_rock") public static int gravel_rock_count = 3;
@Entry(name = "block.rocks.end_stone_rock") public static int end_stone_rock_count = 3;
@Entry(name = "block.rocks.netherrack_rock") public static int netherrack_rock_count = 90;
@Entry(name = "block.rocks.soul_soil_rock") public static int soul_soil_rock_count = 3;
@Comment(category = rocks) public static Comment needs_restart;
@Entry(category = rocks, name = "block.rocks.rock") public static boolean rock = true;
@Entry(category = rocks, name = "block.rocks.granite_rock") public static boolean granite_rock = true;
@Entry(category = rocks, name = "block.rocks.diorite_rock") public static boolean diorite_rock = true;
@Entry(category = rocks, name = "block.rocks.andesite_rock") public static boolean andesite_rock = true;
@Entry(category = rocks, name = "block.rocks.sand_rock") public static boolean sand_rock = true;
@Entry(category = rocks, name = "block.rocks.red_sand_rock") public static boolean red_sand_rock = true;
@Entry(category = rocks, name = "block.rocks.gravel_rock") public static boolean gravel_rock = true;
@Entry(category = rocks, name = "block.rocks.end_stone_rock") public static boolean end_stone_rock = true;
@Entry(category = rocks, name = "block.rocks.netherrack_rock") public static boolean netherrack_rock = true;
@Entry(category = rocks, name = "block.rocks.soul_soil_rock") public static boolean soul_soil_rock = true;
@Comment public static Comment sticks;
@Entry(name = "block.rocks.oak_stick") public static int oak_stick_count = 3;
@Entry(name = "block.rocks.spruce_stick") public static int spruce_stick_count = 3;
@Entry(name = "block.rocks.birch_stick") public static int birch_stick_count = 3;
@Entry(name = "block.rocks.acacia_stick") public static int acacia_stick_count = 3;
@Entry(name = "block.rocks.jungle_stick") public static int jungle_stick_count = 3;
@Entry(name = "block.rocks.dark_oak_stick") public static int dark_oak_stick_count = 3;
@Entry(name = "block.rocks.crimson_stick") public static int crimson_stick_count = 90;
@Entry(name = "block.rocks.warped_stick") public static int warped_stick_count = 90;
public final static String sticks = "sticks";
@Comment(category = sticks) public static Comment needs_restart1;
@Entry(category = sticks, name = "block.rocks.oak_stick") public static boolean oak_stick = true;
@Entry(category = sticks, name = "block.rocks.spruce_stick") public static boolean spruce_stick = true;
@Entry(category = sticks, name = "block.rocks.birch_stick") public static boolean birch_stick = true;
@Entry(category = sticks, name = "block.rocks.acacia_stick") public static boolean acacia_stick = true;
@Entry(category = sticks, name = "block.rocks.jungle_stick") public static boolean jungle_stick = true;
@Entry(category = sticks, name = "block.rocks.dark_oak_stick") public static boolean dark_oak_stick = true;
@Entry(category = sticks, name = "block.rocks.crimson_stick") public static boolean crimson_stick = true;
@Entry(category = sticks, name = "block.rocks.warped_stick") public static boolean warped_stick = true;
@Comment public static Comment misc;
@Entry(name = "block.rocks.pinecone") public static int pinecone_count = 3;
@Entry(name = "block.rocks.geyser") public static int geyser_count = 3;
@Entry(name = "block.rocks.nether_geyser") public static int nether_geyser_count = 30;
@Entry(name = "block.rocks.seashell") public static int seashell_count = 1;
@Entry(name = "block.rocks.starfish") public static int starfish_count = 1;
@Entry public static int underwater_seashell_count = 3;
@Entry public static int underwater_starfish_count = 3;
public final static String misc = "misc";
@Comment(category = misc) public static Comment needs_restart2;
@Entry(category = misc, name = "block.rocks.pinecone") public static boolean pinecone = true;
@Entry(category = misc, name = "block.rocks.geyser") public static boolean geyser = true;
@Entry(category = misc, name = "block.rocks.nether_geyser") public static boolean nether_geyser = true;
@Entry(category = misc, name = "block.rocks.seashell") public static boolean seashell = true;
@Entry(category = misc, name = "block.rocks.starfish") public static boolean starfish = true;
@Entry(category = misc) public static boolean underwater_seashell = true;
@Entry(category = misc) public static boolean underwater_starfish = true;
}

View File

@@ -1,17 +1,18 @@
package eu.midnightdust.motschen.rocks.world;
import eu.midnightdust.motschen.rocks.world.configured_feature.MiscFeatures;
import eu.midnightdust.motschen.rocks.world.configured_feature.NetherFeatures;
import eu.midnightdust.motschen.rocks.world.configured_feature.RockFeatures;
import eu.midnightdust.motschen.rocks.world.configured_feature.StickFeatures;
import eu.midnightdust.motschen.rocks.RocksMain;
import eu.midnightdust.motschen.rocks.config.RocksConfig;
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
import net.fabricmc.fabric.api.biome.v1.BiomeSelectionContext;
import net.minecraft.tag.BiomeTags;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.tag.BiomeTags;
import net.minecraft.util.Identifier;
import net.minecraft.world.gen.GenerationStep;
import net.minecraft.world.gen.feature.PlacedFeature;
import java.util.function.Predicate;
@SuppressWarnings({"OptionalGetWithoutIsPresent"})
public class FeatureInjector {
public static void init() {
@@ -19,19 +20,19 @@ public class FeatureInjector {
Predicate<BiomeSelectionContext> rocks = (ctx ->
!ctx.hasTag(BiomeTags.IS_NETHER) && !ctx.hasTag(BiomeTags.END_CITY_HAS_STRUCTURE) && !ctx.hasTag(BiomeTags.IS_BEACH) && !ctx.hasTag(BiomeTags.DESERT_PYRAMID_HAS_STRUCTURE)
&& !ctx.hasTag(BiomeTags.IS_BADLANDS) && !ctx.hasTag(BiomeTags.IGLOO_HAS_STRUCTURE) && !ctx.hasTag(BiomeTags.IS_OCEAN));
BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.ROCK_PLACED_FEATURE).get());
BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.GRANITE_ROCK_PLACED_FEATURE).get());
BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.DIORITE_ROCK_PLACED_FEATURE).get());
BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.ANDESITE_ROCK_PLACED_FEATURE).get());
if (RocksConfig.rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("rock"));
if (RocksConfig.granite_rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("granite_rock"));
if (RocksConfig.diorite_rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("diorite_rock"));
if (RocksConfig.andesite_rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("andesite_rock"));
Predicate<BiomeSelectionContext> sand_rocks = (ctx -> ctx.hasTag(BiomeTags.IS_BEACH) || ctx.hasTag(BiomeTags.DESERT_PYRAMID_HAS_STRUCTURE) || ctx.hasTag(BiomeTags.IS_BADLANDS) || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert"));
BiomeModifications.addFeature(sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.SAND_ROCK_PLACED_FEATURE).get());
if (RocksConfig.sand_rock) BiomeModifications.addFeature(sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("sand_rock"));
Predicate<BiomeSelectionContext> red_sand_rocks = (ctx -> ctx.hasTag(BiomeTags.IS_BADLANDS) || ctx.hasTag(BiomeTags.DESERT_PYRAMID_HAS_STRUCTURE) || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert"));
BiomeModifications.addFeature(red_sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.RED_SAND_ROCK_PLACED_FEATURE).get());
if (RocksConfig.red_sand_rock) BiomeModifications.addFeature(red_sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("red_sand_rock"));
BiomeModifications.addFeature(ctx -> ctx.getBiomeKey().getValue().toString().contains("the_end"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.END_STONE_ROCK_PLACED_FEATURE).get());
if (RocksConfig.end_stone_rock) BiomeModifications.addFeature(ctx -> ctx.getBiomeKey().getValue().toString().contains("the_end"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("end_stone_rock"));
// Sticks
Predicate<BiomeSelectionContext> oak_sticks = (ctx -> {
@@ -40,47 +41,50 @@ public class FeatureInjector {
name.contains("minecraft:wooded_mountains") || name.contains("minecraft:plains") ||
name.contains("minecraft:flower_forest") || name.contains("minecraft:wooded_badlands_plateau") ||
name.contains("minecraft:modified_wooded_badlands_plateau") || ctx.hasTag(BiomeTags.SWAMP_HUT_HAS_STRUCTURE);});
BiomeModifications.addFeature(oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.OAK_STICK_PLACED_FEATURE).get());
if (RocksConfig.oak_stick) BiomeModifications.addFeature(oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("oak_stick"));
Predicate<BiomeSelectionContext> birch_sticks = (ctx -> {
String name = ctx.getBiomeKey().getValue().toString();
return name.contains("minecraft:forest") || name.contains("birch") || name.contains("minecraft:flower_forest");});
BiomeModifications.addFeature(birch_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.BIRCH_STICK_PLACED_FEATURE).get());
if (RocksConfig.birch_stick) BiomeModifications.addFeature(birch_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("birch_stick"));
Predicate<BiomeSelectionContext> spruce_sticks = (ctx -> {
String name = ctx.getBiomeKey().getValue().toString();
return name.contains("minecraft:wooded_mountains") || ctx.hasTag(BiomeTags.IS_TAIGA);});
BiomeModifications.addFeature(spruce_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.SPRUCE_STICK_PLACED_FEATURE).get());
if (RocksConfig.spruce_stick) BiomeModifications.addFeature(spruce_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("spruce_stick"));
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.VILLAGE_SAVANNA_HAS_STRUCTURE), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.ACACIA_STICK_PLACED_FEATURE).get());
if (RocksConfig.acacia_stick) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.VILLAGE_SAVANNA_HAS_STRUCTURE), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("acacia_stick"));
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_JUNGLE), GenerationStep.Feature.UNDERGROUND_DECORATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.JUNGLE_STICK_PLACED_FEATURE).get());
if (RocksConfig.jungle_stick) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_JUNGLE), GenerationStep.Feature.UNDERGROUND_DECORATION, getKey("jungle_stick"));
Predicate<BiomeSelectionContext> dark_oak_sticks = (ctx -> {
String name = ctx.getBiomeKey().getValue().toString();
return name.contains("minecraft:dark_forest") || name.contains("minecraft:dark_forest_hills") ||
name.contains("minecraft:dark_forest_mountains");});
BiomeModifications.addFeature(dark_oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.DARK_OAK_STICK_PLACED_FEATURE).get());
if (RocksConfig.dark_oak_stick) BiomeModifications.addFeature(dark_oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("dark_oak_stick"));
// Misc
Predicate<BiomeSelectionContext> beach = (ctx -> {
String name = ctx.getBiomeKey().getValue().toString();
return ctx.hasTag(BiomeTags.IS_BEACH) && !name.contains("snow");});
BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.SEASHELL_PLACED_FEATURE).get());
BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.STARFISH_PLACED_FEATURE).get());
if (RocksConfig.seashell) BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("seashell"));
if (RocksConfig.starfish) BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("starfish"));
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_OCEAN), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.UNDERWATER_STARFISH_PLACED_FEATURE).get());
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_OCEAN), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.UNDERWATER_SEASHELL_PLACED_FEATURE).get());
if (RocksConfig.underwater_starfish) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_OCEAN), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("underwater_starfish"));
if (RocksConfig.underwater_seashell) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_OCEAN), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("underwater_seashell"));
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHERRACK_ROCK_PLACED_FEATURE).get());
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.SOUL_SOIL_ROCK_PLACED_FEATURE).get());
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHER_GRAVEL_ROCK_PLACED_FEATURE).get());
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHER_GEYSER_PLACED_FEATURE).get());
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.WARPED_STICK_PLACED_FEATURE).get());
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.CRIMSON_STICK_PLACED_FEATURE).get());
if (RocksConfig.netherrack_rock) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("netherrack_rock"));
if (RocksConfig.soul_soil_rock) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("soul_soil_rock"));
if (RocksConfig.gravel_rock) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("nether_gravel_rock"));
if (RocksConfig.nether_geyser) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("nether_geyser"));
if (RocksConfig.warped_stick) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("warped_stick"));
if (RocksConfig.crimson_stick) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("crimson_stick"));
BiomeModifications.addFeature(ctx -> !ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.GRAVEL_ROCK_PLACED_FEATURE).get());
if (RocksConfig.gravel_rock) BiomeModifications.addFeature(ctx -> !ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("gravel_rock"));
BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IGLOO_HAS_STRUCTURE) || ctx.getBiomeKey().toString().contains("snowy"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.SNOWY_GEYSER_PLACED_FEATURE).get());
if (RocksConfig.geyser) BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IGLOO_HAS_STRUCTURE) || ctx.getBiomeKey().toString().contains("snowy"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, getKey("snowy_geyser"));
}
public static RegistryKey<PlacedFeature> getKey(String name) {
return RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier(RocksMain.MOD_ID, name));
}
}

View File

@@ -6,9 +6,10 @@ import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation;
import eu.midnightdust.motschen.rocks.world.feature.SnowFeature;
import eu.midnightdust.motschen.rocks.world.feature.UnderwaterFeature;
import net.minecraft.block.BlockState;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.state.property.Properties;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.gen.ProbabilityConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.FeatureConfig;
@@ -21,7 +22,7 @@ public class FeatureRegistry<FC extends FeatureConfig> {
public static final SnowFeature SNOWY_GEYSER_FEATURE;
private static <C extends FeatureConfig, F extends Feature<C>> F register(String name, F feature) {
return Registry.register(Registry.FEATURE, name, feature);
return Registry.register(Registries.FEATURE, name, feature);
}
private static final WeightedBlockStateProvider StarfishStates = new WeightedBlockStateProvider(DataPool.<BlockState>builder()

View File

@@ -8,13 +8,10 @@ import eu.midnightdust.motschen.rocks.config.RocksConfig;
import eu.midnightdust.motschen.rocks.world.FeatureRegistry;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.Identifier;
import net.minecraft.registry.Registerable;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryEntry;
import net.minecraft.world.gen.ProbabilityConfig;
import net.minecraft.world.gen.blockpredicate.BlockPredicate;
import net.minecraft.world.gen.feature.*;
@@ -23,6 +20,8 @@ import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
import java.util.List;
import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.register;
public class MiscFeatures {
public static List<PlacementModifier> placementModifiers = List.of(RarityFilterPlacementModifier.of(1),
SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of());
@@ -44,26 +43,24 @@ public class MiscFeatures {
public static ConfiguredFeature<?, ?> UNDERWATER_SEASHELL_FEATURE = new ConfiguredFeature<>(FeatureRegistry.UNDERWATER_SEASHELL_FEATURE, new ProbabilityConfig(1));
public static ConfiguredFeature<?, ?> SNOWY_GEYSER_FEATURE = new ConfiguredFeature<>(FeatureRegistry.SNOWY_GEYSER_FEATURE, new ProbabilityConfig(1));
public static PlacedFeature SEASHELL_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SEASHELL_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.seashell_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE))))));
public static PlacedFeature STARFISH_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(STARFISH_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.starfish_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE))))));
public static PlacedFeature UNDERWATER_SEASHELL_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(UNDERWATER_SEASHELL_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.underwater_seashell_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()));
public static PlacedFeature UNDERWATER_STARFISH_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(UNDERWATER_STARFISH_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.underwater_starfish_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()));
public static PlacedFeature SNOWY_GEYSER_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SNOWY_GEYSER_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.geyser_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()));
public static PlacedFeature SEASHELL_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SEASHELL_FEATURE), List.of(CountPlacementModifier.of(1), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE))))));
public static PlacedFeature STARFISH_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(STARFISH_FEATURE), List.of(CountPlacementModifier.of(1), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE))))));
public static PlacedFeature UNDERWATER_SEASHELL_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(UNDERWATER_SEASHELL_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()));
public static PlacedFeature UNDERWATER_STARFISH_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(UNDERWATER_STARFISH_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()));
public static PlacedFeature SNOWY_GEYSER_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SNOWY_GEYSER_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()));
public static void init() {
Registry<ConfiguredFeature<?, ?>> registry = BuiltinRegistries.CONFIGURED_FEATURE;
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "seashell"), SEASHELL_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "starfish"), STARFISH_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "underwater_starfish"), UNDERWATER_STARFISH_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "underwater_seashell"), UNDERWATER_SEASHELL_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "snowy_geyser"), SNOWY_GEYSER_FEATURE);
Registry<PlacedFeature> placedRegistry = BuiltinRegistries.PLACED_FEATURE;
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "seashell"), SEASHELL_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "starfish"), STARFISH_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "underwater_seashell"), UNDERWATER_SEASHELL_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "underwater_starfish"), UNDERWATER_STARFISH_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "snowy_geyser"),SNOWY_GEYSER_PLACED_FEATURE);
public static void initConfigured(Registerable<ConfiguredFeature<?, ?>> context) {
register(context, "seashell", SEASHELL_FEATURE);
register(context, "starfish", STARFISH_FEATURE);
register(context, "underwater_seashell", UNDERWATER_SEASHELL_FEATURE);
register(context, "underwater_starfish", UNDERWATER_STARFISH_FEATURE);
register(context, "snowy_geyser", SNOWY_GEYSER_FEATURE);
}
public static void initPlaced(Registerable<PlacedFeature> context) {
register(context, "seashell", SEASHELL_PLACED_FEATURE);
register(context, "starfish", STARFISH_PLACED_FEATURE);
register(context, "underwater_seashell", UNDERWATER_SEASHELL_PLACED_FEATURE);
register(context, "underwater_starfish", UNDERWATER_STARFISH_PLACED_FEATURE);
register(context, "snowy_geyser", SNOWY_GEYSER_PLACED_FEATURE);
}
}

View File

@@ -7,13 +7,10 @@ import eu.midnightdust.motschen.rocks.blockstates.StickVariation;
import eu.midnightdust.motschen.rocks.config.RocksConfig;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.Identifier;
import net.minecraft.registry.Registerable;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryEntry;
import net.minecraft.world.gen.blockpredicate.BlockPredicate;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placementmodifier.*;
@@ -21,6 +18,8 @@ import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
import java.util.List;
import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.register;
public class NetherFeatures {
public static ConfiguredFeature<?, ?> NETHERRACK_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
@@ -60,29 +59,27 @@ public class NetherFeatures {
.add(RocksMain.CrimsonStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))
);
public static PlacedFeature NETHERRACK_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHERRACK_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.netherrack_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate .bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.NETHERRACK,Blocks.WARPED_NYLIUM,Blocks.CRIMSON_NYLIUM))))));
public static PlacedFeature SOUL_SOIL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SOUL_SOIL_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.soul_soil_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.SOUL_SOIL,Blocks.SOUL_SAND))))));
public static PlacedFeature NETHER_GRAVEL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHER_GRAVEL_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.gravel_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRAVEL))))));
public static PlacedFeature NETHER_GEYSER_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHER_GEYSER_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.nether_geyser_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.NETHERRACK))))));
public static PlacedFeature WARPED_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(WARPED_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.warped_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.WARPED_NYLIUM))))));
public static PlacedFeature CRIMSON_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(CRIMSON_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.crimson_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.CRIMSON_NYLIUM))))));
public static PlacedFeature NETHERRACK_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHERRACK_ROCK_FEATURE), List.of(CountPlacementModifier.of(90), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate .bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.NETHERRACK,Blocks.WARPED_NYLIUM,Blocks.CRIMSON_NYLIUM))))));
public static PlacedFeature SOUL_SOIL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SOUL_SOIL_ROCK_FEATURE), List.of(CountPlacementModifier.of(60), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.SOUL_SOIL,Blocks.SOUL_SAND))))));
public static PlacedFeature NETHER_GRAVEL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHER_GRAVEL_ROCK_FEATURE), List.of(CountPlacementModifier.of(30), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRAVEL))))));
public static PlacedFeature NETHER_GEYSER_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHER_GEYSER_FEATURE), List.of(CountPlacementModifier.of(15), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.NETHERRACK))))));
public static PlacedFeature WARPED_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(WARPED_STICK_FEATURE), List.of(CountPlacementModifier.of(90), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.WARPED_NYLIUM))))));
public static PlacedFeature CRIMSON_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(CRIMSON_STICK_FEATURE), List.of(CountPlacementModifier.of(90), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.CRIMSON_NYLIUM))))));
public static void init() {
Registry<ConfiguredFeature<?, ?>> registry = BuiltinRegistries.CONFIGURED_FEATURE;
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "netherrack_rock"), NETHERRACK_ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "soul_soil_rock"), SOUL_SOIL_ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "nether_gravel_rock"), NETHER_GRAVEL_ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "nether_geyser"), NETHER_GEYSER_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "warped_stick"), WARPED_STICK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "crimson_stick"), CRIMSON_STICK_FEATURE);
Registry<PlacedFeature> placedRegistry = BuiltinRegistries.PLACED_FEATURE;
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "netherrack_rock"), NETHERRACK_ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "soul_soil_rock"), SOUL_SOIL_ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "nether_gravel_rock"), NETHER_GRAVEL_ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "nether_geyser"), NETHER_GEYSER_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "warped_stick"), WARPED_STICK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "crimson_stick"), CRIMSON_STICK_PLACED_FEATURE);
public static void initConfigured(Registerable<ConfiguredFeature<?, ?>> context) {
register(context, "netherrack_rock", NETHERRACK_ROCK_FEATURE);
register(context, "soul_soil_rock", SOUL_SOIL_ROCK_FEATURE);
register(context, "nether_gravel_rock", NETHER_GRAVEL_ROCK_FEATURE);
register(context, "nether_geyser", NETHER_GEYSER_FEATURE);
register(context, "warped_stick", WARPED_STICK_FEATURE);
register(context, "crimson_stick", CRIMSON_STICK_FEATURE);
}
public static void initPlaced(Registerable<PlacedFeature> context) {
register(context, "netherrack_rock", NETHERRACK_ROCK_PLACED_FEATURE);
register(context, "soul_soil_rock", SOUL_SOIL_ROCK_PLACED_FEATURE);
register(context, "nether_gravel_rock", NETHER_GRAVEL_ROCK_PLACED_FEATURE);
register(context, "nether_geyser", NETHER_GEYSER_PLACED_FEATURE);
register(context, "warped_stick", WARPED_STICK_PLACED_FEATURE);
register(context, "crimson_stick", CRIMSON_STICK_PLACED_FEATURE);
}
}

View File

@@ -6,13 +6,10 @@ import eu.midnightdust.motschen.rocks.blockstates.RockVariation;
import eu.midnightdust.motschen.rocks.config.RocksConfig;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.Identifier;
import net.minecraft.registry.*;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryEntry;
import net.minecraft.world.gen.blockpredicate.BlockPredicate;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placementmodifier.*;
@@ -20,6 +17,8 @@ import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
import java.util.List;
import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.register;
public class RockFeatures {
public static ConfiguredFeature<?, ?> ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
@@ -78,35 +77,33 @@ public class RockFeatures {
.add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))
);
public static PlacedFeature ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.not(BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.ICE,Blocks.SAND,Blocks.RED_SAND,Blocks.END_STONE)))))));
public static PlacedFeature GRANITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(GRANITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.granite_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRANITE))))));
public static PlacedFeature DIORITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(DIORITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.diorite_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.DIORITE))))));
public static PlacedFeature ANDESITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ANDESITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.andesite_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.ANDESITE))))));
public static PlacedFeature SAND_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SAND_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.sand_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE))))));
public static PlacedFeature RED_SAND_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(RED_SAND_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.red_sand_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.RED_SAND, Blocks.RED_SANDSTONE))))));
public static PlacedFeature END_STONE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(END_STONE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.end_stone_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.END_STONE))))));
public static PlacedFeature GRAVEL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(GRAVEL_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.gravel_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRAVEL))))));
public static PlacedFeature ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ROCK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.not(BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.ICE,Blocks.SAND,Blocks.RED_SAND,Blocks.END_STONE)))))));
public static PlacedFeature GRANITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(GRANITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRANITE))))));
public static PlacedFeature DIORITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(DIORITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.DIORITE))))));
public static PlacedFeature ANDESITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ANDESITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.ANDESITE))))));
public static PlacedFeature SAND_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SAND_ROCK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE))))));
public static PlacedFeature RED_SAND_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(RED_SAND_ROCK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.RED_SAND, Blocks.RED_SANDSTONE))))));
public static PlacedFeature END_STONE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(END_STONE_ROCK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.END_STONE))))));
public static PlacedFeature GRAVEL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(GRAVEL_ROCK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRAVEL))))));
public static void init() {
Registry<ConfiguredFeature<?, ?>> registry = BuiltinRegistries.CONFIGURED_FEATURE;
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "rock"), ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "granite_rock"), GRANITE_ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "diorite_rock"), DIORITE_ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "andesite_rock"), ANDESITE_ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "sand_rock"), SAND_ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "red_sand_rock"), RED_SAND_ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "endstone_rock"), END_STONE_ROCK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "gravel_rock"), GRAVEL_ROCK_FEATURE);
Registry<PlacedFeature> placedRegistry = BuiltinRegistries.PLACED_FEATURE;
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "rock"), ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "granite_rock"), GRANITE_ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "diorite_rock"), DIORITE_ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "andesite_rock"), ANDESITE_ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "sand_rock"), SAND_ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "red_sand_rock"), RED_SAND_ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "endstone_rock"), END_STONE_ROCK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "gravel_rock"), GRAVEL_ROCK_PLACED_FEATURE);
public static void initConfigured(Registerable<ConfiguredFeature<?, ?>> context) {
register(context, "rock", ROCK_FEATURE);
register(context, "granite_rock", GRANITE_ROCK_FEATURE);
register(context, "diorite_rock", DIORITE_ROCK_FEATURE);
register(context, "andesite_rock", ANDESITE_ROCK_FEATURE);
register(context, "sand_rock", SAND_ROCK_FEATURE);
register(context, "red_sand_rock", RED_SAND_ROCK_FEATURE);
register(context, "end_stone_rock", END_STONE_ROCK_FEATURE);
register(context, "gravel_rock", GRAVEL_ROCK_FEATURE);
}
public static void initPlaced(Registerable<PlacedFeature> context) {
register(context, "rock", ROCK_PLACED_FEATURE);
register(context, "granite_rock", GRANITE_ROCK_PLACED_FEATURE);
register(context, "diorite_rock", DIORITE_ROCK_PLACED_FEATURE);
register(context, "andesite_rock", ANDESITE_ROCK_PLACED_FEATURE);
register(context, "sand_rock", SAND_ROCK_PLACED_FEATURE);
register(context, "red_sand_rock", RED_SAND_ROCK_PLACED_FEATURE);
register(context, "end_stone_rock", END_STONE_ROCK_PLACED_FEATURE);
register(context, "gravel_rock", GRAVEL_ROCK_PLACED_FEATURE);
}
}

View File

@@ -6,13 +6,10 @@ import eu.midnightdust.motschen.rocks.blockstates.StickVariation;
import eu.midnightdust.motschen.rocks.config.RocksConfig;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.Identifier;
import net.minecraft.registry.Registerable;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.util.collection.DataPool;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.RegistryEntry;
import net.minecraft.world.gen.blockpredicate.BlockPredicate;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placementmodifier.*;
@@ -20,6 +17,8 @@ import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider;
import java.util.List;
import static eu.midnightdust.motschen.rocks.RocksRegistryUtils.register;
public class StickFeatures {
public static ConfiguredFeature<?, ?> OAK_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(
new WeightedBlockStateProvider(DataPool.<BlockState>builder()
@@ -59,29 +58,27 @@ public class StickFeatures {
.add(RocksMain.DarkOakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))
);
public static PlacedFeature OAK_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(OAK_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.oak_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature SPRUCE_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SPRUCE_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.spruce_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature BIRCH_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(BIRCH_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.birch_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature ACACIA_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ACACIA_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.acacia_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature JUNGLE_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(JUNGLE_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.jungle_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature DARK_OAK_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(DARK_OAK_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.dark_oak_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature OAK_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(OAK_STICK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature SPRUCE_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SPRUCE_STICK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature BIRCH_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(BIRCH_STICK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature ACACIA_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ACACIA_STICK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature JUNGLE_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(JUNGLE_STICK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static PlacedFeature DARK_OAK_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(DARK_OAK_STICK_FEATURE), List.of(CountPlacementModifier.of(3), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(new Vec3i(0, -1, 0), ImmutableList.of(Blocks.GRASS_BLOCK))))));
public static void init() {
Registry<ConfiguredFeature<?, ?>> registry = BuiltinRegistries.CONFIGURED_FEATURE;
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "oak_stick"), OAK_STICK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "spruce_stick"), SPRUCE_STICK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "birch_stick"), BIRCH_STICK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "acacia_stick"), ACACIA_STICK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "jungle_stick"), JUNGLE_STICK_FEATURE);
Registry.register(registry, new Identifier(RocksMain.MOD_ID, "dark_oak_stick"), DARK_OAK_STICK_FEATURE);
Registry<PlacedFeature> placedRegistry = BuiltinRegistries.PLACED_FEATURE;
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "oak_stick"), OAK_STICK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "spruce_stick"), SPRUCE_STICK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "birch_stick"), BIRCH_STICK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "acacia_stick"), ACACIA_STICK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "jungle_stick"), JUNGLE_STICK_PLACED_FEATURE);
Registry.register(placedRegistry, new Identifier(RocksMain.MOD_ID, "dark_oak_stick"), DARK_OAK_STICK_PLACED_FEATURE);
public static void initConfigured(Registerable<ConfiguredFeature<?, ?>> context) {
register(context, "oak_stick", OAK_STICK_FEATURE);
register(context, "spruce_stick", SPRUCE_STICK_FEATURE);
register(context, "birch_stick", BIRCH_STICK_FEATURE);
register(context, "acacia_stick", ACACIA_STICK_FEATURE);
register(context, "jungle_stick", JUNGLE_STICK_FEATURE);
register(context, "dark_oak_stick", DARK_OAK_STICK_FEATURE);
}
public static void initPlaced(Registerable<PlacedFeature> context) {
register(context, "oak_stick", OAK_STICK_PLACED_FEATURE);
register(context, "spruce_stick", SPRUCE_STICK_PLACED_FEATURE);
register(context, "birch_stick", BIRCH_STICK_PLACED_FEATURE);
register(context, "acacia_stick", ACACIA_STICK_PLACED_FEATURE);
register(context, "jungle_stick", JUNGLE_STICK_PLACED_FEATURE);
register(context, "dark_oak_stick", DARK_OAK_STICK_PLACED_FEATURE);
}
}

View File

@@ -35,7 +35,7 @@ public class SnowFeature extends Feature<ProbabilityConfig> {
if (structureWorldAccess.getBlockState(blockPos2).isOf(Blocks.SNOW) && chance == 1) {
BlockState blockState = weightedBlockStateProvider1.getBlockState(random,blockPos);
BlockState blockState = weightedBlockStateProvider1.get(random,blockPos);
if (blockState.canPlaceAt(structureWorldAccess, blockPos2)) {
structureWorldAccess.setBlockState(blockPos2, blockState, 1);

View File

@@ -32,7 +32,7 @@ public class UnderwaterFeature extends Feature<ProbabilityConfig> {
if (structureWorldAccess.getBlockState(blockPos2).isOf(Blocks.WATER)) {
BlockState blockState = weightedBlockStateProvider1.getBlockState(random,blockPos);
BlockState blockState = weightedBlockStateProvider1.get(random,blockPos);
if (blockState.canPlaceAt(structureWorldAccess, blockPos2)) {
structureWorldAccess.setBlockState(blockPos2, blockState, 2);

View File

@@ -39,10 +39,15 @@
"item.rocks.soul_soil_splitter":"Seelenerdesplitter",
"rocks.midnightconfig.title": "This Rocks! Konfiguration",
"rocks.midnightconfig.category.rocks":"Steine",
"rocks.midnightconfig.category.sticks":"Stöcke",
"rocks.midnightconfig.category.misc":"Sonstiges",
"rocks.midnightconfig.needs_restart": "§cStarte das Spiel neu, nachdem du Änderungen vorgenommen hast!",
"rocks.midnightconfig.needs_restart1": "§cStarte das Spiel neu, nachdem du Änderungen vorgenommen hast!",
"rocks.midnightconfig.needs_restart2": "§cStarte das Spiel neu, nachdem du Änderungen vorgenommen hast!",
"rocks.midnightconfig.rocks": "§aBrocken",
"rocks.midnightconfig.sticks": "§aStöcke",
"rocks.midnightconfig.misc": "§aWeiteres",
"rocks.midnightconfig.underwater_seashell_count": "Unterwassermuschel",
"rocks.midnightconfig.underwater_starfish_count": "Unterwasserseestern"
"rocks.midnightconfig.underwater_seashell": "Unterwassermuschel",
"rocks.midnightconfig.underwater_starfish": "Unterwasserseestern"
}

View File

@@ -39,10 +39,15 @@
"item.rocks.soul_soil_splitter":"Soul Soil Splitter",
"rocks.midnightconfig.title":"This Rocks! Config",
"rocks.midnightconfig.category.rocks":"Rocks",
"rocks.midnightconfig.category.sticks":"Sticks",
"rocks.midnightconfig.category.misc":"Miscellaneous",
"rocks.midnightconfig.needs_restart":"§cRestart game after changing config!",
"rocks.midnightconfig.needs_restart1":"§cRestart game after changing config!",
"rocks.midnightconfig.needs_restart2":"§cRestart game after changing config!",
"rocks.midnightconfig.rocks":"§aRock Spawn Count",
"rocks.midnightconfig.sticks":"§aStick Spawn Count",
"rocks.midnightconfig.misc":"§aMiscellaneous Spawn Count",
"rocks.midnightconfig.underwater_seashell_count":"Underwater Seashell",
"rocks.midnightconfig.underwater_starfish_count":"Underwater Starfish"
"rocks.midnightconfig.underwater_seashell":"Underwater Seashell",
"rocks.midnightconfig.underwater_starfish":"Underwater Starfish"
}

View File

@@ -40,9 +40,11 @@
"rocks.midnightconfig.title":"This Rocks! Настройки",
"rocks.midnightconfig.needs_restart":"§c Перезапустить игру после изменения конфигурации!",
"rocks.midnightconfig.needs_restart1":"§c Перезапустить игру после изменения конфигурации!",
"rocks.midnightconfig.needs_restart2":"§c Перезапустить игру после изменения конфигурации!",
"rocks.midnightconfig.rocks":"§aГорные породы",
"rocks.midnightconfig.sticks":"§aПалочки",
"rocks.midnightconfig.misc":"§aРазнообразие",
"rocks.midnightconfig.underwater_seashell_count":"Подводная морская раковина",
"rocks.midnightconfig.underwater_starfish_count":"Подводная морская звезда"
"rocks.midnightconfig.underwater_seashell":"Подводная морская раковина",
"rocks.midnightconfig.underwater_starfish":"Подводная морская звезда"
}

View File

@@ -24,6 +24,9 @@
],
"client": [
"eu.midnightdust.motschen.rocks.RocksClient"
],
"fabric-datagen": [
"eu.midnightdust.motschen.rocks.RocksDataGen"
]
},