Skip to content

Commit

Permalink
Make ore generate and fix recipes and lang
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-makes-code committed Jul 13, 2023
1 parent 54d5691 commit cc520e2
Show file tree
Hide file tree
Showing 15 changed files with 108 additions and 32 deletions.
5 changes: 5 additions & 0 deletions data/lang/en_us.fennec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
crystalline_sculk_block = "Crystalline Sculk Block"
reinforced_glass = "Reinforced Glass"
reinforced_glass_pane = "Reinforced Glass Pane"
sculk_resonator = "Resonating Sculk Shrieker"

# Tech
camera = "Camera"
Expand All @@ -20,6 +21,7 @@
# Natural
sculkflower = "Sculkflower"
indigo_caeruleum = "Indigo Caeruleum"
mycelial_sand = "Mycelial Sand"

# Altar
altar_pedestal = "Altar Pedestal"
Expand Down Expand Up @@ -87,6 +89,9 @@
"item.wwizardry" {
crystalline_sculk = "Crystalline Sculk"
rose_quartz = "Rose Quartz"

denia_boat = "Denia Boat"
denia_chest_boat = "Denia Boat with Chest"
}

# Compat
Expand Down
2 changes: 1 addition & 1 deletion data/recipes/sculk_resonator.fennec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bloom = 10
inputs [
{ item = "amethyst_shard" }
{ item = "amethyst_shard" }
{ item = "redstone_dust" }
{ item = "redstone" }
{ item = "wwizardry:crystalline_sculk" }
]

