adyxor
📎 1 file 9,097 chars
📄
pasted-code-1786880247506.txt
txt 383 lines
▶
Here’s a more precise prompt for a **Minecraft custom sword**, specifically using **right-click** to activate the ability:

# Custom Minecraft Sword: Pocket Black Hole

Create a powerful legendary Minecraft sword with a unique ability called **Pocket Black Hole**.

The sword should feel like a rare end-game weapon based around **gravity, space, and a miniature singularity**.

## ⚔️ Sword

**Name:** `Voidreaver`

**Rarity:** Legendary

**Theme:** Cosmic / Void / Gravity

**Ability:** `Pocket Black Hole`

The sword should have a dark, mysterious appearance with black, purple, and cosmic effects.

---

# 🕳️ Pocket Black Hole

### Activation

When the player **right-clicks while holding the sword**, activate the Pocket Black Hole ability.

Do **not** require the player to throw the sword.

The ability should spawn the black hole at the location the player is looking at.

For example:

**Right Click → Target Location → Black Hole Appears**

The target location should be limited to a configurable maximum distance, such as **20 blocks**.

---

## 🌌 Black Hole Behavior

After activation, create a small black hole at the targeted location.

The black hole should remain active for exactly:

**5 seconds**

During those 5 seconds, it continuously creates a gravitational field that pulls nearby entities toward its center.

The black hole should visually look like a tiny **singularity**, with an extremely dark center surrounded by swirling purple/black energy.

---

# 🧲 Gravity System

The black hole should have a configurable maximum radius.

Recommended default:

**12 blocks**

Entities inside this radius should continuously be pulled toward the center.

The gravitational force should increase as entities get closer to the black hole.

### Suggested pull strength

**10–12 blocks:**
Weak gravitational pull.

**7–10 blocks:**
Moderate gravitational pull.

**3–7 blocks:**
Strong gravitational pull.

**0–3 blocks:**
Extremely strong pull toward the center.

Do not instantly teleport entities.

Instead, apply controlled velocity toward the black-hole center so the movement looks like an actual gravitational force.

Entities should visibly move toward the singularity.

---

# 👥 Entities Affected

The black hole should affect:

* Players
* Hostile mobs
* Passive mobs
* Neutral mobs
* Dropped items

Make these options configurable.

Example configuration:

```text
AFFECT_PLAYERS = true
AFFECT_MOBS = true
AFFECT_ITEMS = true
AFFECT_BOSSES = false
AFFECT_OWNER = false
```

The player who activated the ability should **not** be pulled into their own black hole by default.

Bosses and other special entities should optionally be immune.

---

# ⏱️ Duration

The Pocket Black Hole lasts for:

**5 seconds**

After 5 seconds, the black hole should collapse and disappear.

The collapse should have a dramatic visual effect where the surrounding particles rapidly move toward the center before the singularity vanishes.

---

# ⏳ Huge Cooldown

Because this ability can control multiple entities at once, give it a **very long cooldown**.

Recommended default:

## **10 minutes**

The cooldown should be configurable.

Possible values:

```text
5 minutes
10 minutes
15 minutes
30 minutes
```

The recommended default should be **10 minutes**.

The player must not be able to activate Pocket Black Hole again while the cooldown is active.

---

# 🚫 Cooldown Feedback

If the player attempts to right-click while the ability is on cooldown, do not create another black hole.

Instead, display a message such as:

> `✦ Pocket Black Hole is on cooldown!`

Then show the remaining cooldown:

> `⏳ Available again in 8m 42s`

Optionally play a short cooldown sound.

---

# ✨ Activation Effects

When the player right-clicks and successfully activates the ability:

1. Play a powerful activation sound.
2. Spawn dark-purple particles around the player's sword.
3. Create a small energy projectile/visual traveling toward the target location.
4. When it reaches the target, create the black hole.
5. Play a deep gravitational sound.
6. Begin pulling nearby entities toward the center.

The activation should feel powerful and rare.

---

# 🕳️ Black Hole Visual Design

The black hole should have multiple layers.

### Center

A tiny almost completely black sphere representing the singularity.

### Inner Ring

A rapidly rotating purple/dark-energy ring surrounding the center.

### Outer Ring

A larger particle vortex rotating around the black hole.

### Gravitational Particles

Particles should continuously travel **toward** the center.

This should create the visual impression that space itself is being sucked inward.

Use effects such as:

* Black/dark particles
* Purple particles
* Smoke
* Portal-like particles
* Energy sparks
* Small rotating particle rings

Avoid excessive particle spam that could cause server lag.

---

# 💥 Black Hole Creation Effect

When the black hole appears:

* Create a small expanding particle sphere.
* Play a deep impact/void sound.
* Spawn a short outward shockwave.
* Immediately transition into the stable black-hole effect.

The creation effect should take approximately **0.5–1 second**.

---

# 🌑 Active Black Hole

While active, the black hole should:

* Continuously rotate.
* Continuously pull entities inward.
* Spawn particles moving toward the center.
* Produce a subtle gravitational sound.
* Have a visible radius indicator using particles.
* Remain stationary at its original location.

The black hole should **not follow the player** after being created.

---

# 💀 Collapse Effect

After 5 seconds:

