Skip to content

Commit 9a58d15

Browse files
authored
Basic ore generation for missing entries, chisel bounds, stackable mega shards, minor rks datagen fixes (#99)
* Added Mega Stone, Z-Crystal, and Meteorite Ore gen In placed and configured features * Register Mega Stone, Z-Crystal, Meteorite Ore * Register Mega Stone, Z-Crystal, Meteorite Ore * Upper and lower bounds to Chisel If inputted size is above 5.0 or under 0.5, it will now automatically change it to the closest valid size. * Making Mega Shards stackable Not sure why it was made unstackable when Z ingots go to 64. * Spelling, aspect, missing entry fixes in datagen changed Incinium -> Incineroar, added Slowbronite line, fixed Unown blocks question and exclamation * Update StatueEditorScreen.kt Adjusted lower bound to 0.5
1 parent 9f199f8 commit 9a58d15

7 files changed

Lines changed: 43 additions & 8 deletions

File tree

common/src/main/java/generations/gg/generations/core/generationscore/common/client/screen/statue/StatueEditorScreen.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,7 @@ class StatueEditorScreen(val statue: StatueEntity) : Screen(Component.empty()) {
137137
false
138138
}
139139
) { s: String ->
140-
var scale = parseFloat(s)
141-
if (scale <= 0) {
142-
scale = 1.0f
143-
}
140+
var scale = parseFloat(s).coerceIn(0.5f, 5.0f)
144141

145142
statue.scale = scale
146143
UpdateStatuePacket.Scale(statue.id, scale).sendToServer()

common/src/main/java/generations/gg/generations/core/generationscore/common/world/feature/GenerationsConfiguredFeatures.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public static void init() {}
7878
public static final ResourceKey<ConfiguredFeature<?, ?>> ORE_CRYSTAL_OVERWORLD_LARGE = registerKey("ore_crystal_overworld_large");
7979
public static final ResourceKey<ConfiguredFeature<?, ?>> ORE_CRYSTAL_OVERWORLD_BURIED = registerKey("ore_crystal_overworld_buried");
8080

81+
public static final ResourceKey<ConfiguredFeature<?, ?>> ORE_MEGASTONE = registerKey("ore_megastone");
82+
public static final ResourceKey<ConfiguredFeature<?, ?>> ORE_Z_CRYSTAL = registerKey("ore_z_crystal");
83+
public static final ResourceKey<ConfiguredFeature<?, ?>> ORE_METEORITE = registerKey("ore_meteorite");
8184

8285
public static void bootStrap(BootstapContext<ConfiguredFeature<?, ?>> context) {
8386
RuleTest stoneReplaceables = new TagMatchTest(BlockTags.STONE_ORE_REPLACEABLES);
@@ -107,6 +110,15 @@ public static void bootStrap(BootstapContext<ConfiguredFeature<?, ?>> context) {
107110
register(context, ORE_CRYSTAL_OVERWORLD_LARGE, Feature.ORE, new OreConfiguration(crystalOres, 2, 0.7F));
108111
register(context, ORE_CRYSTAL_OVERWORLD_BURIED, Feature.ORE, new OreConfiguration(crystalOres, 4, 1.0F));
109112

113+
List<OreConfiguration.TargetBlockState> megastoneOres = targetBlockState(stoneReplaceables, deepslateReplaceables, GenerationsOres.MEGASTONE_ORE_SET);
114+
register(context, ORE_MEGASTONE, Feature.ORE, new OreConfiguration(megastoneOres, 3, 0.0F));
115+
116+
List<OreConfiguration.TargetBlockState> z_crystalOres = targetBlockState(stoneReplaceables, deepslateReplaceables, GenerationsOres.Z_CRYSTAL_ORE_SET);
117+
register(context, ORE_Z_CRYSTAL, Feature.ORE, new OreConfiguration(z_crystalOres, 3, 0.0F));
118+
119+
List<OreConfiguration.TargetBlockState> meteoriteOres = targetBlockState(stoneReplaceables, deepslateReplaceables, GenerationsOres.METEORITE_ORE_SET);
120+
register(context, ORE_METEORITE, Feature.ORE, new OreConfiguration(meteoriteOres, 3, 0.0F));
121+
110122
register(context, POKE_BALL_LOOT, Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(GenerationsUtilityBlocks.POKE_BALL_LOOT.get())));
111123
register(context, BEAST_BALL_LOOT, Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(GenerationsUtilityBlocks.BEAST_BALL_LOOT.get())));
112124
register(context, CHERISH_BALL_LOOT, Feature.SIMPLE_BLOCK, new SimpleBlockConfiguration(BlockStateProvider.simple(GenerationsUtilityBlocks.CHERISH_BALL_LOOT.get())));

common/src/main/java/generations/gg/generations/core/generationscore/common/world/feature/GenerationsPlacedFeatures.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ public static void init(){}
3737
public static final ResourceKey<PlacedFeature> ORE_CRYSTAL_OVERWORLD_LARGE = registerKey("ore_crystal_overworld_large");
3838
public static final ResourceKey<PlacedFeature> ORE_CRYSTAL_OVERWORLD_BURIED = registerKey("ore_crystal_overworld_buried");
3939

40+
public static final ResourceKey<PlacedFeature> ORE_MEGASTONE = registerKey("ore_megastone");
41+
public static final ResourceKey<PlacedFeature> ORE_Z_CRYSTAL = registerKey("ore_z_crystal");
42+
public static final ResourceKey<PlacedFeature> ORE_METEORITE = registerKey("ore_meteorite");
43+
4044
public static final ResourceKey<PlacedFeature> POKE_BALL_LOOT = registerKey("poke_ball_loot");
4145
public static final ResourceKey<PlacedFeature> BEAST_BALL_LOOT = registerKey("beast_ball_loot");
4246
public static final ResourceKey<PlacedFeature> CHERISH_BALL_LOOT = registerKey("cherish_ball_loot");
@@ -96,6 +100,10 @@ public static void bootStrap(BootstapContext<PlacedFeature> context) {
96100
register(context, ORE_CRYSTAL_OVERWORLD_LARGE, configuredFeatureRegistryEntryLookup.getOrThrow(GenerationsConfiguredFeatures.ORE_CRYSTAL_OVERWORLD_LARGE), GenerationsOrePlacements.rareOrePlacement(9, HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))));
97101
register(context, ORE_CRYSTAL_OVERWORLD_BURIED, configuredFeatureRegistryEntryLookup.getOrThrow(GenerationsConfiguredFeatures.ORE_CRYSTAL_OVERWORLD_SMALL), GenerationsOrePlacements.commonOrePlacement(4, HeightRangePlacement.triangle(VerticalAnchor.aboveBottom(-80), VerticalAnchor.aboveBottom(80))));
98102

