datagen
This commit is contained in:
parent
ca5b84a197
commit
891893b0f5
21 changed files with 47 additions and 0 deletions
|
@ -75,3 +75,7 @@ tasks.jar {
|
||||||
rename { "${it}_${project.base.archivesName}" }
|
rename { "${it}_${project.base.archivesName}" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fabricApi {
|
||||||
|
configureDataGeneration()
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package observer.nelle.roses_mod.datagen;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
|
||||||
|
|
||||||
|
public class RosesDataGenerator implements DataGeneratorEntrypoint {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInitializeDataGenerator(FabricDataGenerator generator) {
|
||||||
|
FabricDataGenerator.Pack pack = generator.createPack();
|
||||||
|
|
||||||
|
// Adding a provider example:
|
||||||
|
//
|
||||||
|
// pack.addProvider(AdvancementsProvider::new);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package observer.nelle.roses_mod.world.gen;
|
||||||
|
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||||
|
import observer.nelle.roses_mod.RosesModKt;
|
||||||
|
|
||||||
|
public class ModFlowerGeneration {
|
||||||
|
|
||||||
|
public static final RegistryKey<PlacedFeature> ROSE_FLOWER_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","rose_flower"));
|
||||||
|
public static final RegistryKey<PlacedFeature> CYAN_ROSE_FLOWER_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","cyan_rose_flower"));
|
||||||
|
public static final RegistryKey<PlacedFeature> CYAN_ROSE_BUSH_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","cyan_rose_bush"));
|
||||||
|
|
||||||
|
public static void generateFlowers() {
|
||||||
|
RosesModKt.getLOGGER().debug("Registering Features...");
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,6 +8,7 @@
|
||||||
package observer.nelle.roses_mod
|
package observer.nelle.roses_mod
|
||||||
|
|
||||||
import net.fabricmc.api.ModInitializer
|
import net.fabricmc.api.ModInitializer
|
||||||
|
import observer.nelle.roses_mod.world.gen.ModFlowerGeneration
|
||||||
import org.slf4j.Logger
|
import org.slf4j.Logger
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
|
|
||||||
|
@ -23,7 +24,12 @@ class roses_mod : ModInitializer {
|
||||||
* - biome modification
|
* - biome modification
|
||||||
* */
|
* */
|
||||||
|
|
||||||
|
// worldgen first
|
||||||
|
ModFlowerGeneration.generateFlowers()
|
||||||
|
|
||||||
|
// blocks
|
||||||
RosesBlocks
|
RosesBlocks
|
||||||
|
// creative tab entries
|
||||||
RosesCreativeTab
|
RosesCreativeTab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
|
|
||||||
"environment": "*",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
|
"fabric-datagen": [
|
||||||
|
"observer.nelle.roses_mod.datagen.RosesDataGenerator"
|
||||||
|
],
|
||||||
"client": [
|
"client": [
|
||||||
"observer.nelle.roses_mod.RosesModClient"
|
"observer.nelle.roses_mod.RosesModClient"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue