sulforpad corrections - spawning not yet checked

This commit is contained in:
Jottyfan 2023-12-09 22:19:14 +01:00
parent 12770732b7
commit e56ec4c88c
8 changed files with 57 additions and 12 deletions

View File

@ -9,7 +9,7 @@
loader_version=0.15.1
# Mod Properties
mod_version = 1.20.4.0
mod_version = 1.20.4.1
maven_group = de.jottyfan.minecraft
archives_base_name = quickiefabric

View File

@ -26,6 +26,8 @@ public class FeaturesManager {
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_DIRTSALPETER = genCf("dirtsalpeter");
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_SANDSALPETER = genCf("sandsalpeter");
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORESANDSALPETER = genCf("oresandsalpeter");
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_SULFORPAD = genCf("sulforpad");
// public static final SulforpadFeature CF_SULFORPAD = genCfOwn("sulforpad");
public static final RegistryKey<PlacedFeature> PF_ORESULPHOR = genPf("oresulphor");
public static final RegistryKey<PlacedFeature> PF_OREDEEPSLATESULPHOR = genPf("oredeepslatesulphor");
@ -35,6 +37,7 @@ public class FeaturesManager {
public static final RegistryKey<PlacedFeature> PF_DIRTSALPETER = genPf("dirtsalpeter");
public static final RegistryKey<PlacedFeature> PF_SANDSALPETER = genPf("sandsalpeter");
public static final RegistryKey<PlacedFeature> PF_ORESANDSALPETER = genPf("oresandsalpeter");
public static final RegistryKey<PlacedFeature> PF_SULFORPAD = genPf("sulforpad");
private static final RegistryKey<ConfiguredFeature<?, ?>> genCf(String name) {
return RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, new Identifier(RegistryManager.QUICKIEFABRIC, name));
@ -52,6 +55,7 @@ public class FeaturesManager {
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_SANDSALPETER);
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORESANDSALPETER);
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_OREDEEPSLATESULPHOR);
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.VEGETAL_DECORATION, PF_SULFORPAD);
};
}
@ -59,6 +63,7 @@ public class FeaturesManager {
return (bsc, bmc) -> {
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORENETHERSULPHOR);
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_BLOCKSULPHOR);
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.VEGETAL_DECORATION, PF_SULFORPAD);
};
}

View File

