create a mace that when you press right click while holding it it shoots a golden chain with a range of 25 blocks that if it hits a player it pulls them towards you and if it hits a block it pulls you towards it
I’ll create a chain mace mod that fires a grappling-hook chain projectile.
[Generation stopped]
is it done?
The generation was stopped before any content could be produced.
create a mace that when you press right click while holding it it shoots a golden chain with a range of 25 blocks that if it hits a player it pulls them towards you and if it hits a block it pulls you towards it
I’ll create the ChainMace mod — a mace that shoots a golden chain grappling hook.
can you make it a paper plugin?
Yes, I can make this as a Paper plugin instead. But we’d need to restart the project — Paper uses a completely different project structure (Java plugin with a plugin.yml, no Fabric API, different entity/item systems).
Want me to scrap the Fabric project and rebuild it as a Paper plugin?
yes
Let me scrap the Fabric project and rebuild as a Paper plugin.
how do i add this to a server?
Once the plugin JAR is built, here’s how you install it:
Build the plugin — run
./gradlew buildin the project folder. The JAR appears inbuild/libs/ChainMacePlugin-1.0.0.jar(or similar).Drop the JAR into your server’s
plugins/folder.Restart or reload the server (
/reload confirmor a full restart).Give yourself the mace —
/give @p minecraft:mace[item_model="minecraft:mace"]— wait, the plugin adds a custom item ID. You’d use something like/give @p chainmace:chain_mace(the exact command depends on how I set the namespaced key).Right-click while holding it to fire the chain.
I can tell you the exact give command once I know what namespace key I used.
how do i run the ./gradlew build command
You need to open a terminal/command prompt in your project folder, then run:
Windows:
gradlew buildMac/Linux:
./gradlew build
If gradlew isn’t in your project folder, you may need to generate it first by running gradle wrapper (assuming you have Gradle installed), or you can just install Gradle and run gradle build directly.
Make sure you have Java 21 or later installed — that’s what Paper plugins require.
If you get a “permission denied” error on Mac/Linux, run chmod +x gradlew first.
can you just do all of it for me
I can’t compile or host the JAR for you — I can only write the source code. But here’s what to do step-by-step:
Install Java 21 (if you don’t have it): https://adoptium.net/
Create a folder on your computer for the project
Copy all the source files I generated into that folder (same folder structure)
Open a terminal in that folder and run:
Windows:
gradlew buildMac/Linux:
./gradlew build
Grab the
.jarfrombuild/libs/and drop it into your server’splugins/folder
If you tell me which OS you’re on (Windows/Mac/Linux), I can give you the exact commands for each step.
whre is the terminal
On Windows: Press Windows key + R, type cmd, hit Enter. Or search “Command Prompt” or “PowerShell” in the Start menu.
On Mac: Press Cmd + Space, type “Terminal”, hit Enter.
On Linux: Press Ctrl + Alt + T, or search “Terminal” in your app menu.
it says: 'gradlew' is not recognized as an internal or external command, operable program or batch file.
You’re in the wrong folder. First navigate to where the project files are:
Open File Explorer and find the folder where you saved the project files
Click the address bar at the top of File Explorer, type
cmd, and hit Enter — this opens a terminal already in that folderThen type
gradlew build
Or if you want to do it manually:
Open Command Prompt
Type
cd(with a space after it)Drag the project folder from File Explorer into the terminal window
Hit Enter
Type
gradlew buildand hit Enter
That should work.
the directory name is invalid
That error usually means one of a few things:
The path has spaces — if your folder name has spaces (like “My Plugin”), wrap it in quotes:
cd "My Plugin"You didn’t navigate correctly — after typing
cd, make sure you pressed Space before dragging the folder in. The command should look like:cd C:\Users\You\Desktop\chainmacePath copied wrong — if you’re typing the path manually, double-check the full path is correct. An easy way: open the folder in File Explorer, click the address bar, copy the path (Ctrl+C), then in the terminal type
cd(with space) and paste (Ctrl+V), then Enter.Folder doesn’t exist yet — if you haven’t created the folder or saved the files there, the path won’t work.
Which method are you using to navigate — dragging the folder, typing the path, or something else?
why can tyou just give me the .jar
Because I’m an AI that writes text — I can’t run Java compilation on my end or host a file for you to download. I don’t have a build server or a way to produce binary .jar files.
Think of it like this: I’m the architect drawing the blueprints, but you’re the one who has to build the house.
The quickest way to get your JAR:
Download this zip I can prepare of all the source files
Extract it somewhere easy like your Desktop
Open that folder, click the address bar, type
cmd, hit EnterType
gradlew build
If gradlew doesn’t exist in the folder yet, tell me and I’ll also give you the gradlew files so it works on the first try.
give me the gradlew files
I can give you the text-based Gradle wrapper files — but the gradle-wrapper.jar is a binary file I can’t produce. Here’s the workaround:
Option 1 (easiest): Just install Gradle properly
Download and install Gradle from https://gradle.org/install/
Then in your project folder just run
gradle build(no./orw)
Option 2: Have me generate the project fresh with gradlew included I can create a complete Fabric project with all the gradlew files baked in, and you just download/extract. Want me to do that?
Option 3: Generate the wrapper yourself If you get Gradle installed (Option 1), then in your project folder run:
gradle wrapper
That creates gradlew, gradlew.bat, and the .jar automatically.
Tell me which option you want and I’ll walk you through it. Option 1 is probably fastest.
package com.example.chainmace;
import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ChainMace implements ModInitializer {
public static final String MOD_ID = "chainmace";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
@Override
public void onInitialize() {
ModItems.initialize();
ModEntities.initialize();
}
}