- Fix generation probability

- Quilt-ify some things
This commit is contained in:
nelle 2023-06-15 02:54:58 -06:00
parent 16d63210de
commit c3746e4e15
7 changed files with 19 additions and 51 deletions

View file

@ -1,11 +1,10 @@
plugins {
id "com.modrinth.minotaur" version "2.+"
id 'maven-publish'
alias libs.plugins.quilt.loom
}
archivesBaseName = project.archives_base_name
version = "${project.version}"
version = "${project.version}+${libs.versions.minecraft.get()}"
group = project.maven_group
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
publishing {
publications {

View file

@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true
# Mod Properties
version = 3.0.0
version = 3.0.1
maven_group = xyz.limepot
archives_base_name = roses_mod

View file

@ -24,7 +24,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import xyz.limepot.roses_mod.world.gen.ModFlowerGeneration;
import java.util.Random;
import static xyz.limepot.roses_mod.world.gen.ModFlowerGeneration.*;
@ -70,22 +69,16 @@ public class RosesMod implements ModInitializer {
//CREATIVE TABS
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> {
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.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));
//LOOT TABLES
final Identifier ROSE_BUSH_LOOT_TABLE_ID = Blocks.ROSE_BUSH.getLootTableId();
LootTableEvents.MODIFY.register((resourceManager, lootManager, id, tableBuilder, source) -> {
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);
}
});

View file

@ -1,7 +1,8 @@
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 org.quiltmc.loader.api.ModContainer;
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 void onInitializeClient(ModContainer mod) {
//ROSE FLOWER
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.POTTED_ROSE);
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.ROSE_FLOWER);
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.POTTED_ROSE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.ROSE_FLOWER);
//CYAN ROSE
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.POTTED_CYAN);
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.CYAN_ROSE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.POTTED_CYAN);
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.CYAN_ROSE);
//CYAN ROSE BUSH
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.CYAN_ROSE_BUSH);
BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.CYAN_ROSE_BUSH);
}
}

View file

@ -1,15 +1,11 @@
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.gen.feature.PlacedFeature;
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"));

View file

@ -1,8 +1,8 @@
{
"type": "minecraft:flower",
"config": {
"tries": 64,
"xz_spread": 7,
"tries": 5,
"xz_spread": 4,
"y_spread": 3,
"feature": {
"feature": {
@ -12,7 +12,7 @@
"type": "minecraft:weighted_state_provider",
"entries": [
{
"weight": 5,
"weight": 1,
"data": {
"Name": "roses_mod:cyan_rose_bush"
}

View file

@ -1,8 +1,8 @@
{
"type": "minecraft:flower",
"config": {
"tries": 64,
"xz_spread": 7,
"tries": 24,
"xz_spread": 3,
"y_spread": 3,
"feature": {
"feature": {
@ -12,7 +12,7 @@
"type": "minecraft:weighted_state_provider",
"entries": [
{
"weight": 5,
"weight": 2,
"data": {
"Name": "roses_mod:cyan_rose_flower"
}