@ -152,6 +152,7 @@ public class RegistryManager {
stacks.add(new ItemStack(QuickieBlocks.BLOCKSTACKERNORTH));
stacks.add(new ItemStack(QuickieBlocks.BLOCKSTACKERSOUTH));
stacks.add(new ItemStack(QuickieBlocks.BLOCKSPREADER));
stacks.add(new ItemStack(QuickieBlocks.SULFORPAD));
}).build());
}
@ -312,16 +313,16 @@ public class RegistryManager {
BiomeModifications.create(new Identifier(QUICKIEFABRIC, "nether_features")).add(ModificationPhase.ADDITIONS,
BiomeSelectors.foundInTheNether(), FeaturesManager.netherOres());
// Sulforpad feature
Identifier SULFORPAD_FEATURE_ID = new Identifier(QUICKIEFABRIC, "sulforpad_feature");
Feature<SulforpadFeatureConfig> SULFORPAD_FEATURE = new SulforpadFeature(SulforpadFeatureConfig.CODEC);
ConfiguredFeature<SulforpadFeatureConfig, SulforpadFeature> SULFORPAD_FEATURE_CONFIGURED = new ConfiguredFeature<>(
(SulforpadFeature) SULFORPAD_FEATURE,
new SulforpadFeatureConfig(new Identifier(QUICKIEFABRIC, "sulforpad")));
PlacedFeature SULFORPAD_FEATURE_PLACED = new PlacedFeature(RegistryEntry.of(SULFORPAD_FEATURE_CONFIGURED), List.of(SquarePlacementModifier.of()));
// Registries.register(RegistryKeys.FEATURE, SULFORPAD_FEATURE_ID, SULFORPAD_FEATURE);
// Registries.register(RegistryKeys.CONFIGURED_FEATURE, SULFORPAD_FEATURE_ID, SULFORPAD_FEATURE_CONFIGURED);
// Registries.register(RegistryKeys.PLACED_FEATURE, SULFORPAD_FEATURE_ID, SULFORPAD_FEATURE_PLACED);
// // Sulforpad feature
// Identifier SULFORPAD_FEATURE_ID = new Identifier(QUICKIEFABRIC, "sulforpad");
// Feature<SulforpadFeatureConfig> SULFORPAD_FEATURE = new SulforpadFeature(SulforpadFeatureConfig.CODEC);
// ConfiguredFeature<SulforpadFeatureConfig, SulforpadFeature> SULFORPAD_FEATURE_CONFIGURED = new ConfiguredFeature<>(
// (SulforpadFeature) SULFORPAD_FEATURE,
// new SulforpadFeatureConfig(new Identifier(QUICKIEFABRIC, "sulforpad")));
// PlacedFeature SULFORPAD_FEATURE_PLACED = new PlacedFeature(RegistryEntry.of(SULFORPAD_FEATURE_CONFIGURED), List.of(SquarePlacementModifier.of()));
// Registry.register(Registries.FEATURE, new Identifier(QUICKIEFABRIC, "sulforpad"), new SulforpadFeature(SulforpadFeatureConfig.CODEC));
// Registry.register(Registries.CONFIGURED_FEATURE, SULFORPAD_FEATURE_ID, SULFORPAD_FEATURE_CONFIGURED);
// Registry.register(RegistryKeys.PLACED_FEATURE, SULFORPAD_FEATURE_ID, SULFORPAD_FEATURE_PLACED);
// BiomeModifications.addFeature(BiomeSelectors.foundInTheNether(),GenerationStep.Feature.VEGETAL_DECORATION,
// RegistryKey.of(RegistryKeys.PLACED_FEATURE, SULFORPAD_FEATURE_ID));
}

View File

@ -15,6 +15,7 @@ import net.minecraft.world.gen.feature.util.FeatureContext;
* @author jotty
*
*/
@Deprecated
public class SulforpadFeature extends Feature<SulforpadFeatureConfig> {
public SulforpadFeature(Codec<SulforpadFeatureConfig> configCodec) {

View File

@ -11,6 +11,7 @@ import net.minecraft.world.gen.feature.FeatureConfig;
* @author jotty
*
*/
@Deprecated
public record SulforpadFeatureConfig(Identifier blockId) implements FeatureConfig {
public static Codec<SulforpadFeatureConfig> CODEC = RecordCodecBuilder
.create(o -> o.group(Identifier.CODEC.fieldOf("blockID").forGetter(SulforpadFeatureConfig::blockId)).apply(o,

View File

@ -1,6 +1,6 @@
{
"parent": "item/coal",
"textures": {
"layer0": "quickiefabric:item/sulphorpad2"
"layer0": "quickiefabric:block/sulforpad2"
}
}

View File

@ -0,0 +1,18 @@
{
"type": "minecraft:ore",
"config": {
"discard_chance_on_air_exposure": 0.0,
"size": 3,
"targets": [
{
"state": {
"Name": "quickiefabric:sulforpad"
},
"target": {
"predicate_type": "minecraft:block_match",
"block": "minecraft:lava"
}
}
]
}
}

View File

@ -0,0 +1,19 @@
{
"feature": "quickiefabric:sulforpad",
"placement": [
{
"type": "minecraft:environment_scan",
"direction_of_search": "up",
"max_steps": 1,
"target_condition": {
"type": "minecraft:matching_blocks",
"offset": [
0,
1,
0
],
"blocks": "minecraft:air"
}
}
]
}