generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
310 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/dev/sterner/culturaldelights/common/registry/CDConfiguredFeatures.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package dev.sterner.culturaldelights.common.registry; | ||
|
||
import dev.sterner.culturaldelights.CulturalDelights; | ||
import net.minecraft.registry.RegistryKey; | ||
import net.minecraft.registry.RegistryKeys; | ||
import net.minecraft.util.Identifier; | ||
import net.minecraft.world.gen.feature.ConfiguredFeature; | ||
import net.minecraft.world.gen.feature.FeatureConfig; | ||
import net.minecraft.world.gen.feature.PlacedFeature; | ||
|
||
public enum CDConfiguredFeatures { | ||
PATCH_WILD_CORN("patch_wild_corn"), | ||
PATCH_WILD_CUCUMBERS("patch_wild_cucumbers"), | ||
PATCH_WILD_EGGPLANTS("patch_wild_eggplants"); | ||
|
||
private final Identifier featureIdentifier; | ||
private RegistryKey<ConfiguredFeature<?, ?>> configuredFeatureRegistryKey; | ||
private RegistryKey<PlacedFeature> featureRegistryKey; | ||
|
||
CDConfiguredFeatures(String featurePathName) { | ||
this.featureIdentifier = new Identifier(CulturalDelights.MOD_ID, featurePathName); | ||
} | ||
|
||
public static void registerAll() { | ||
for (CDConfiguredFeatures value : values()) { | ||
value.configuredFeatureRegistryKey = RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, value.featureIdentifier); | ||
value.featureRegistryKey = RegistryKey.of(RegistryKeys.PLACED_FEATURE, value.featureIdentifier); | ||
} | ||
} | ||
|
||
public RegistryKey<ConfiguredFeature<? extends FeatureConfig, ?>> configKey() { | ||
return configuredFeatureRegistryKey; | ||
} | ||
|
||
public RegistryKey<PlacedFeature> key() { | ||
return featureRegistryKey; | ||
} | ||
|
||
public Identifier identifier() { | ||
return featureIdentifier; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
src/main/resources/data/culturaldelights/worldgen/configured_feature/patch_wild_corn.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"type": "farmersdelight:wild_crop", | ||
"config": { | ||
"primary_feature": { | ||
"feature": { | ||
"type": "minecraft:simple_block", | ||
"config": { | ||
"to_place": { | ||
"type": "minecraft:simple_state_provider", | ||
"state": { | ||
"Name": "culturaldelights:wild_corn" | ||
} | ||
} | ||
} | ||
}, | ||
"placement": [ | ||
{ | ||
"type": "minecraft:block_predicate_filter", | ||
"predicate": { | ||
"type": "minecraft:all_of", | ||
"predicates": [ | ||
{ | ||
"type": "minecraft:matching_blocks", | ||
"blocks": "minecraft:air" | ||
}, | ||
{ | ||
"type": "minecraft:matching_block_tag", | ||
"tag": "minecraft:dirt", | ||
"offset": [ | ||
0, | ||
-1, | ||
0 | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"secondary_feature": { | ||
"feature": { | ||
"type": "minecraft:simple_block", | ||
"config": { | ||
"to_place": { | ||
"type": "minecraft:simple_state_provider", | ||
"state": { | ||
"Name": "minecraft:air" | ||
} | ||
} | ||
} | ||
}, | ||
"placement": [ | ||
{ | ||
"type": "minecraft:block_predicate_filter", | ||
"predicate": { | ||
"type": "minecraft:all_of", | ||
"predicates": [ | ||
{ | ||
"type": "minecraft:matching_blocks", | ||
"blocks": "minecraft:air" | ||
}, | ||
{ | ||
"type": "minecraft:matching_block_tag", | ||
"tag": "minecraft:dirt", | ||
"offset": [ | ||
0, | ||
-1, | ||
0 | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"tries": 32, | ||
"xz_spread": 6, | ||
"y_spread": 3 | ||
} | ||
} |
80 changes: 80 additions & 0 deletions
80
...ain/resources/data/culturaldelights/worldgen/configured_feature/patch_wild_cucumbers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"type": "farmersdelight:wild_crop", | ||
"config": { | ||
"primary_feature": { | ||
"feature": { | ||
"type": "minecraft:simple_block", | ||
"config": { | ||
"to_place": { | ||
"type": "minecraft:simple_state_provider", | ||
"state": { | ||
"Name": "culturaldelights:wild_cucumbers" | ||
} | ||
} | ||
} | ||
}, | ||
"placement": [ | ||
{ | ||
"type": "minecraft:block_predicate_filter", | ||
"predicate": { | ||
"type": "minecraft:all_of", | ||
"predicates": [ | ||
{ | ||
"type": "minecraft:matching_blocks", | ||
"blocks": "minecraft:air" | ||
}, | ||
{ | ||
"type": "minecraft:matching_block_tag", | ||
"tag": "minecraft:dirt", | ||
"offset": [ | ||
0, | ||
-1, | ||
0 | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"secondary_feature": { | ||
"feature": { | ||
"type": "minecraft:simple_block", | ||
"config": { | ||
"to_place": { | ||
"type": "minecraft:simple_state_provider", | ||
"state": { | ||
"Name": "minecraft:air" | ||
} | ||
} | ||
} | ||
}, | ||
"placement": [ | ||
{ | ||
"type": "minecraft:block_predicate_filter", | ||
"predicate": { | ||
"type": "minecraft:all_of", | ||
"predicates": [ | ||
{ | ||
"type": "minecraft:matching_blocks", | ||
"blocks": "minecraft:air" | ||
}, | ||
{ | ||
"type": "minecraft:matching_block_tag", | ||
"tag": "minecraft:dirt", | ||
"offset": [ | ||
0, | ||
-1, | ||
0 | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"tries": 32, | ||
"xz_spread": 6, | ||
"y_spread": 3 | ||
} | ||
} |
80 changes: 80 additions & 0 deletions
80
...ain/resources/data/culturaldelights/worldgen/configured_feature/patch_wild_eggplants.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"type": "farmersdelight:wild_crop", | ||
"config": { | ||
"primary_feature": { | ||
"feature": { | ||
"type": "minecraft:simple_block", | ||
"config": { | ||
"to_place": { | ||
"type": "minecraft:simple_state_provider", | ||
"state": { | ||
"Name": "culturaldelights:wild_eggplant" | ||
} | ||
} | ||
} | ||
}, | ||
"placement": [ | ||
{ | ||
"type": "minecraft:block_predicate_filter", | ||
"predicate": { | ||
"type": "minecraft:all_of", | ||
"predicates": [ | ||
{ | ||
"type": "minecraft:matching_blocks", | ||
"blocks": "minecraft:air" | ||
}, | ||
{ | ||
"type": "minecraft:matching_block_tag", | ||
"tag": "minecraft:dirt", | ||
"offset": [ | ||
0, | ||
-1, | ||
0 | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"secondary_feature": { | ||
"feature": { | ||
"type": "minecraft:simple_block", | ||
"config": { | ||
"to_place": { | ||
"type": "minecraft:simple_state_provider", | ||
"state": { | ||
"Name": "minecraft:air" | ||
} | ||
} | ||
} | ||
}, | ||
"placement": [ | ||
{ | ||
"type": "minecraft:block_predicate_filter", | ||
"predicate": { | ||
"type": "minecraft:all_of", | ||
"predicates": [ | ||
{ | ||
"type": "minecraft:matching_blocks", | ||
"blocks": "minecraft:air" | ||
}, | ||
{ | ||
"type": "minecraft:matching_block_tag", | ||
"tag": "minecraft:dirt", | ||
"offset": [ | ||
0, | ||
-1, | ||
0 | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"tries": 32, | ||
"xz_spread": 6, | ||
"y_spread": 3 | ||
} | ||
} |
Oops, something went wrong.