generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
0a71564
commit 8491814
Showing
18 changed files
with
258 additions
and
8 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/main/generated/.cache/130e22669e8a615864dab95e7f6486375d972043
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
2 changes: 1 addition & 1 deletion
2
src/main/generated/.cache/517b32aa3b70974ceff8833c3e0d8067fc37e319
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
2 changes: 1 addition & 1 deletion
2
src/main/generated/.cache/65bfa0da695c72a1ede5f07ea05a47f7fb8fdb51
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// 1.20.4 2024-02-05T16:01:54.5231981 Titanium/Tags for minecraft:block | ||
// 1.20.4 2024-02-05T17:06:17.0866939 Titanium/Tags for minecraft:block | ||
40a22829dc45910fc144676bb4bd94f2ed21c46b data\minecraft\tags\blocks\mineable\pickaxe.json | ||
40a22829dc45910fc144676bb4bd94f2ed21c46b data\minecraft\tags\blocks\needs_iron_tool.json |
5 changes: 5 additions & 0 deletions
5
src/main/generated/.cache/9da30a99369c7e8c68716a98fd12271ee4da4d59
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,5 @@ | ||
// 1.20.4 2024-02-05T17:06:17.0896883 Titanium/World Gen | ||
31a3c735f941c808dd8915d27e9f8340a70c606b data\titanium\worldgen\configured_feature\titanium_ore.json | ||
8d75cadfd54d93e9504231ada137c960200b7ac0 data\titanium\worldgen\configured_feature\end_titanium_ore.json | ||
3d92d749954790a861e3fc4d734a5617fa7d030a data\titanium\worldgen\placed_feature\titanium_ore_placed.json | ||
f25520097b6003fd5b7be640fa98068bfeae03c2 data\titanium\worldgen\placed_feature\end_titanium_ore_placed.json |
4 changes: 2 additions & 2 deletions
4
src/main/generated/.cache/ed130a9d2fc861ab1cf43e733b1c2beffb974a94
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
4 changes: 2 additions & 2 deletions
4
src/main/generated/.cache/fc0e456a828b0d3ff0de7c436f29639954b07e94
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// 1.20.4 2024-02-05T16:01:54.5041484 Titanium/Tags for minecraft:item | ||
// 1.20.4 2024-02-05T17:06:17.0700409 Titanium/Tags for minecraft:item | ||
2a186cdc91b83a46ade5894dc10cd043cef0c7cc data\fabric\tags\items\swords.json | ||
89b0efee69794169293c204cbbf104952bcc8544 data\fabric\tags\items\shovels.json | ||
758fc896a1c5fb6a5ca958cef5066c539ebc193f data\fabric\tags\items\axes.json | ||
89b0efee69794169293c204cbbf104952bcc8544 data\fabric\tags\items\shovels.json | ||
49490c758ba9aaee94e1f6192fc4a2eb56bde4d8 data\fabric\tags\items\hoes.json | ||
ab93c62885c7a9aaf84f8aa8c17a2530ea0dd93e data\fabric\tags\items\pickaxes.json |
18 changes: 18 additions & 0 deletions
18
src/main/generated/data/titanium/worldgen/configured_feature/end_titanium_ore.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,18 @@ | ||
{ | ||
"type": "minecraft:ore", | ||
"config": { | ||
"discard_chance_on_air_exposure": 0.0, | ||
"size": 12, | ||
"targets": [ | ||
{ | ||
"state": { | ||
"Name": "titanium:end_titanium_ore" | ||
}, | ||
"target": { | ||
"block": "minecraft:end_stone", | ||
"predicate_type": "minecraft:block_match" | ||
} | ||
} | ||
] | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/generated/data/titanium/worldgen/configured_feature/titanium_ore.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,27 @@ | ||
{ | ||
"type": "minecraft:ore", | ||
"config": { | ||
"discard_chance_on_air_exposure": 0.0, | ||
"size": 12, | ||
"targets": [ | ||
{ | ||
"state": { | ||
"Name": "titanium:titanium_ore" | ||
}, | ||
"target": { | ||
"predicate_type": "minecraft:tag_match", | ||
"tag": "minecraft:stone_ore_replaceables" | ||
} | ||
}, | ||
{ | ||
"state": { | ||
"Name": "titanium:deepslate_titanium_ore" | ||
}, | ||
"target": { | ||
"predicate_type": "minecraft:tag_match", | ||
"tag": "minecraft:deepslate_ore_replaceables" | ||
} | ||
} | ||
] | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/generated/data/titanium/worldgen/placed_feature/end_titanium_ore_placed.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,27 @@ | ||
{ | ||
"feature": "titanium:end_titanium_ore", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:count", | ||
"count": 8 | ||
}, | ||
{ | ||
"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" | ||
} | ||
] | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/generated/data/titanium/worldgen/placed_feature/titanium_ore_placed.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,27 @@ | ||
{ | ||
"feature": "titanium:titanium_ore", | ||
"placement": [ | ||
{ | ||
"type": "minecraft:count", | ||
"count": 4 | ||
}, | ||
{ | ||
"type": "minecraft:in_square" | ||
}, | ||
{ | ||
"type": "minecraft:height_range", | ||
"height": { | ||
"type": "minecraft:uniform", | ||
"max_inclusive": { | ||
"absolute": 20 | ||
}, | ||
"min_inclusive": { | ||
"above_bottom": 0 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "minecraft:biome" | ||
} | ||
] | ||
} |
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
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
25 changes: 25 additions & 0 deletions
25
src/main/java/com/atom596/titanium/datagen/TitaniumWorldGenerator.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,25 @@ | ||
package com.atom596.titanium.datagen; | ||
|
||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; | ||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricDynamicRegistryProvider; | ||
import net.minecraft.registry.RegistryKeys; | ||
import net.minecraft.registry.RegistryWrapper; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class TitaniumWorldGenerator extends FabricDynamicRegistryProvider { | ||
public TitaniumWorldGenerator(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) { | ||
super(output, registriesFuture); | ||
} | ||
|
||
@Override | ||
protected void configure(RegistryWrapper.WrapperLookup registries, Entries entries) { | ||
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.CONFIGURED_FEATURE)); | ||
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.PLACED_FEATURE)); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "World Gen"; | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
src/main/java/com/atom596/titanium/world/TitaniumOrePlacement.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,19 @@ | ||
package com.atom596.titanium.world; | ||
|
||
import net.minecraft.world.gen.placementmodifier.*; | ||
|
||
import java.util.List; | ||
|
||
public class TitaniumOrePlacement { | ||
public static List<PlacementModifier> modifiers(PlacementModifier countModifier, PlacementModifier heightModifier) { | ||
return List.of(countModifier, SquarePlacementModifier.of(), heightModifier, BiomePlacementModifier.of()); | ||
} | ||
|
||
public static List<PlacementModifier> modifiersWithCount(int count, PlacementModifier heightModifier) { | ||
return modifiers(CountPlacementModifier.of(count), heightModifier); | ||
} | ||
|
||
public static List<PlacementModifier> modifiersWithRarity(int chance, PlacementModifier heightModifier) { | ||
return modifiers(RarityFilterPlacementModifier.of(chance), heightModifier); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/com/atom596/titanium/world/TitaniumPlacedFeatures.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,38 @@ | ||
package com.atom596.titanium.world; | ||
|
||
import com.atom596.titanium.Titanium; | ||
import net.minecraft.registry.Registerable; | ||
import net.minecraft.registry.RegistryKey; | ||
import net.minecraft.registry.RegistryKeys; | ||
import net.minecraft.registry.entry.RegistryEntry; | ||
import net.minecraft.util.Identifier; | ||
import net.minecraft.world.gen.YOffset; | ||
import net.minecraft.world.gen.feature.ConfiguredFeature; | ||
import net.minecraft.world.gen.feature.PlacedFeature; | ||
import net.minecraft.world.gen.placementmodifier.HeightRangePlacementModifier; | ||
import net.minecraft.world.gen.placementmodifier.PlacementModifier; | ||
|
||
import java.util.List; | ||
|
||
public class TitaniumPlacedFeatures { | ||
public static final RegistryKey<PlacedFeature> TITANIUM_ORE_PLACED_KEY = registerKey("titanium_ore_placed"); | ||
public static final RegistryKey<PlacedFeature> END_TITANIUM_ORE_PLACED_KEY = registerKey("end_titanium_ore_placed"); | ||
|
||
public static void bootstrap(Registerable<PlacedFeature> context) { | ||
var configuredFeatureRegistryEntryLookup = context.getRegistryLookup(RegistryKeys.CONFIGURED_FEATURE); | ||
|
||
register(context, TITANIUM_ORE_PLACED_KEY, configuredFeatureRegistryEntryLookup.getOrThrow(TitaniumConfiguredFeatures.TITANIUM_ORE_KEY), | ||
TitaniumOrePlacement.modifiersWithCount(4, HeightRangePlacementModifier.uniform(YOffset.BOTTOM, YOffset.fixed(20)))); | ||
register(context, END_TITANIUM_ORE_PLACED_KEY, configuredFeatureRegistryEntryLookup.getOrThrow(TitaniumConfiguredFeatures.END_TITANIUM_ORE_KEY), | ||
TitaniumOrePlacement.modifiersWithCount(16, HeightRangePlacementModifier.uniform(YOffset.BOTTOM, YOffset.TOP))); | ||
} | ||
|
||
public static RegistryKey<PlacedFeature> registerKey(String name) { | ||
return RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier(Titanium.MOD_ID, name)); | ||
} | ||
|
||
private static void register(Registerable<PlacedFeature> context, RegistryKey<PlacedFeature> key, RegistryEntry<ConfiguredFeature<?, ?>> configuration, | ||
List<PlacementModifier> modifiers) { | ||
context.register(key, new PlacedFeature(configuration, List.copyOf(modifiers))); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/atom596/titanium/world/gen/TitaniumOreGeneration.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,15 @@ | ||
package com.atom596.titanium.world.gen; | ||
|
||
import com.atom596.titanium.world.TitaniumPlacedFeatures; | ||
import net.fabricmc.fabric.api.biome.v1.BiomeModifications; | ||
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors; | ||
import net.minecraft.world.gen.GenerationStep; | ||
|
||
public class TitaniumOreGeneration { | ||
public static void generateOres() { | ||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), | ||
GenerationStep.Feature.UNDERGROUND_ORES, TitaniumPlacedFeatures.TITANIUM_ORE_PLACED_KEY); | ||
BiomeModifications.addFeature(BiomeSelectors.foundInTheEnd(), | ||
GenerationStep.Feature.UNDERGROUND_ORES, TitaniumPlacedFeatures.END_TITANIUM_ORE_PLACED_KEY); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/com/atom596/titanium/world/gen/TitaniumWorldGeneration.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,7 @@ | ||
package com.atom596.titanium.world.gen; | ||
|
||
public class TitaniumWorldGeneration { | ||
public static void generateModWorldGen() { | ||
TitaniumOreGeneration.generateOres(); | ||
} | ||
} |