1. Stop the gravitational pull.
2. Rapidly accelerate surrounding particles toward the center.
3. Make the black-hole rings shrink.
4. Play a deep implosion sound.
5. Create a final burst of dark-purple particles.
6. Remove the black hole completely.

The collapse should feel like the singularity suddenly disappeared.

---

# ⚔️ Sword Appearance

The sword should look like it was forged from the **void itself**.

Suggested appearance:

* Dark black/gray blade
* Purple cosmic energy running through the blade
* Dark handle
* Purple glowing accents
* Small particles around the sword
* Subtle enchanted glow
* Cosmic/void-themed design

The sword should look powerful even when the ability isn't active.

---

# 📜 Sword Lore

Give the sword a clean, RPG-style lore:

```text
§5✦ §dVOIDREAVER

§8Forged beyond the edge of reality.

§7Ability:
§5» §dPocket Black Hole

§7Right-click to create
§7a miniature singularity.

§8Duration: §f5 Seconds
§8Cooldown: §f10 Minutes
```

---

# 🎯 Targeting System

When the player right-clicks:

* Raycast from the player's eyes.
* Find the block/entity location the player is looking toward.
* Place the black hole at the targeted position.
* Maximum targeting distance: **20 blocks** by default.
* Make the maximum distance configurable.

If the player is not looking at a valid location, place the black hole at the maximum valid position in front of them.

The black hole should preferably spawn on a safe location rather than inside an invalid block.

---

# ⚙️ Configuration

Make the following values configurable:

```text
ABILITY:
  cooldown: 600 seconds
  duration: 5 seconds
  radius: 12 blocks
  max_target_distance: 20 blocks

GRAVITY:
  outer_pull_strength: configurable
  inner_pull_strength: configurable
  max_pull_velocity: configurable

TARGETS:
  players: true
  mobs: true
  items: true
  bosses: false
  ability_owner: false

EFFECTS:
  particles: true
  sounds: true
  activation_effect: true
  collapse_effect: true
```

---

# ⚡ Performance

The ability must be optimized for multiplayer servers.

Do not create hundreds of unnecessary entities or particle objects.

Use controlled particle spawning and efficient entity detection.

The black hole should automatically clean itself up when:

* The 5-second duration expires.
* The server shuts down.
* The player disconnects.
* The ability is cancelled.
* An unexpected error occurs.

Never leave invisible or permanent black-hole objects behind.

---

# 🏆 Overall Gameplay Feel

The final ability should feel **extremely powerful but rare**.

The intended gameplay sequence is:

**Right Click → Black Hole Appears → Gravity Activates → Nearby mobs/items/players are dragged inward for 5 seconds → Massive Implosion → 10-Minute Cooldown**

The Pocket Black Hole should primarily be a **high-impact crowd-control ability**, not an instant-kill ability.

It should be visually impressive enough to feel like a **legendary end-game weapon**, while the huge cooldown prevents players from repeatedly spamming it.

The final result should make players feel like they are temporarily **controlling a miniature black hole**.
Kodari AI
KodariAug 16 at 11:39 am 2
VoidreaverBlackHole
A Bukkit plugin introducing the legendary sword Voidreaver with the Pocket Black Hole ability. Right-clicking the sword raycasts to a targeted location up to 20 blocks away and spawns a miniature singularity for 5 seconds. The black hole creates a gravitational field within a 12-block radius, pulling players, mobs, and items toward its center with increasing force based on proximity. Features configurable target options, particle-based visual effects with rotating purple energy rings, dramatic creation and collapse animations, and a configurable 10-minute cooldown with feedback messages. Optimized for performance with automatic cleanup and efficient entity detection.
  1. Create the Gradle/Bukkit project metadata and configurable ability settings.

  2. Add the Voidreaver item factory and /voidreaver distribution command.

  3. Add right-click activation, targeting, cooldowns, projectile travel, gravity, visuals, collapse, and cleanup handling.

  1. Created the Voidreaver Bukkit plugin with configurable Pocket Black Hole settings.

  2. Added the legendary sword item, custom lore, enchantment glow, persistent item identification, and /voidreaver command.

  3. Implemented right-click activation, target selection, projectile travel, cooldown feedback, gravity control, configurable entity targeting, particles, sounds, collapse effects, disconnect cleanup, and shutdown cleanup.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 541
src/main/java/com/kodari/voidreaver/VoidreaverPlugin.java
package com.kodari.voidreaver;

import com.kodari.voidreaver.ability.BlackHoleManager;
import com.kodari.voidreaver.command.VoidreaverCommand;
import com.kodari.voidreaver.item.VoidreaverItem;
import com.kodari.voidreaver.listener.VoidreaverListener;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class VoidreaverPlugin extends JavaPlugin {
    private BlackHoleManager blackHoleManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        VoidreaverItem voidreaverItem = new VoidreaverItem(this);
        this.blackHoleManager = new BlackHoleManager(this);

        Bukkit.getPluginManager().registerEvents(
                new VoidreaverListener(voidreaverItem, blackHoleManager), this);
        getCommand("voidreaver").setExecutor(new VoidreaverCommand(voidreaverItem));
    }

    @Override
    public void onDisable() {
        if (blackHoleManager != null) {
            blackHoleManager.shutdown();
        }
    }
}