103+
register(context, ORE_MEGASTONE, configuredFeatureRegistryEntryLookup.getOrThrow(GenerationsConfiguredFeatures.ORE_MEGASTONE), GenerationsOrePlacements.rareOrePlacement(20, HeightRangePlacement.triangle(VerticalAnchor.absolute(0), VerticalAnchor.absolute(-64))));
104+
register(context, ORE_Z_CRYSTAL, configuredFeatureRegistryEntryLookup.getOrThrow(GenerationsConfiguredFeatures.ORE_Z_CRYSTAL), GenerationsOrePlacements.rareOrePlacement(20, HeightRangePlacement.triangle(VerticalAnchor.absolute(0), VerticalAnchor.absolute(-64))));
105+
register(context, ORE_METEORITE, configuredFeatureRegistryEntryLookup.getOrThrow(GenerationsConfiguredFeatures.ORE_METEORITE), GenerationsOrePlacements.rareOrePlacement(20, HeightRangePlacement.triangle(VerticalAnchor.absolute(0), VerticalAnchor.absolute(-64))));
106+
99107
register(context, POKE_BALL_LOOT, configuredFeatureRegistryEntryLookup.getOrThrow(GenerationsConfiguredFeatures.POKE_BALL_LOOT), oceanFloorSquaredWithChance(250));
100108
register(context, BEAST_BALL_LOOT, configuredFeatureRegistryEntryLookup.getOrThrow(GenerationsConfiguredFeatures.BEAST_BALL_LOOT), oceanFloorSquaredWithChance(200));
101109
register(context, CHERISH_BALL_LOOT, configuredFeatureRegistryEntryLookup.getOrThrow(GenerationsConfiguredFeatures.CHERISH_BALL_LOOT), oceanFloorSquaredWithChance(200));

