- Fix generation probability
- Quilt-ify some things
This commit is contained in:
parent
16d63210de
commit
c3746e4e15
7 changed files with 19 additions and 51 deletions
24
build.gradle
24
build.gradle
|
@ -1,11 +1,10 @@
|
||||||
plugins {
|
plugins {
|
||||||
id "com.modrinth.minotaur" version "2.+"
|
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
alias libs.plugins.quilt.loom
|
alias libs.plugins.quilt.loom
|
||||||
}
|
}
|
||||||
|
|
||||||
archivesBaseName = project.archives_base_name
|
archivesBaseName = project.archives_base_name
|
||||||
version = "${project.version}"
|
version = "${project.version}+${libs.versions.minecraft.get()}"
|
||||||
group = project.maven_group
|
group = project.maven_group
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -71,27 +70,6 @@ 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
|
// Configure the maven publication
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
|
|
|
@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
version = 3.0.0
|
version = 3.0.1
|
||||||
maven_group = xyz.limepot
|
maven_group = xyz.limepot
|
||||||
archives_base_name = roses_mod
|
archives_base_name = roses_mod
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import xyz.limepot.roses_mod.world.gen.ModFlowerGeneration;
|
import xyz.limepot.roses_mod.world.gen.ModFlowerGeneration;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import static xyz.limepot.roses_mod.world.gen.ModFlowerGeneration.*;
|
import static xyz.limepot.roses_mod.world.gen.ModFlowerGeneration.*;
|
||||||
|
|
||||||
|
@ -70,22 +69,16 @@ public class RosesMod implements ModInitializer {
|
||||||
|
|
||||||
//CREATIVE TABS
|
//CREATIVE TABS
|
||||||
|
|
||||||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> {
|
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> content.addAfter(Items.POPPY, ROSE_FLOWER));
|
||||||
content.addAfter(Items.POPPY, ROSE_FLOWER);
|
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> content.addAfter(Items.BLUE_ORCHID, CYAN_ROSE));
|
||||||
});
|
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> content.addAfter(Items.ROSE_BUSH, CYAN_ROSE_BUSH));
|
||||||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> {
|
|
||||||
content.addAfter(Items.BLUE_ORCHID, CYAN_ROSE);
|
|
||||||
});
|
|
||||||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> {
|
|
||||||
content.addAfter(Items.ROSE_BUSH, CYAN_ROSE_BUSH);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
//LOOT TABLES
|
//LOOT TABLES
|
||||||
final Identifier ROSE_BUSH_LOOT_TABLE_ID = Blocks.ROSE_BUSH.getLootTableId();
|
final Identifier ROSE_BUSH_LOOT_TABLE_ID = Blocks.ROSE_BUSH.getLootTableId();
|
||||||
LootTableEvents.MODIFY.register((resourceManager, lootManager, id, tableBuilder, source) -> {
|
LootTableEvents.MODIFY.register((resourceManager, lootManager, id, tableBuilder, source) -> {
|
||||||
if (source.isBuiltin() && ROSE_BUSH_LOOT_TABLE_ID.equals(id)) {
|
if (source.isBuiltin() && ROSE_BUSH_LOOT_TABLE_ID.equals(id)) {
|
||||||
LootPool.Builder poolBuilder = LootPool.builder().rolls(ConstantLootNumberProvider.create(3)).with(ItemEntry.builder(RosesMod.ROSE_FLOWER));;
|
LootPool.Builder poolBuilder = LootPool.builder().rolls(ConstantLootNumberProvider.create(3)).with(ItemEntry.builder(RosesMod.ROSE_FLOWER));
|
||||||
tableBuilder.pool(poolBuilder);
|
tableBuilder.pool(poolBuilder);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package xyz.limepot.roses_mod;
|
package xyz.limepot.roses_mod;
|
||||||
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
|
||||||
|
import org.quiltmc.qsl.block.extensions.api.client.*;
|
||||||
import net.minecraft.client.render.RenderLayer;
|
import net.minecraft.client.render.RenderLayer;
|
||||||
import org.quiltmc.loader.api.ModContainer;
|
import org.quiltmc.loader.api.ModContainer;
|
||||||
import org.quiltmc.qsl.base.api.entrypoint.client.ClientModInitializer;
|
import org.quiltmc.qsl.base.api.entrypoint.client.ClientModInitializer;
|
||||||
|
@ -9,14 +10,14 @@ import org.quiltmc.qsl.base.api.entrypoint.client.ClientModInitializer;
|
||||||
public class RosesModClient implements ClientModInitializer {
|
public class RosesModClient implements ClientModInitializer {
|
||||||
public void onInitializeClient(ModContainer mod) {
|
public void onInitializeClient(ModContainer mod) {
|
||||||
//ROSE FLOWER
|
//ROSE FLOWER
|
||||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.POTTED_ROSE);
|
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.POTTED_ROSE);
|
||||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.ROSE_FLOWER);
|
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.ROSE_FLOWER);
|
||||||
|
|
||||||
//CYAN ROSE
|
//CYAN ROSE
|
||||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.POTTED_CYAN);
|
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.POTTED_CYAN);
|
||||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.CYAN_ROSE);
|
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.CYAN_ROSE);
|
||||||
|
|
||||||
//CYAN ROSE BUSH
|
//CYAN ROSE BUSH
|
||||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.CYAN_ROSE_BUSH);
|
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.CYAN_ROSE_BUSH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
package xyz.limepot.roses_mod.world.gen;
|
package xyz.limepot.roses_mod.world.gen;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.registry.RegistryKey;
|
import net.minecraft.registry.RegistryKey;
|
||||||
import net.minecraft.registry.RegistryKeys;
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||||
import xyz.limepot.roses_mod.RosesMod;
|
import xyz.limepot.roses_mod.RosesMod;
|
||||||
|
|
||||||
import static xyz.limepot.roses_mod.RosesMod.MOD_ID;
|
|
||||||
|
|
||||||
public class ModFlowerGeneration {
|
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> ROSE_FLOWER_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","rose_flower"));
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"type": "minecraft:flower",
|
"type": "minecraft:flower",
|
||||||
"config": {
|
"config": {
|
||||||
"tries": 64,
|
"tries": 5,
|
||||||
"xz_spread": 7,
|
"xz_spread": 4,
|
||||||
"y_spread": 3,
|
"y_spread": 3,
|
||||||
"feature": {
|
"feature": {
|
||||||
"feature": {
|
"feature": {
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
"type": "minecraft:weighted_state_provider",
|
"type": "minecraft:weighted_state_provider",
|
||||||
"entries": [
|
"entries": [
|
||||||
{
|
{
|
||||||
"weight": 5,
|
"weight": 1,
|
||||||
"data": {
|
"data": {
|
||||||
"Name": "roses_mod:cyan_rose_bush"
|
"Name": "roses_mod:cyan_rose_bush"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"type": "minecraft:flower",
|
"type": "minecraft:flower",
|
||||||
"config": {
|
"config": {
|
||||||
"tries": 64,
|
"tries": 24,
|
||||||
"xz_spread": 7,
|
"xz_spread": 3,
|
||||||
"y_spread": 3,
|
"y_spread": 3,
|
||||||
"feature": {
|
"feature": {
|
||||||
"feature": {
|
"feature": {
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
"type": "minecraft:weighted_state_provider",
|
"type": "minecraft:weighted_state_provider",
|
||||||
"entries": [
|
"entries": [
|
||||||
{
|
{
|
||||||
"weight": 5,
|
"weight": 2,
|
||||||
"data": {
|
"data": {
|
||||||
"Name": "roses_mod:cyan_rose_flower"
|
"Name": "roses_mod:cyan_rose_flower"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue