GENERATION!
This commit is contained in:
parent
32c3f49ebb
commit
16d63210de
13 changed files with 214 additions and 38 deletions
24
build.gradle
24
build.gradle
|
@ -1,10 +1,11 @@
|
|||
plugins {
|
||||
id "com.modrinth.minotaur" version "2.+"
|
||||
id 'maven-publish'
|
||||
alias libs.plugins.quilt.loom
|
||||
}
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = "${project.version}+${libs.versions.minecraft.get()}"
|
||||
version = "${project.version}"
|
||||
group = project.maven_group
|
||||
|
||||
repositories {
|
||||
|
@ -70,6 +71,27 @@ jar {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//modrinth
|
||||
import com.modrinth.minotaur.dependencies.ModDependency
|
||||
|
||||
modrinth {
|
||||
token = System.getenv("MODRINTH_TOKEN") // Please use an environment variable for this! The default is `$MODRINTH_TOKEN`.
|
||||
projectId = "roses-mod" // The ID of your Modrinth project. Slugs will not work.
|
||||
versionNumber = version // The (preferably SemVer) version of the mod. If not specified, it'll use the `version` declaration
|
||||
versionType = "Release" // This is the default -- can also be `beta` or `alpha`
|
||||
uploadFile = remapJar // Tells Minotaur to use the remapped jar
|
||||
gameVersions = ["1.20.1"] // An array of game versions the version supports
|
||||
loaders = ["quilt"] // Self-explanatory.
|
||||
dependencies { // A special DSL for creating dependencies
|
||||
// scope.type
|
||||
// The scope can be `required`, `optional`, `incompatible`, or `embedded`
|
||||
// The type can either be `project` or `version`
|
||||
required.project "qsl" // Creates a new required dependency on Fabric API
|
||||
optional.project "modmenu"//, "mc1.19.3-0.4.8" // Creates a new optional dependency on this specific version of Sodium
|
||||
}
|
||||
}
|
||||
|
||||
// Configure the maven publication
|
||||
publishing {
|
||||
publications {
|
||||
|
|
|
@ -3,8 +3,14 @@ org.gradle.jvmargs = -Xmx1G
|
|||
org.gradle.parallel = true
|
||||
|
||||
# Mod Properties
|
||||
version = 2.3.1
|
||||
version = 3.0.0
|
||||
maven_group = xyz.limepot
|
||||
archives_base_name = roses_mod
|
||||
|
||||
# Modrinth Metadata
|
||||
modrinth_slug= roses-mod
|
||||
modrinth_id= Hxo4BmMk
|
||||
modrinth_game_versions= 1.20.1
|
||||
modrinth_mod_loaders= quilt
|
||||
|
||||
# Dependencies are managed at gradle/libs.versions.toml
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# The latest versions are available at https://lambdaurora.dev/tools/import_quilt.html
|
||||
minecraft = "1.20.1"
|
||||
quilt_mappings = "1.20.1+build.1"
|
||||
quilt_loader = "0.19.0"
|
||||
quilt_loader = "0.19.1"
|
||||
|
||||
quilted_fabric_api = "7.0.2+0.83.0-1.20.1"
|
||||
|
||||
|
|
|
@ -13,16 +13,20 @@ import net.minecraft.loot.provider.number.ConstantLootNumberProvider;
|
|||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.gen.GenerationStep;
|
||||
import org.quiltmc.loader.api.ModContainer;
|
||||
import org.quiltmc.qsl.base.api.entrypoint.ModInitializer;
|
||||
import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings;
|
||||
import org.quiltmc.qsl.item.setting.api.QuiltItemSettings;
|
||||
import org.quiltmc.qsl.worldgen.biome.api.BiomeModifications;
|
||||
import org.quiltmc.qsl.worldgen.biome.api.BiomeSelectors;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import xyz.limepot.roses_mod.world.gen.ModWorldGen;
|
||||
import xyz.limepot.roses_mod.world.gen.ModFlowerGeneration;
|
||||
|
||||
import java.util.Random;
|
||||
//import xyz.limepot.roses_mod.world.feature.ModConfiguredFeatures;
|
||||
|
||||
import static xyz.limepot.roses_mod.world.gen.ModFlowerGeneration.*;
|
||||
|
||||
public class RosesMod implements ModInitializer {
|
||||
public static final String MOD_ID = "roses_mod";
|
||||
|
@ -41,7 +45,12 @@ public class RosesMod implements ModInitializer {
|
|||
@Override
|
||||
public void onInitialize(ModContainer mod) {
|
||||
//REGISTER WORLDGEN
|
||||
ModWorldGen.generateWorldGen();
|
||||
ModFlowerGeneration.generateFlowers();
|
||||
|
||||
//BIOME MOD
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.VEGETAL_DECORATION, ROSE_FLOWER_PLACED_KEY);
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.VEGETAL_DECORATION, CYAN_ROSE_FLOWER_PLACED_KEY);
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.VEGETAL_DECORATION, CYAN_ROSE_BUSH_PLACED_KEY);
|
||||
|
||||
//REGISTER BLOCKS AND BLOCK ITEMS
|
||||
|
||||
|
|
|
@ -1,38 +1,22 @@
|
|||
package xyz.limepot.roses_mod.world.gen;
|
||||
|
||||
|
||||
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.biome.Biomes;
|
||||
import net.minecraft.world.gen.GenerationStep;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
import org.quiltmc.qsl.worldgen.biome.api.BiomeModifications;
|
||||
import org.quiltmc.qsl.worldgen.biome.api.BiomeSelectors;
|
||||
import xyz.limepot.roses_mod.RosesMod;
|
||||
|
||||
import static xyz.limepot.roses_mod.RosesMod.MOD_ID;
|
||||
|
||||
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() {
|
||||
//ROSE FLOWER
|
||||
RegistryKey<TagKey> roseFlowerTag = RegistryKey.of(RegistryKeys.TAGS, new Identifier(MOD_ID, "rose_flowers"));
|
||||
BiomeModifications.addFeature(BiomeSelectors.includeByKey(BiomeKeys.PLAINS), GenerationStep.Feature.VEGETAL_DECORATION, roseFlowerTag);
|
||||
//CYAN ROSE
|
||||
RegistryKey<TagKey> cyanRoseTag = RegistryKey.of(RegistryKeys.TAGS, new Identifier(MOD_ID, "cyan_roses"));
|
||||
BiomeModifications.addFeature(BiomeSelectors.includeByKey(BiomeKeys.PLAINS), GenerationStep.Feature.VEGETAL_DECORATION, cyanRoseTag);
|
||||
//CYAN ROSE BUSH
|
||||
RegistryKey<TagKey> cyanRoseBushT ag = RegistryKey.of(RegistryKeys.TAGS, new Identifier(MOD_ID, "cyan_rose_bushes"));
|
||||
BiomeModifications.addFeature(BiomeSelectors.includeByKey(BiomeKeys.PLAINS), GenerationStep.Feature.VEGETAL_DECORATION, cyanRoseBushTag);
|
||||
}
|
||||
*/
|
||||
public static void generateFlowers() {/*
|
||||
RegistryKey<ConfiguredFeature<?, ?>> cyanRoseBushTag = RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, new Identifier(MOD_ID, "cyan_rose_bush"));
|
||||
RegistryKey<PlacedFeature> cyanRoseBushTagKey = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier(MOD_ID, "cyan_rose_bushes"));
|
||||
BiomeModifications.addFeature(BiomeSelectors.includeByKey(Biomes.FOREST),
|
||||
GenerationStep.Feature.VEGETAL_DECORATION,
|
||||
RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier(MOD_ID, "cyan_rose_bush")));*/
|
||||
RosesMod.LOGGER.debug("Registering Features...");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
package xyz.limepot.roses_mod.world.gen;
|
||||
|
||||
public class ModWorldGen {
|
||||
public static void generateWorldGen() {
|
||||
ModFlowerGeneration.generateFlowers();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"type": "minecraft:flower",
|
||||
"config": {
|
||||
"tries": 64,
|
||||
"xz_spread": 7,
|
||||
"y_spread": 3,
|
||||
"feature": {
|
||||
"feature": {
|
||||
"type": "minecraft:simple_block",
|
||||
"config": {
|
||||
"to_place": {
|
||||
"type": "minecraft:weighted_state_provider",
|
||||
"entries": [
|
||||
{
|
||||
"weight": 5,
|
||||
"data": {
|
||||
"Name": "roses_mod:cyan_rose_bush"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:block_predicate_filter",
|
||||
"predicate": {
|
||||
"type": "minecraft:matching_blocks",
|
||||
"blocks": "minecraft:air"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"type": "minecraft:flower",
|
||||
"config": {
|
||||
"tries": 64,
|
||||
"xz_spread": 7,
|
||||
"y_spread": 3,
|
||||
"feature": {
|
||||
"feature": {
|
||||
"type": "minecraft:simple_block",
|
||||
"config": {
|
||||
"to_place": {
|
||||
"type": "minecraft:weighted_state_provider",
|
||||
"entries": [
|
||||
{
|
||||
"weight": 5,
|
||||
"data": {
|
||||
"Name": "roses_mod:cyan_rose_flower"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:block_predicate_filter",
|
||||
"predicate": {
|
||||
"type": "minecraft:matching_blocks",
|
||||
"blocks": "minecraft:air"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"type": "minecraft:flower",
|
||||
"config": {
|
||||
"tries": 64,
|
||||
"xz_spread": 7,
|
||||
"y_spread": 3,
|
||||
"feature": {
|
||||
"feature": {
|
||||
"type": "minecraft:simple_block",
|
||||
"config": {
|
||||
"to_place": {
|
||||
"type": "minecraft:weighted_state_provider",
|
||||
"entries": [
|
||||
{
|
||||
"weight": 5,
|
||||
"data": {
|
||||
"Name": "roses_mod:rose_flower"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:block_predicate_filter",
|
||||
"predicate": {
|
||||
"type": "minecraft:matching_blocks",
|
||||
"blocks": "minecraft:air"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"feature": "roses_mod:cyan_rose_bush",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:rarity_filter",
|
||||
"chance": 5
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:heightmap",
|
||||
"heightmap": "MOTION_BLOCKING"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"feature": "roses_mod:cyan_rose_flower",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:rarity_filter",
|
||||
"chance": 16
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:heightmap",
|
||||
"heightmap": "MOTION_BLOCKING"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"feature": "roses_mod:rose_flower",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:rarity_filter",
|
||||
"chance": 32
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:heightmap",
|
||||
"heightmap": "MOTION_BLOCKING"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -26,11 +26,11 @@
|
|||
"depends": [
|
||||
{
|
||||
"id": "quilt_loader",
|
||||
"versions": ">=0.19.0"
|
||||
"versions": ">=0.19.1"
|
||||
},
|
||||
{
|
||||
"id": "quilted_fabric_api",
|
||||
"versions": ">=7.0.2+0.83.0-1.20.1"
|
||||
"versions": ">=7.0.2"
|
||||
},
|
||||
{
|
||||
"id": "minecraft",
|
||||
|
|
Loading…
Reference in a new issue