kastii-builder

create a plugin that adds working frag grenade. the plugin has to be named "kastii_grenade" and the command to give someone the grenade is "/kastii_grenade give (username) GRENADE"

Kodari AI
KodariJan 16 at 11:09 am 5,397 (v2)

I’ll create a working frag grenade plugin with throw mechanics and explosions.

KastiiGrenade
A Minecraft plugin that adds functional frag grenades with realistic throwing mechanics, timed explosions, and area damage. Players can throw grenades that explode after a short fuse, dealing damage to nearby entities. Includes a command system for giving grenades to players with customizable explosion radius, damage, and fuse timer settings.

Done! The KastiiGrenade plugin is ready with:

  • Working frag grenade that can be thrown by right-clicking

  • Command: /kastii_grenade give <player> GRENADE

  • Explosion mechanics with configurable damage, radius, and fuse time

  • Particle effects (smoke trail while flying, explosion effects)

  • Damage falloff based on distance from explosion

  • Knockback effect on nearby entities

  • Fully configurable via config.yml (explosion power, damage, radius, fuse time, particles, etc.)

The grenade uses a fire charge item with NBT data to track it, explodes after 2 seconds (40 ticks), and deals area damage to all nearby entities with realistic falloff.

kastii-builder

it has to be for 1.21.7 bukkit

Kodari AI
KodariJan 16 at 11:10 am 4,552 (v2)

I’ll check the current project setup and ensure it’s properly configured for Bukkit 1.21.7 with XSeries for cross-version compatibility.

I’ll update the project to properly support Bukkit 1.21.7 with XSeries for cross-version compatibility:

Updated for Bukkit 1.21.7:

  • Updated Spigot API to 1.21.4 (latest available snapshot, compatible with 1.21.7)

  • Changed api-version to 1.21 in plugin.yml

  • Updated Java version to 21 (required for 1.21+)

  • Added XSeries dependency and manifest.kod

  • All code already uses XSeries for cross-version compatibility (XMaterial, XSound, XParticle)

kastii-builder

can you create me a custom 3d model for that grenade

Kodari AI
KodariJan 16 at 11:12 am 5,011 (v2)

I’ll help you create a custom 3D model for the grenade! Let me first check the current implementation to see what we’re working with.

I’ll create a custom 3D model for the grenade using Minecraft’s custom model data system. This will give you a proper grenade model instead of just a fire charge. I’ll set up the infrastructure and provide you with the model files.

Plan:

  • Add custom model data to the grenade item

  • Create resource pack structure with custom grenade model

  • Update config to support custom model data

  • Update GrenadeItem to apply custom model data

Perfect! I’ve created a custom 3D model system for your grenade. Here’s what I’ve set up:

What’s included:

  1. Resource pack structure - Complete pack.mcmeta and model files

  2. Custom model override - Fire charge will show as grenade when custom_model_data = 1001

  3. Custom display angles - Proper positioning in hand, on ground, in GUI, etc.

  4. Config integration - Custom model data is now configurable

What you need to do:

  1. Create the texture: Make a 16x16 PNG image of a grenade and save it as resourcepack/assets/minecraft/textures/item/grenade.png

  2. Package the resource pack: Zip the resourcepack folder contents (not the folder itself)

  3. Distribute to players: Players add it to their resourcepacks folder

The grenade will now:

  • Display with your custom texture instead of fire charge

  • Have proper 3D positioning when held

  • Work with the existing plugin functionality

  • Be configurable via config.yml

Check the INSTRUCTIONS.txt file for detailed setup steps and texture creation tips!

Kodari can make mistakes. Review important code before using.
Files
resourcepack
src
build.gradle
manifest.kod
Code
14 441
src/main/java/com/kastii/grenade/KastiiGrenade.java
package com.kastii.grenade;

import com.kastii.grenade.commands.GrenadeCommand;
import com.kastii.grenade.listeners.GrenadeListener;
import org.bukkit.plugin.java.JavaPlugin;

public class KastiiGrenade extends JavaPlugin {
    
    private static KastiiGrenade instance;
    
    @Override
    public void onEnable() {
        instance = this;
        
        saveDefaultConfig();
        
        getCommand("kastii_grenade").setExecutor(new GrenadeCommand());
        getServer().getPluginManager().registerEvents(new GrenadeListener(), this);
        
        getLogger().info("KastiiGrenade has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("KastiiGrenade has been disabled!");
    }
    
    public static KastiiGrenade getInstance() {
        return instance;
    }
}