-
-
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
63765e6
commit 997c532
Showing
16 changed files
with
169 additions
and
8 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
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
9 changes: 8 additions & 1 deletion
9
neoforge/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924
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
6 changes: 6 additions & 0 deletions
6
...src/generated/resources/data/temporalsmith/neoforge/biome_modifier/add_aqumarine_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,6 @@ | ||
{ | ||
"type": "neoforge:add_features", | ||
"biomes": "#minecraft:is_overworld", | ||
"features": "temporalsmith:aqumarine_ore", | ||
"step": "underground_ores" | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/generated/resources/data/temporalsmith/neoforge/biome_modifier/add_enderite_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,6 @@ | ||
{ | ||
"type": "neoforge:add_features", | ||
"biomes": "#minecraft:is_end", | ||
"features": "temporalsmith:enderite_ore", | ||
"step": "underground_ores" | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/generated/resources/data/temporalsmith/neoforge/biome_modifier/add_graphite_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,6 @@ | ||
{ | ||
"type": "neoforge:add_features", | ||
"biomes": "#minecraft:is_overworld", | ||
"features": "temporalsmith:graphite_ore", | ||
"step": "underground_ores" | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/generated/resources/data/temporalsmith/neoforge/biome_modifier/add_imperium_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,6 @@ | ||
{ | ||
"type": "neoforge:add_features", | ||
"biomes": "#minecraft:is_overworld", | ||
"features": "temporalsmith:imperium_ore", | ||
"step": "underground_ores" | ||
} |
6 changes: 6 additions & 0 deletions
6
...e/src/generated/resources/data/temporalsmith/neoforge/biome_modifier/add_rainbow_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,6 @@ | ||
{ | ||
"type": "neoforge:add_features", | ||
"biomes": "#minecraft:is_overworld", | ||
"features": "temporalsmith:rainbow_ore", | ||
"step": "underground_ores" | ||
} |
6 changes: 6 additions & 0 deletions
6
...orge/src/generated/resources/data/temporalsmith/neoforge/biome_modifier/add_ruby_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,6 @@ | ||
{ | ||
"type": "neoforge:add_features", | ||
"biomes": "#minecraft:is_overworld", | ||
"features": "temporalsmith:ruby_ore", | ||
"step": "underground_ores" | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/generated/resources/data/temporalsmith/neoforge/biome_modifier/add_sapphire_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,6 @@ | ||
{ | ||
"type": "neoforge:add_features", | ||
"biomes": "#minecraft:is_overworld", | ||
"features": "temporalsmith:sapphire_ore", | ||
"step": "underground_ores" | ||
} |
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
100 changes: 100 additions & 0 deletions
100
...rge/src/main/kotlin/io/github/realyusufismail/temporalsmith/worldgen/ModBiomeModifiers.kt
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,100 @@ | ||
/* | ||
* Copyright 2023 RealYusufIsmail. | ||
* | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* | ||
* you may not use this file except in compliance with the License. | ||
* | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.github.realyusufismail.temporalsmith.worldgen | ||
|
||
import io.github.realyusufismail.temporalsmith.TemporalSmith.TemporalSmith.MOD_ID | ||
import net.minecraft.core.HolderSet | ||
import net.minecraft.core.registries.Registries | ||
import net.minecraft.data.worldgen.BootstapContext | ||
import net.minecraft.resources.ResourceKey | ||
import net.minecraft.resources.ResourceLocation | ||
import net.minecraft.tags.BiomeTags | ||
import net.minecraft.world.level.levelgen.GenerationStep | ||
import net.neoforged.neoforge.common.world.BiomeModifier | ||
import net.neoforged.neoforge.common.world.BiomeModifiers | ||
import net.neoforged.neoforge.registries.NeoForgeRegistries | ||
|
||
object ModBiomeModifiers { | ||
val ADD_RUBY_ORE: ResourceKey<BiomeModifier> = registerKey("add_ruby_ore") | ||
val ADD_SAPPHIRE_ORE: ResourceKey<BiomeModifier> = registerKey("add_sapphire_ore") | ||
val ADD_GRAPHITE_ORE: ResourceKey<BiomeModifier> = registerKey("add_graphite_ore") | ||
val ADD_AQUMARINE_ORE: ResourceKey<BiomeModifier> = registerKey("add_aqumarine_ore") | ||
val ADD_RAINBOW_ORE: ResourceKey<BiomeModifier> = registerKey("add_rainbow_ore") | ||
val ADD_IMPERIUM_ORE: ResourceKey<BiomeModifier> = registerKey("add_imperium_ore") | ||
val ADD_ENDERITE_ORE: ResourceKey<BiomeModifier> = registerKey("add_enderite_ore") | ||
|
||
fun bootStrap(context: BootstapContext<BiomeModifier>) { | ||
val placedFeatures = context.lookup(Registries.PLACED_FEATURE) | ||
val biomes = context.lookup(Registries.BIOME) | ||
|
||
context.register( | ||
ADD_RUBY_ORE, | ||
BiomeModifiers.AddFeaturesBiomeModifier( | ||
biomes.getOrThrow(BiomeTags.IS_OVERWORLD), | ||
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.RUBY_ORE)), | ||
GenerationStep.Decoration.UNDERGROUND_ORES)) | ||
|
||
context.register( | ||
ADD_SAPPHIRE_ORE, | ||
BiomeModifiers.AddFeaturesBiomeModifier( | ||
biomes.getOrThrow(BiomeTags.IS_OVERWORLD), | ||
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.SAPPHIRE_ORE)), | ||
GenerationStep.Decoration.UNDERGROUND_ORES)) | ||
|
||
context.register( | ||
ADD_GRAPHITE_ORE, | ||
BiomeModifiers.AddFeaturesBiomeModifier( | ||
biomes.getOrThrow(BiomeTags.IS_OVERWORLD), | ||
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.GRAPHITE_ORE)), | ||
GenerationStep.Decoration.UNDERGROUND_ORES)) | ||
|
||
context.register( | ||
ADD_AQUMARINE_ORE, | ||
BiomeModifiers.AddFeaturesBiomeModifier( | ||
biomes.getOrThrow(BiomeTags.IS_OVERWORLD), | ||
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.AQUMARINE_ORE)), | ||
GenerationStep.Decoration.UNDERGROUND_ORES)) | ||
|
||
context.register( | ||
ADD_RAINBOW_ORE, | ||
BiomeModifiers.AddFeaturesBiomeModifier( | ||
biomes.getOrThrow(BiomeTags.IS_OVERWORLD), | ||
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.RAINBOW_ORE)), | ||
GenerationStep.Decoration.UNDERGROUND_ORES)) | ||
|
||
context.register( | ||
ADD_IMPERIUM_ORE, | ||
BiomeModifiers.AddFeaturesBiomeModifier( | ||
biomes.getOrThrow(BiomeTags.IS_OVERWORLD), | ||
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.IMPERIUM_ORE)), | ||
GenerationStep.Decoration.UNDERGROUND_ORES)) | ||
|
||
context.register( | ||
ADD_ENDERITE_ORE, | ||
BiomeModifiers.AddFeaturesBiomeModifier( | ||
biomes.getOrThrow(BiomeTags.IS_END), | ||
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.ENDERITE_ORE)), | ||
GenerationStep.Decoration.UNDERGROUND_ORES)) | ||
} | ||
|
||
private fun registerKey(name: String): ResourceKey<BiomeModifier> { | ||
return ResourceKey.create( | ||
NeoForgeRegistries.Keys.BIOME_MODIFIERS, ResourceLocation(MOD_ID, name)) | ||
} | ||
} |
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
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