📄
pasted-code-1794248350493.txt
txt
168 lines
▶
Act as an expert Minecraft Spigot/Paper Java plugin developer for Minecraft version 1.21.11.
I need a complete plugin called "BlazeSMP" with the following requirements:
1. LEVEL & DATA SYSTEM:
- Track player level (1 to 5) and assigned Path using PersistentDataContainer (PDC).
- Weighted Path assignment on first join: Bomb (>2%), Volcano (>5%), Ash (>10%), Fire/Soul Fire/Phoenix/Lava/Magma (equal share of remaining ~83%).
- Leveling framework:
- Lvl 1: Base Ability
- Lvl 2: Buffed Base Ability
- Lvl 3: Secondary Ability Unlocked
- Lvl 4: Permanent Passive Effects (Strength/Speed/Fire Res according to Path)
- Lvl 5: Ultimate Ability + Upgraded Secondary Ability
2. PATH SPECIFICATIONS:
- FIRE:
1. Fire Ring: 5-block radius area damage (2 hearts base, 1 heart iron, 0.5 dia/nether), 30s CD.
2. Buffs Fire Ring damage by +1 heart.
3. Fire Fists: Attacks bypass fire res, do fire damage, 10% chance on crit chain for 2x sword damage, 30s CD.
4. Permanent Passive: Strength I, Fire Resistance.
5. Fireball: 15s charge-up, leaves explosion crater, deals 6 hearts direct damage, increases Fire Fists double damage chance to 20%, 2m CD.
- SOUL FIRE:
1. Fire Ring: 7-block radius area damage (2.5 hearts base, 1.5 iron, 1 dia/nether), 25s CD.
2. Buffs Fire Ring damage by +1 heart.
3. Fire Fists: Fire damage, 15% chance on crit chain for 2.5x sword damage, 35s CD.
4. Permanent Passive: Strength I, Fire Resistance.
5. Fireball: 20s charge-up, explosion crater, 8 hearts direct damage to diamond, increases Fire Fists double damage chance to 25%, 2m CD.
- PHOENIX:
1. Wings: Allow temporary flight for 15s, deals 0.5 damage/sec to players underneath, 1m CD.
2. Flight lasts 30s, deals 1 heart damage/sec.
3. Fire Breath: Cone of fire for 5s dealing 5 hearts total on contact, 1m 30s CD.
4. Permanent Passive: Speed II.
5. Flapping Wings: 6x6 area in front deals 3 hearts/sec (pearlable), increases Fire Breath duration to 7s, 2m CD.
- LAVA:
1. Lava Ground: Lava rises from ground, deals 1 heart, 30s CD.
2. Deals 2 hearts.
3. Lava Grab: Roots nearest target in lava for 5s, damages armor durability, 1m 30s CD.
4. Permanent Passive: Strength I, Fire Resistance.
5. Lava Bubble: Unescapable bubble around target dealing 2 hearts/sec; increases Lava Grab duration to 7s, 2m 30s CD.
- MAGMA:
1. Magma Ground: 7x7 hot floor area dealing low tick damage.
2. Buffs Magma Ground damage.
3. Magma Grab: Roots nearest target for 7s, damages armor durability, 1m 20s CD.
4. Permanent Passive: Strength I, Speed I, Fire Resistance.
5. Magma Bubble: Unescapable bubble dealing 2.5 hearts/sec; increases Magma Grab duration to 9s, 2m 25s CD.
- ASH:
1. Ash Burn: 1.5x sword damage for 3s, 1m CD.
2. Ash Burn lasts 4s, 50s CD.
3. Ash Rip: Projectile beam dealing 6 hearts and freezing target for 0.5s, 1m 30s CD.
4. Permanent Passive: Strength I, Resistance I, Fire Resistance.
5. Ash Shield: 70% damage reduction bubble that explodes for 5 hearts in a 4-block radius when finished; increases Ash Rip freeze to 0.7s, 3m CD.
- VOLCANO:
1. Volcano Whirl: 5s spinning debris dealing 2 hearts, 1m CD.
2. Whirl lasts 7s.
3. Volcanic Movements: 50-block screen shake effect dealing 1 heart/sec for 10s, 1m 30s CD.
4. Permanent Passive: Strength I, Fire Resistance.
5. Volcano Eruption: Rapid spreading lava piercing Fire Res dealing 3 hearts/sec (escapable). Grants temporary Strength II, 3m CD.
- BOMB:
1. Bomb Fists: Weapon disappears, green glowing fists dealing Sharpness V Netherite damage, 1m 30s CD.
2. Reduces Bomb Fists cooldown to 1m 20s.
3. Radiation: 30-block zone infected with radiation dealing 3 hearts/sec (escapable), 1m CD.
4. Permanent Passive: Strength I, Speed I.
5. BOMB: Massive explosive strike dealing 9 hearts direct damage; increases Radiation radius to 40 blocks, 5m CD.
3. TECH SPECIFICATIONS:
- Use org.bukkit.persistence for data storage.
- Separate listeners, commands (/blazesmp level/set/roll), and ability managers into dedicated packages.
- Use BukkitRunnable tasks for particle effects, radius checks, and cooldown timers.
Write a complete Spigot/Paper Java Event Listener class for Minecraft 1.21.11 that implements abilities for 8 custom player paths: Fire, Soul Fire, Phoenix, Lava, Magma, Ash, Volcano, and Bomb.
Requirements:
1. Handle armor calculations manually for custom heart damage where specified (e.g. Fire Ring doing 2 hearts no armor, 1 heart iron, 0.5 diamond/netherite).
2. Use BukkitRunnable loops for ticking area effects (Radiation, Magma Ground, Lava Grab rooting, Screen Shake simulations using PotionEffectType.DARKNESS / NAUSEA).
3. Implement cooldown tracking using Map> to prevent ability spam.
4. Add particle displays (FLAME, SOUL_FIRE_FLAME, LAVA, CAMPFIRE_COSY_SMOKE, SMOKE) to visualize area effects like Fire Ring, Wings, Ash Shield, and Eruptions.
5. Provide clean API methods for checking player level (1-5) before executing specific ability tiers.
package com.blazesmp.plugin.abilities;
import com.blazesmp.plugin.BlazeSMP;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.Sound;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
public class AbilityTaskRunner {
/**
* Optimized Lava Ground Ability Loop
* Pulses every 10 ticks (0.5 seconds) for a specified duration.
*/
public static void startLavaGroundTask(Player caster, Location center, int durationSeconds, double radius, double damage) {
new BukkitRunnable() {
private int elapsedTicks = 0;
private final int maxTicks = durationSeconds * 20;
@Override
public void run() {
// Cancel task when duration expires or caster disconnects
if (elapsedTicks >= maxTicks || !caster.isOnline()) {
this.cancel();
return;
}
// Spawn particles to outline the area (client-side visualization)
center.getWorld().spawnParticle(Particle.LAVA, center, 15, radius, 0.2, radius, 0.0);
center.getWorld().playSound(center, Sound.BLOCK_LAVA_AMBIENT, 0.5f, 0.8f);
// Spatial query: Only fetch entities within the bounding box (much faster than global loops)
for (org.bukkit.entity.Entity entity : center.getWorld().getNearbyEntities(center, radius, 2.0, radius)) {
if (entity instanceof LivingEntity target && entity != caster) {
// Apply damage and fire ticks
target.damage(damage, caster);
target.setFireTicks(60); // 3 seconds of fire
}
}
elapsedTicks += 10; // Increment by our task period
}
}.runTaskTimer(BlazeSMP.getInstance(), 0L, 10L); // Runs every 0.5 seconds
}
/**
* Optimized Radiation Zone Ability Loop (Bomb Path 3)
* Creates a large pulsing aura that damages targets inside the radius.
*/
public static void startRadiationTask(Player caster, double radius, double damagePerSecond, int durationSeconds) {
new BukkitRunnable() {
private int elapsedTicks = 0;
private final int maxTicks = durationSeconds * 20;
@Override
public void run() {
if (elapsedTicks >= maxTicks || !caster.isOnline()) {
this.cancel();
return;
}
Location loc = caster.getLocation();
// Visual feedback: Green smoke / ash representation for radiation
loc.getWorld().spawnParticle(Particle.HAPPY_VILLAGER, loc.clone().add(0, 1, 0), 30, radius, 1.0, radius, 0.0);
// Check entities in the radius
for (org.bukkit.entity.Entity entity : loc.getWorld().getNearbyEntities(loc, radius, radius, radius)) {
if (entity instanceof LivingEntity target && entity != caster) {
// Scale damage per tick (since this runs every 10 ticks, apply half the per-second damage)
double tickDamage = damagePerSecond / 2.0;
target.damage(tickDamage, caster);
// Optional: apply nausea or darkness effect to simulate radiation sickness
target.setFreezeTicks(40);
}
}
elapsedTicks += 10;
}
}.runTaskTimer(BlazeSMP.getInstance(), 0L, 10L);
}
}
I’ll build the eight paths around PDC-backed player data, tier-checked abilities, cooldowns, and scheduled effects. I’ll also add commands to activate abilities and administer levels and paths.
Created BlazeSMP with PDC-backed paths and levels, weighted assignment, cooldowns, passives, and all eight paths’ abilities.
Use /blazesmp use <base|secondary|ultimate> to activate abilities. Operators can use /blazesmp set <player> <level|path> <value> and /blazesmp roll [player].
Some unspecified durations and ranges use defaults. Lava areas are particle effects rather than placed lava, and Bomb Fists changes attack damage without hiding the weapon.
make a texturepack that links with this plugin and uses this pasted code
📄
pasted-code-1794248977361.txt
txt
19 lines
▶
Act as an expert Minecraft Paper plugin developer (Version 1.21.11). I am developing a private SMP called "BlazeSMP". Here is the current architecture and feature set of the plugin and resource pack we are building:
1. CORE SYSTEMS & DATA:
- Platform: Paper 1.21.11 (Java)
- Storage: PersistentDataContainer (PDC) on players for tracking Level (1-5) and assigned Path.
- First-Join Weighted Roll: Bomb (>2%), Volcano (>5%), Ash (>10%), Fire/Soul Fire/Phoenix/Lava/Magma (equal share of remaining ~83%).
2. 8 PATHS & LEVEL PROGRESSION (1-5):
- Tiers: Lvl 1 (Base ability), Lvl 2 (Buffed base), Lvl 3 (New path ability), Lvl 4 (Permanent passives: Strength/Speed/Resistance/Fire Res based on path), Lvl 5 (Ultimate ability + upgraded secondary).
- Paths: Fire, Soul Fire, Phoenix, Lava, Magma, Ash, Volcano, Bomb (deadliest, e.g., Bomb Fists, Radiation zone, 9-heart BOMB ultimate).
3. PERFORMANCE & OPTIMIZATION (BukkitRunnable):
- AoE and Ticking Abilities (e.g., Lava Ground, Radiation): Must be optimized using throttled BukkitRunnable tasks (running every 10 ticks / 0.5s) and spatial bounding box lookups (`getNearbyEntities`), avoiding global player/entity loops to prevent TPS drops. Always check player online status to prevent memory leaks.
4. RESOURCE PACK & HUD INTEGRATION:
- Custom Unicode Font Mapping (`assets/minecraft/font/default.json`): Uses bitmap font providers mapping to private use characters (e.g., \uE001 for ready box, \uE003 for cooldown box, \uE002 for vertical divider lines).
- Action Bar HUD: A repeating task updates the player's action bar with the 3 ability boxes, divider lines, and live numerical text cooldown timers (e.g., `[Box1 5s] | [Box2 READY] | [Box3 12s]`).
Please keep this context in mind as we continue building, coding, or expanding specific mechanics for the BlazeSMP plugin.
Kodari doesn’t currently create resource or texture packs, so it can’t build the pack requested for BlazeSMP.
for bomb's ultimate, make it so it leaves an explosion hole
Bomb’s ultimate already creates a strength-5 explosion with block breaking enabled, so it can leave a crater. Server protection plugins or explosion settings may prevent block damage.
for bombs secondary, make the particles more dense and appear more, basically a cloud of particles
Thicken the radiation cloud and refresh it twice as often.
Keep its damage at the current once-per-second rate.
Bomb’s Radiation now produces a denser particle cloud that refreshes twice as often. Its damage rate is unchanged.
do the same with fires base ability
Add a dense, briefly lingering flame cloud to Fire Ring.
Keep its damage and cooldown unchanged.
Fire Ring now produces a dense flame cloud for two seconds. Damage and cooldown are unchanged.
and soul_fire too
Add the same two-second cloud to Soul Fire Ring, using soul fire particles.
Leave damage and cooldown unchanged.
Soul Fire Ring now produces the same dense, two-second cloud using soul fire particles. Damage and cooldown are unchanged.
now, when ever a new player, who has never played before joins, make them automatically roll a path. tell them what they got with a command, heres the commands: /title [player] title You then go to /title [player] title Got and then finally /title [player] title [path]
Keep the existing weighted first-join roll.
Show “You”, “Got”, then the assigned path as sequential titles for new players.
New players receive a weighted path roll on first join, followed by the titles You → Got → [Path]. Returning players keep their existing path.
for the fire ring and the (in the soul fire path) fire ring , make it last for 10 seconds. and for fire fists and (in the soul fire path) fire fists, last 5 seconds
Extend both Fire Ring effects to 10 seconds.
Limit both Fire Fists effects to 5 seconds.
Fire and Soul Fire Ring particle clouds now last 10 seconds. Ring damage still applies once on activation.
Both Fire Fists effects now last 5 seconds.
package com.blazesmp.plugin;
import com.blazesmp.plugin.abilities.AbilityManager;
import com.blazesmp.plugin.commands.BlazeCommand;
import com.blazesmp.plugin.data.PlayerData;
import com.blazesmp.plugin.listeners.PlayerListener;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class BlazeSMP extends JavaPlugin {
@Override
public void onEnable() {
PlayerData data = new PlayerData(this);
AbilityManager abilities = new AbilityManager(this, data);
Bukkit.getPluginManager().registerEvents(new PlayerListener(this, data, abilities), this);
Bukkit.getPluginManager().registerEvents(abilities, this);
getCommand("blazesmp").setExecutor(new BlazeCommand(data, abilities));
Bukkit.getOnlinePlayers().forEach(data::initialize);
abilities.startPassives();
}
}