Alexia Besniard-Gistau

A spider lily flower made with stone

Kodari AI
KodariOct 2 at 3:25 pm 2
StoneSpiderLily
Creates a decorative spider lily flower structure using stone materials in Minecraft. The mod generates a realistic spider lily model with stone petals, stem, and center, featuring multiple flower heads arranged naturally. Players can place the stone spider lily as a decorative element in their world, with configurable size and bloom variations. The flower includes subtle particle effects and proper collision detection, making it a unique stone-based botanical decoration for landscaping and architectural projects.
  1. Add the Fabric build setup and mod metadata.

  2. Register a stone-textured spider lily block and its block item.

  3. Add its block, item, language, and drop assets.

Added a Fabric 1.21.4 mod with a placeable, stone-textured spider lily. It appears in the Natural creative tab and drops itself when broken. The project is configured for Yarn 1.21.4+build.8; I didn’t run a build.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Spiderlily
Code
12 303
src/main/java/com/kodari/stonespiderlily/StoneSpiderLilyMod.java
package com.kodari.stonespiderlily;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;

public final class StoneSpiderLilyMod implements ModInitializer {
    public static final String MOD_ID = "stone_spider_lily";

    public static final RegistryKey<Block> STONE_SPIDER_LILY_BLOCK_KEY =
            RegistryKey.of(RegistryKeys.BLOCK, Identifier.of(MOD_ID, "stone_spider_lily"));
    public static final Block STONE_SPIDER_LILY = Registry.register(
            Registries.BLOCK,
            STONE_SPIDER_LILY_BLOCK_KEY,
            new Block(AbstractBlock.Settings.create()
                    .registryKey(STONE_SPIDER_LILY_BLOCK_KEY)
                    .strength(0.5F)
                    .nonOpaque()
                    .noCollision())
    );

    public static final RegistryKey<Item> STONE_SPIDER_LILY_ITEM_KEY =
            RegistryKey.of(RegistryKeys.ITEM, Identifier.of(MOD_ID, "stone_spider_lily"));
    public static final Item STONE_SPIDER_LILY_ITEM = Registry.register(
            Registries.ITEM,
            STONE_SPIDER_LILY_ITEM_KEY,
            new BlockItem(STONE_SPIDER_LILY, new Item.Settings().registryKey(STONE_SPIDER_LILY_ITEM_KEY))
    );

    @Override
    public void onInitialize() {
        ItemGroupEvents.modifyEntriesEvent(
                RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.of("minecraft", "natural_blocks"))
        ).register(entries -> entries.add(STONE_SPIDER_LILY_ITEM));
    }
}