حسين العبودي حسين العبودي

Create a Fabric mod for Minecraft 1.21.1 using Java 21 called "Weird Chests". ​Important Requirements: ​All items must be actual Blocks with BlockEntities/GUIs, NOT Mobs/Entities. ​Compatible with Fabric API 1.21.1. ​Add 3 Custom Interactive Chest Blocks: ​Biting Chest: ​Functions as a storage block, but when opened or right-clicked by a player, it deals 2 points of damage (1 heart) to the player and plays a biting sound effect. ​Screaming Chest: ​Has a custom storage GUI. Whenever a player opens its GUI, it plays a loud, sudden scream sound effect at the chest's location. ​Crying Chest: ​Emits crying/water droplet particles around the block. When opened, it plays a soft crying sound effect. ​Include block registration, sound events, textures, and container GUIs for Fabric 1.21.1.

Kodari AI
KodariOct 19 at 6:38 pm 10
WeirdChests
Adds three custom interactive chest blocks to Minecraft. The Biting Chest deals one heart of damage and plays a bite sound when opened. The Screaming Chest plays a loud scream at its location whenever its inventory is accessed. The Crying Chest emits water droplet particles and plays a soft crying sound when opened. All blocks are fully functional storage containers with BlockEntities, custom GUIs, sounds, textures, and models, registered through standard Fabric API for version 1.21.1.
  1. Create a Fabric mod for the available Minecraft 1.21.4 source target (the requested 1.21.1 source is not mounted).

  2. Add three registered, craftable block-entity chests with storage screens, behavior, sound, and crying particles.

  3. Add each block’s texture, model, blockstate, recipe, and loot table.

Implemented Weird Chests for Minecraft 1.21.4. Each block has a persistent 27-slot storage GUI, a custom texture, a survival recipe, and a loot table; stored items spill when the block is broken.

  • Biting Chest: deals 2 damage and plays a bite sound when opened. Craft with a chest surrounded by rotten flesh.

  • Screaming Chest: plays a loud scream when opened. Craft with a chest surrounded by amethyst shards.

  • Crying Chest: emits tear particles and plays a soft whine when opened. Craft with a chest surrounded by lapis lazuli.

The chests are axe-mineable and appear in the Building Blocks creative tab. They use fitting vanilla sound events.

Version note: the available source and project setup target Minecraft 1.21.4, so this implementation targets 1.21.4 rather than the requested 1.21.1.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
32 568
src/main/java/com/kodari/weirdchests/WeirdChests.java
package com.kodari.weirdchests;

import net.fabricmc.api.ModInitializer;

public class WeirdChests implements ModInitializer {
    public static final String MOD_ID = "weirdchests";

    @Override
    public void onInitialize() {
        ModBlocks.initialize();
        ModBlockEntities.initialize();
    }
}