common/src/main/java/generations/gg/generations/core/generationscore/common/world/item/GenerationsItems.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ object GenerationsItems {
765765
@JvmField val ULTRITE_INGOT = register("ultrite_ingot", ::Item, PLAYER_ITEMS)
766766
@JvmField val ULTRITE_REMNANT = register("ultrite_remnant", ::Item, PLAYER_ITEMS)
767767
@JvmField val DYNITE_ORE = register("dynite_ore", ::Item, PLAYER_ITEMS)
768-
@JvmField val MEGASTONE_SHARD = register("mega_stone_shard", { Item(it.stacksTo(1)) }, PLAYER_ITEMS)
768+
@JvmField val MEGASTONE_SHARD = register("mega_stone_shard", ::Item, PLAYER_ITEMS)
769769
@JvmField val KEY_STONE = register("key_stone", ::Item, PLAYER_ITEMS)
770770

771771
@JvmField val ULTRITE_UPGRADE_SMITHING_TEMPLATE = register("ultrite_upgrade_smithing_template", { UltriteSmithingTemplateItem() }, PLAYER_ITEMS)

fabric/src/main/java/generations/gg/generations/core/generationscore/fabric/worldgen/GenerationsFabricBiomemodifiers.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public static void generateOres() {
3434

3535
registerUnderGroundOres(BiomeSelectors.tag(ConventionalBiomeTags.CLIMATE_COLD), GenerationsPlacedFeatures.ORE_CRYSTAL, GenerationsPlacedFeatures.ORE_CRYSTAL_BURIED);
3636
registerUnderGroundOres(GenerationsPlacedFeatures.ORE_CRYSTAL_OVERWORLD_SMALL, GenerationsPlacedFeatures.ORE_CRYSTAL_OVERWORLD_LARGE, GenerationsPlacedFeatures.ORE_CRYSTAL_OVERWORLD_BURIED);
37+
38+
registerUnderGroundOres(GenerationsPlacedFeatures.ORE_MEGASTONE);
39+
registerUnderGroundOres(GenerationsPlacedFeatures.ORE_Z_CRYSTAL);
40+
registerUnderGroundOres(GenerationsPlacedFeatures.ORE_METEORITE);
41+
3742
registerSurfaceFeatures(GenerationsPlacedFeatures.POKE_BALL_LOOT);
3843
registerSurfaceFeatures(GenerationsPlacedFeatures.BEAST_BALL_LOOT, BiomeSelectors.foundInTheEnd());
3944
registerSurfaceFeatures(GenerationsPlacedFeatures.CHERISH_BALL_LOOT, BiomeSelectors.tag(GenerationsBiomeTags.IS_FLORAL));

forge/src/main/java/generations/gg/generations/core/generationscore/forge/datagen/RksRecipeProvider.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ protected void buildRecipes(@NotNull Consumer<FinishedRecipe> exporter) {
203203
createMegaStone(LOPUNNNITE, "lopunny", exporter);
204204
createMegaStone(SALAMENCITE, "salamence", exporter);
205205
createMegaStone(BEEDRILLITE, "beedrill", exporter);
206+
createMegaStone(SLOWBRONITE, "slowbro", exporter);
206207

207208
createZCyrstal(BUGINIUM_Z, BUG_GEM, exporter);
208209
createZCyrstal(DARKINIUM_Z, DARK_GEM, exporter);
@@ -226,7 +227,7 @@ protected void buildRecipes(@NotNull Consumer<FinishedRecipe> exporter) {
226227
createZCyrstal(ALORAICHIUM_Z, "raichu", "alolan", exporter);
227228
createZCyrstal(DECIDIUM_Z, "decidueye", exporter);
228229
createZCyrstal(EEVIUM_Z, "eevee", exporter);
229-
createZCyrstal(INCINIUM_Z, "incinium", exporter);
230+
createZCyrstal(INCINIUM_Z, "incineroar", exporter);
230231
createZCyrstal(KOMMONIUM_Z, "kommoo", exporter);
231232
createZCyrstal(LUNALIUM_Z, "lunala", exporter);
232233
createZCyrstal(LYCANIUM_Z, "lycanroc", exporter);
@@ -277,8 +278,8 @@ protected void buildRecipes(@NotNull Consumer<FinishedRecipe> exporter) {
277278
unownBlock(exporter, GenerationsBlocks.UNOWN_BLOCK_Y, "y");
278279
unownBlock(exporter, GenerationsBlocks.UNOWN_BLOCK_Z, "z");
279280

280-
unownBlock(exporter, GenerationsBlocks.UNOWN_BLOCK_EXCLAMATION_MARK, "!");
281-
unownBlock(exporter, GenerationsBlocks.UNOWN_BLOCK_QUESTION_MARK, "?");
281+
unownBlock(exporter, GenerationsBlocks.UNOWN_BLOCK_EXCLAMATION_MARK, "exclamation");
282+
unownBlock(exporter, GenerationsBlocks.UNOWN_BLOCK_QUESTION_MARK, "questionmark");
282283
}
283284

284285
private <E> void createZCyrstal(RegistrySupplier<Item> result, String pokemon, String aspects, Consumer<FinishedRecipe> exporter) {

forge/src/main/java/generations/gg/generations/core/generationscore/forge/worldgen/GenerationsForgeBiomemodifiers.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ public static void bootstrap(BootstapContext<BiomeModifier> context) {
6868
placedFeaturesLookup.getOrThrow(GenerationsPlacedFeatures.ORE_CRYSTAL_OVERWORLD_BURIED))
6969
);
7070

71+
registerUnderGroundOres(context, "add_ore_megastone_overworld", HolderSet.direct(
72+
placedFeaturesLookup.getOrThrow(GenerationsPlacedFeatures.ORE_MEGASTONE))
73+
);
74+
75+
registerUnderGroundOres(context, "add_ore_z_crystal_overworld", HolderSet.direct(
76+
placedFeaturesLookup.getOrThrow(GenerationsPlacedFeatures.ORE_Z_CRYSTAL))
77+
);
78+
79+
registerUnderGroundOres(context, "add_ore_meteorite_overworld", HolderSet.direct(
80+
placedFeaturesLookup.getOrThrow(GenerationsPlacedFeatures.ORE_METEORITE))
81+
);
82+
7183
registerSurfaceFeatures(context, "add_poke_ball_loot",
7284
HolderSet.direct(placedFeaturesLookup.getOrThrow(GenerationsPlacedFeatures.POKE_BALL_LOOT)));
7385

0 commit comments

Comments
 (0)