Expand Down
2 changes: 2 additions & 0 deletions data/world/biome/forgotten_fields.fennec
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ features [
"disk_sand"
"disk_clay"
"disk_gravel"

"wwizardry:ore/rose_quartz_biome"
]
[
"sculk_vein"
Expand Down
22 changes: 22 additions & 0 deletions data/world/configured_feature/ore/rose_quartz.fennec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
type = "ore"

config {
discard_chance_on_air_exposure = 0
size = 6
targets [
{
state { Name = "wwizardry:rose_quartz_ore" }
target {
predicate_type = "tag_match"
tag = "stone_ore_replaceables"
}
}
{
state { Name = "wwizardry:deepslate_rose_quartz_ore" }
target {
predicate_type = "tag_match"
tag = "deepslate_ore_replaceables"
}
}
]
}
18 changes: 18 additions & 0 deletions data/world/placed_feature/ore/rose_quartz.fennec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
feature = "wwizardry:ore/rose_quartz"

placement [
{
type = "count"
count = 13
}
{ type = "in_square" }
{
type = "height_range"
height {
type = "trapezoid"
max_inclusive { above_bottom = 96 }
min_inclusive { above_bottom = -16 }
}
}
{ type = "biome" }
]
18 changes: 18 additions & 0 deletions data/world/placed_feature/ore/rose_quartz_biome.fennec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
feature = "wwizardry:ore/rose_quartz"

placement [
{
type = "count"
count = 6
}
{ type = "in_square" }
{
type = "height_range"
height {
type = "trapezoid"
max_inclusive { above_bottom = 128 }
min_inclusive { above_bottom = 0 }
}
}
{ type = "biome" }
]
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true

# Mod Properties
version = 0.1.0-blanketcon
version = 0.1.1-blanketcon
maven_group = dev.sweetberry
archives_base_name = wwizardry

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/dev/sweetberry/wwizardry/WanderingMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import dev.sweetberry.wwizardry.datagen.WanderingDatagen;
import dev.sweetberry.wwizardry.item.WanderingItems;
import dev.sweetberry.wwizardry.recipe.WanderingRecipes;
import dev.sweetberry.wwizardry.world.WanderingWorldgen;
import net.fabricmc.fabric.api.event.player.UseBlockCallback;
import net.minecraft.advancement.criterion.Criteria;
import net.minecraft.block.*;
Expand Down Expand Up @@ -45,6 +46,7 @@ public void onInitialize(ModContainer mod) {
WanderingItems.init();
WanderingRecipes.init();
WanderingDatagen.init();
WanderingWorldgen.init();
UseBlockCallback.EVENT.register(WanderingMod::onBlockUse);
RegistryMonitor.create(Registries.BLOCK).forAll((ctx) -> onBlockAdded(ctx.value(), ctx.id()));
}
Expand Down
23 changes: 0 additions & 23 deletions src/main/java/dev/sweetberry/wwizardry/world/WanderingBiomes.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package dev.sweetberry.wwizardry.world;

import dev.sweetberry.wwizardry.WanderingMod;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biomes;
import net.minecraft.world.biome.source.util.MultiNoiseUtil;
import net.minecraft.world.gen.GenerationStep;
import net.minecraft.world.gen.feature.PlacedFeature;
import org.quiltmc.qsl.worldgen.biome.api.BiomeModifications;
import org.quiltmc.qsl.worldgen.biome.api.BiomeSelectors;
import org.quiltmc.qsl.worldgen.biome.api.ModificationPhase;
import terrablender.api.ModifiedVanillaOverworldBuilder;

public class WanderingWorldgen {
private static final MultiNoiseUtil.ParameterRange FULL_RANGE = MultiNoiseUtil.ParameterRange.of(-1.0f, 1.0f);
public static final RegistryKey<Biome> FORGOTTEN_FIELDS = key("forgotten_fields");
public static final RegistryKey<PlacedFeature> ROSE_QUARTZ = RegistryKey.of(RegistryKeys.PLACED_FEATURE, WanderingMod.id("ore/rose_quartz"));

public static RegistryKey<Biome> key(String path) {
return RegistryKey.of(RegistryKeys.BIOME, WanderingMod.id(path));
}

public static void init() {
var modification = BiomeModifications.create(WanderingMod.id("modifications"));

modification.add(ModificationPhase.ADDITIONS, BiomeSelectors.foundInOverworld(), (ctx, modifications) -> {
modifications.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, ROSE_QUARTZ);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

import com.mojang.datafixers.util.Pair;
import dev.sweetberry.wwizardry.WanderingMod;
import dev.sweetberry.wwizardry.world.WanderingBiomes;
import dev.sweetberry.wwizardry.world.WanderingWorldgen;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biomes;
import net.minecraft.world.biome.OverworldBiomeCreator;
import net.minecraft.world.biome.source.util.MultiNoiseUtil;
import net.minecraft.world.biome.source.util.OverworldBiomeParameters;
import terrablender.api.Region;
import terrablender.api.RegionType;

Expand All @@ -29,13 +26,13 @@ public void addBiomes(Registry<Biome> registry, Consumer<Pair<MultiNoiseUtil.Noi
MultiNoiseUtil.createNoiseHypercube(
MultiNoiseUtil.ParameterRange.of(0.55f, 1.0f),
MultiNoiseUtil.ParameterRange.of(0.55f, 1.0f),
MultiNoiseUtil.ParameterRange.of(-0.3f, -0.03f),
MultiNoiseUtil.ParameterRange.of(0.55f, 0.75f),
MultiNoiseUtil.ParameterRange.of(0.55f, 1.0f),
MultiNoiseUtil.ParameterRange.of(0.0f, 1.0f),
MultiNoiseUtil.ParameterRange.of(0.75f, 1.0f),
1f
),
WanderingBiomes.FORGOTTEN_FIELDS
WanderingWorldgen.FORGOTTEN_FIELDS
);
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"temperature":0.55,"downfall":0.8,"has_precipitation":true,"effects":{"sky_color":7907327,"fog_color":12638463,"water_color":4159204,"water_fog_color":329011,"grass_color":1479277,"foliage_color":1479277,"mood_sound":{"sound":"ambient.cave","tick_delay":6000,"block_search_extent":8,"offset":2}},"spawn_costs":{},"carvers":{"air":["cave","cave_extra_underground","canyon"]},"features":[[],["lake_lava_underground","lake_lava_surface"],["amethyst_geode"],["monster_room","monster_room_deep"],[],[],["ore_dirt","ore_gravel","ore_granite_upper","ore_granite_lower","ore_diorite_upper","ore_diorite_lower","ore_andesite_upper","ore_andesite_lower","ore_tuff","ore_coal_upper","ore_coal_lower","ore_iron_upper","ore_iron_middle","ore_iron_small","ore_gold","ore_gold_lower","ore_redstone","ore_redstone_lower","ore_diamond","ore_diamond_large","ore_diamond_buried","ore_lapis","ore_lapis_buried","ore_copper","underwater_magma","disk_sand","disk_clay","disk_gravel"],["sculk_vein","wwizardry:rare_sculk_patch"],["spring_water","spring_lava"],["wwizardry:tree/denia","wwizardry:flower_patch","glow_lichen","patch_tall_grass_2","flower_plains","patch_grass_plain","brown_mushroom_normal","red_mushroom_normal","patch_sugar_cane","patch_pumpkin"],["freeze_top_layer"]],"spawners":{"ambient":[{"type":"bat","weight":10,"minCount":8,"maxCount":8}],"axolotls":[],"creature":[{"type":"sheep","weight":12,"minCount":4,"maxCount":4},{"type":"pig","weight":10,"minCount":4,"maxCount":4},{"type":"chicken","weight":10,"minCount":4,"maxCount":4},{"type":"cow","weight":8,"minCount":4,"maxCount":4},{"type":"horse","weight":5,"minCount":2,"maxCount":6},{"type":"donkey","weight":1,"minCount":1,"maxCount":3}],"misc":[],"monster":[{"type":"spider","weight":100,"minCount":4,"maxCount":4},{"type":"zombie","weight":95,"minCount":4,"maxCount":4},{"type":"zombie_villager","weight":5,"minCount":1,"maxCount":1},{"type":"skeleton","weight":100,"minCount":4,"maxCount":4},{"type":"creeper","weight":100,"minCount":4,"maxCount":4},{"type":"slime","weight":100,"minCount":4,"maxCount":4},{"type":"enderman","weight":10,"minCount":1,"maxCount":4},{"type":"witch","weight":5,"minCount":1,"maxCount":1}],"underground_water_creature":[{"type":"glow_squid","weight":10,"minCount":4,"maxCount":6}],"water_ambient":[],"water_creature":[]}}
{"temperature":0.55,"downfall":0.8,"has_precipitation":true,"effects":{"sky_color":7907327,"fog_color":12638463,"water_color":4159204,"water_fog_color":329011,"grass_color":1479277,"foliage_color":1479277,"mood_sound":{"sound":"ambient.cave","tick_delay":6000,"block_search_extent":8,"offset":2}},"spawn_costs":{},"carvers":{"air":["cave","cave_extra_underground","canyon"]},"features":[[],["lake_lava_underground","lake_lava_surface"],["amethyst_geode"],["monster_room","monster_room_deep"],[],[],["ore_dirt","ore_gravel","ore_granite_upper","ore_granite_lower","ore_diorite_upper","ore_diorite_lower","ore_andesite_upper","ore_andesite_lower","ore_tuff","ore_coal_upper","ore_coal_lower","ore_iron_upper","ore_iron_middle","ore_iron_small","ore_gold","ore_gold_lower","ore_redstone","ore_redstone_lower","ore_diamond","ore_diamond_large","ore_diamond_buried","ore_lapis","ore_lapis_buried","ore_copper","underwater_magma","disk_sand","disk_clay","disk_gravel","wwizardry:ore/rose_quartz_biome"],["sculk_vein","wwizardry:rare_sculk_patch"],["spring_water","spring_lava"],["wwizardry:tree/denia","wwizardry:flower_patch","glow_lichen","patch_tall_grass_2","flower_plains","patch_grass_plain","brown_mushroom_normal","red_mushroom_normal","patch_sugar_cane","patch_pumpkin"],["freeze_top_layer"]],"spawners":{"ambient":[{"type":"bat","weight":10,"minCount":8,"maxCount":8}],"axolotls":[],"creature":[{"type":"sheep","weight":12,"minCount":4,"maxCount":4},{"type":"pig","weight":10,"minCount":4,"maxCount":4},{"type":"chicken","weight":10,"minCount":4,"maxCount":4},{"type":"cow","weight":8,"minCount":4,"maxCount":4},{"type":"horse","weight":5,"minCount":2,"maxCount":6},{"type":"donkey","weight":1,"minCount":1,"maxCount":3}],"misc":[],"monster":[{"type":"spider","weight":100,"minCount":4,"maxCount":4},{"type":"zombie","weight":95,"minCount":4,"maxCount":4},{"type":"zombie_villager","weight":5,"minCount":1,"maxCount":1},{"type":"skeleton","weight":100,"minCount":4,"maxCount":4},{"type":"creeper","weight":100,"minCount":4,"maxCount":4},{"type":"slime","weight":100,"minCount":4,"maxCount":4},{"type":"enderman","weight":10,"minCount":1,"maxCount":4},{"type":"witch","weight":5,"minCount":1,"maxCount":1}],"underground_water_creature":[{"type":"glow_squid","weight":10,"minCount":4,"maxCount":6}],"water_ambient":[],"water_creature":[]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"ore","config":{"discard_chance_on_air_exposure":0,"size":6,"targets":[{"state":{"Name":"wwizardry:rose_quartz_ore"},"target":{"predicate_type":"tag_match","tag":"stone_ore_replaceables"}},{"state":{"Name":"wwizardry:deepslate_rose_quartz_ore"},"target":{"predicate_type":"tag_match","tag":"deepslate_ore_replaceables"}}]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"feature":"wwizardry:ore/rose_quartz","placement":[{"type":"count","count":13},{"type":"in_square"},{"type":"height_range","height":{"type":"trapezoid","max_inclusive":{"above_bottom":96},"min_inclusive":{"above_bottom":-16}}},{"type":"biome"}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"feature":"wwizardry:ore/rose_quartz","placement":[{"type":"count","count":6},{"type":"in_square"},{"type":"height_range","height":{"type":"trapezoid","max_inclusive":{"above_bottom":128},"min_inclusive":{"above_bottom":0}}},{"type":"biome"}]}

0 comments on commit cc520e2

Please sign in to comment.