Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • BACK TO SCHOOL

    📚 Back to School Sale ✏️

    Start the new school year with an exclusive 25% OFF on all Monthly Ranks 🎓

    Use coupon code:

    SCHOOL26

    🎒 Limited time offer — Get ready for the new school year!

    💡 New! We've also launched a new MCPE Premium Rank with 500+ resources already available.
    Check it out and start the school year with even more resources! 🚀
    🎓 Keep your subscription active and enjoy the same discount every month!
    Get Your Rank 🎒🚀
    ```
✯ Custom Enchantments 3 - RPG ✯ [ALL IN ONE PLUGIN!]

Plugins MC ✯ Custom Enchantments 3 - RPG ✯ [ALL IN ONE PLUGIN!] 1.7.1

Register to download
Hi guys. Security patch. I sat down and read through the plugin looking for ways a player could get something they should not, and for work the server was doing for no reason. Found a few of both. This release is those fixes and nothing else.

No new enchantments, no new treasures. Still 159 enchantments and 149 treasure items and none of them changed. No new config keys.

Tested on Minecraft 26.2. Please back up your plugins/CustomEnchantments3 folder before updating, as always.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Read this first

Update this one.
Two of the fixes below close off ways to make RACO and enchantment books out of nothing. If you run an economy, do not sit on this.

Your config carries over, and this time it actually does. On the first start after updating the plugin rewrites config.yml and saves the old one as config.yml.old, same as before. The difference is what it keeps. Details in the config section, but the short version is: if you ever set ShopGUIBackColor, CustomEnchantsWorld or one of the RACO priced enchantments like BlackHole: 750C and found them back at the default after an update, that was the plugin, not you. Set them once more after this update and they will stay set.

Nothing else changed. Player data, RACO balances, shop listings, quests, the resource pack, every enchantment and every price are untouched. The resource pack does not need re-downloading.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Security

RACO shop listings with a negative price.
/ce shop sell took any number, including a negative one. A listing at a negative price paid the buyer instead of charging them, and pushed the seller below zero. With a second account that is RACO from nothing, as much as you want. The price now has to be a whole number from 1 up to the currency supply, and a listing already saved with a bad price cannot be bought by anyone. The owner can still take it down.

Enchantment books that were not used up. Right-click a book, then right-click the item, and the book is supposed to be consumed. It was only removed if it was still sitting where the plugin expected, and there were a few ways to move it somewhere else in the fifteen seconds between the two clicks without the plugin noticing. The enchantment still applied. One book, as many items as you liked. The book now has to be in your inventory at the moment the enchantment is applied, and exactly one is taken from it. If it is not there, nothing happens and you get a message saying so.

Heist was minting coin. A level 3 Heist steals 6 RACO. Against a player holding 1, it took the 1 and still paid the attacker 6. It takes what the victim has now, and nothing more.

/ce currency pay with zero or a negative amount told both players a payment went through when nothing had moved, and paying yourself was a real buy and sell against the market for no reason. Both are refused now, with a message. Same for the admin add and deduct.

Skill points spent from the wrong screen. Any item named after a skill, clicked in any inventory, spent a point. An anvil and a chest was all it took. Purchases only count from the skill tree now.

Dragging items into plugin screens. Clicks were always cancelled in the shop, exchange, skill tree and class screens, but a drag was not. Drag a stack onto an empty slot of a shop page and it went into the page, which is one shared screen for the whole server, and stayed there. Drags into any plugin screen are cancelled now. The disenchant screen still accepts your item, it is the one that is supposed to.

Broken enchantment data on an item threw an error out of every listener that looked at the item, which on a sword meant every hit. It takes one NBT edit to make one. Bad data now reads as no enchantments.

Two small ones. The admin name check against authorization.yml was case sensitive in one of the two places it is done and not in the other. And the update check an op gets on join was started fresh every time they joined and never stopped, so a busy admin was running a stack of them.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Config.yml

The updater used to read your old config.yml one line at a time and guess the type of each value. It knew numbers and true/false. A word like white, a list like the CustomEnchantsWorld worlds, or a price like 750C did not fit either, so the value was skipped and the fresh default was left in place, while the log said the config had been updated. Every update since that code was written has been quietly resetting those three kinds of settings.

I checked this on a live 26.2 server before writing it here: 1.7.0 kept an EnchantLimit of 7 across the update and reset a black shop background, a two world list and a 999C Black **** to defaults. 1.7.1 keeps all of them.

The updater now reads the old file as YAML, writes the new one, and copies every setting across with its type intact. Comments in the file are kept. The version line always comes from the new file. Nothing is guessed.

If you customised one of those three kinds of settings in the past and lost it, it is not coming back on its own, the old value is gone. Open config.yml.old from the last update you did if you want to see what you had.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Optimizations

None of this changes a number a player sees.

The mana loop was running for every player who had ever joined. Once a second, the plugin walked its whole player file, every account it had ever seen, worked out their regen, and asked the server whether each one was online. On a server that has been up for a year that is thousands of lookups a second for people who are not there. It walks the online list now. Players still get the mana they would have regenerated while logged out, it is added the moment they log back in instead of a bit at a time while they are gone.

Every inventory click was building a currency exchange screen. The click handler for the exchange asked for the player's exchange screen to see if the click belonged to it, and asking created one if they did not have it, along with a once a second refresh task that redraws the wallet, the price and the candlestick chart. Open a chest once and you had that task for the rest of your session. It only looks now, and only builds the screen when you actually open the exchange.

Enchantment data is parsed once per item, not once per read. The enchantments on an item are stored as a small piece of text, and that text was parsed fresh every time anything looked at the item: every armour piece every second, every inventory scan, every hit. Parsed results are kept and reused. Across a whole server there are only as many distinct texts as there are enchantment combinations.

RACO transfers were a loop. Paying 5,000 RACO moved the price and wrote the balance 5,000 times. It is one calculation now, and it lands on exactly the same price the loop did, there is a test that pins that.

The boundary preview drew the inside of the box. /ce settings protection add shows the boundary in particles. It got the six faces by visiting every block in the volume and checking which face it was on, eleven times. A spawn sized boundary was tens of millions of checks on the main thread. It visits the faces now, and thins out the particles on a huge box so it costs the same whatever the size.

The tutorial timer moved off its own thread. It was reading a list the main thread writes to, from another thread. That is the kind of thing that works for months and then throws once, at the worst time.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Compatibility

- No NMS, still 1.16.4 through 26.2
- No new config keys, no player data, shop, quest or resource pack changes
- Every 1.7.0 enchantment, treasure, price and setting is untouched
- Lite gets every fix in this post
- Four new messages in lang.yml, added on first start, your translations are kept
Update 1.7.0

Hi guys. This one is about how the plugin behaves next to everything else on your server, and what it costs you to run.

Three things: Epic Mobs Rework mobs can now use your CE3 enchantments properly, PlaceholderAPI is supported on both editions, and combat is meaningfully cheaper than it was in 1.6.1.

No new enchantments and no new treasures. Still 159 enchantments and 149 treasure items, all of them unchanged.

Tested on Minecraft 26.2. Please back up your plugins/CustomEnchantments3 folder before updating, as always.

Read this first
Your config carries over.
On the first start after updating, the plugin rewrites config.yml and keeps every value you had set, saving the old file as config.yml.old. One key was added, PlaceholderAPISupport, and it defaults to on.

Nothing else changed. Player data, RACO balances, shop listings, quests, the resource pack and every 1.6.x enchantment and treasure are untouched. The resource pack does not need re-downloading. No enchantment was rebalanced and no price moved.

You do not need any other plugin. Epic Mobs Rework and PlaceholderAPI are both optional. Without them the plugin runs exactly as it did before.

Epic Mobs Rework
If you run Epic Mobs Rework, an Epic Mob carrying a CE3 enchanted weapon could already be given that weapon, and Epic Mobs already read the enchantments on it correctly. What it could not do was make them behave like themselves. A mob with a Bleed sword dealt a bit of extra magic damage; it did not make you bleed. Every enchantment on every mob weapon felt the same.

That is what this release fixes. CE3 now lets Epic Mobs say "run Bleed, from this mob, against this player", and the player bleeds exactly the way they would from another player's Bleed sword. Execute scales off your missing health. Rimefang chills you. It is the same code that runs when a player swings, not a second copy of it, which matters more than it sounds: two versions of Bleed would drift apart within one update and the wrong one would be the one you reported.

Epic Mobs loot tables can also name a CE3 treasure or a CE3 enchantment book now. Those entries have been in Epic Mobs since 1.0 and have never been able to produce an item, because there was no way for it to ask CE3 for one by name. There is now. A book from a mob's loot table is the same book the shop sells, texture and all.

You do not need to configure anything. If you run both plugins, it is on.

One thing to know: the Epic Mobs side of this needs an Epic Mobs release too. Until that lands, an Epic Mob on a 1.7.0 server behaves the way it does today. Nothing gets worse and nothing breaks in the meantime; CE3 has opened the door and Epic Mobs has to walk through it.

If Epic Mobs never spawns in one particular region, that is still CE3's protected boundary list rather than an Epic Mobs setting. Check /ce settings protection list first.

PlaceholderAPI
Supported on both Premium and Lite. Nothing about seeing what the plugin is doing is a premium feature.

The player placeholders are the ones you would expect, and they go anywhere PlaceholderAPI works: a scoreboard, a hologram, a chat format, a tab list.


Code (Text):
%ce3_level% the CE3 level, not the vanilla one
%ce3_class% WARRIOR, ARCHER, WIZARD or NONE
%ce3_mana% and %ce3_max_mana%, %ce3_mana_percent%
%ce3_raco% their RACO balance
%ce3_skill_strength% and any other skill by its own name
%ce3_enchant_bleed% the level on what they are holding
%ce3_edition% PREMIUM or LITE
There are more, and the full list is in the documentation.

The ones for when something is wrong
This is the part I actually built it for.

When a server runs badly and someone points at a plugin, there has never been a good way to check whether they were right about this one. A profiler will tell you that a Custom Enchantments 3 damage listener is expensive, which is true and useless: that listener is thirty enchantments and a whole defence pass, and knowing which part is costing you is the entire question.

So the plugin now times itself, and publishes it:


Code (Text):
%ce3_perf_melee_tick% what share of a server tick combat is costing
%ce3_perf_melee% average milliseconds per hit, last five minutes
%ce3_perf_melee_peak% the worst single hit since the server started
%ce3_perf_melee_calls% how many hits that is
Eight areas are measured this way: melee, projectile, passive, treasure, magnetic, status, shop and mining. Put the _tick ones on a scoreboard and you can watch them for an hour rather than guessing from a thirty second profile.

_tick is the number to look at. Milliseconds on their own are misleading, because half a millisecond is free once a second and is your entire tick budget a hundred times a second. The share is the version you can compare against anything else.

No PlaceholderAPI? /ce perf prints all of it in chat, admin only, with the expensive rows coloured. /ce perf reset starts the counters again.

Measuring this costs effectively nothing, so it is always on. There is no point in a diagnostic you have to remember to switch on before the lag spike you are trying to explain.

Optimizations
Combat got noticeably cheaper. None of this changes a single number a player sees.

A single hit used to read the same sword about thirty times. The plugin runs about thirty enchantment handlers against every hit, and each of them independently looked up what you were holding, which means reading the item's hidden data and parsing it. They share one lookup now.

And the same armour about ninety times. Same shape of problem on the defending side, with about twenty handlers each reading all four armour pieces for itself. Also one lookup now, shared.

Most items in your inventory can't be enchanted, and the plugin now notices sooner. Every inventory scan used to make a full copy of each item's metadata before discovering there was nothing on it. Cobblestone, food, arrows: it now skips them without the copy. This one helps everywhere, not just in combat.

Magnetic was pulling twice. If you carried two magnetic tools, the pull ran once for each of them, four times a second, each sweeping its own radius. It looked identical and cost double. Now the strongest one pulls, once.

Protected boundaries are checked faster, which matters because that check runs on every hit and every mob spawn.

Two console lines per player are gone. The plugin wrote to your log every time it cached a player, from inside combat, and neither line told you anything you could act on. If you want that number it is on /ce perf.

Compatibility
  • No NMS, still 1.16.4 through 26.2
  • One new config key, PlaceholderAPISupport, defaulting to on
  • No player data, shop, quest or resource pack changes
  • Every 1.6.x enchantment, treasure, price and setting is untouched
  • Lite builds and behaves as before, and gets PlaceholderAPI and /ce perf too
  • PlaceholderAPI and Epic Mobs Rework are both optional and neither is bundled
Update 1.6.0

Hi guys. 1.5.0 was the release that filled the plugin up. This one is about the economy: Custom Enchantments 3 now works alongside Kumandra's Economy, so RACO and Kumandra currency can be spent on each other, plus there are 25 new enchantments and 15 new treasure items.

Enchantments go from 134 to 159. Treasure items go from 134 to 149.

Tested on Minecraft 26.2. Please back up your plugins/CustomEnchantments3 folder before updating, and let me know if anything acts up in the discussions page.

Read this first
Your config carries over.
On the first start after updating, the plugin rewrites config.yml with the new keys and keeps every value you had set, saving the old file as config.yml.old. Prices, rates and toggles all survive.

You do not need Kumandra's Economy. Custom Enchantments 3 is still standalone and runs exactly as it did in 1.5.0 without it. Everything in the next section only turns on when both plugins are installed. If you do not want it even then, set KumandraEconomySupport: false.

Kumandra's Economy 2.1 or newer is recommended. 2.0 works and is what this was built and tested against. Anything older than 2.0 is detected and the integration stays off, because the older API cannot pay an offline seller safely.

Nothing about RACO changed. The supply, the price curve, the CLVL exchange and every existing shop all behave exactly as they did.

Kumandra's Economy support
If you run both plugins, your players can now pay for RACO priced things with Kumandra currency, and swap between the two currencies.

The important part: Kd never becomes RACO out of thin air. RACO has a hard supply cap of 1,250,000 and Kumandra money does not have a cap at all, so the two cannot just be added together. When somebody pays with Kd, the plugin buys RACO for them out of the same circulating supply the CLVL exchange draws on, and then spends that RACO the normal way. Which means:

  • If your RACO supply has run dry, the Kd payment is refused and the Kd is given back. Your currency does not inflate.
  • Somebody selling in the RACO shop gets paid in RACO, whatever the buyer paid with.
  • Your existing economy numbers still mean what they always meant.
Where Kd can be spent:

  • The RACO shop, when the buyer is short on RACO
  • Enchantment books you have priced in RACO (the ones ending in C)
  • The new conversion buttons in the currency exchange screen
  • Cofferguard, the new chestplate enchantment that spends a coin to soak a hit
A player holding enough RACO always spends the RACO. Kd is a fallback, never the default. Nobody's Kumandra balance gets quietly spent while they were sitting on the plugin's own currency.

The settings:

Code (Text):
KumandraEconomySupport: true # master switch
KumandraExchangeRate: 25.0 # Kd per 1 RACO
KumandraConversionFee: 0.05 # 5%
KumandraShopPayment: true
KumandraEnchantPayment: true
KumandraConversionEnabled: true

The fee comes off the proceeds when converting RACO to Kd, and goes on top as a surcharge when paying with Kd, so holding RACO is always slightly better than paying in the foreign currency. Set it to 0 if you would rather it were a straight rate.

The currency exchange screen has a new bottom row: buy 1, 5 or 10 RACO with Kd on the left, sell the same amounts on the right, and the live rate and fee in the middle.

25 new enchantments
7 for weapons, 2 for tridents, 3 for bows, 4 for wands, 6 for armor, 3 for tools. A few of them to give you the shape of it:

Tallyscar (sword, spear) marks the enemy rather than tracking your streak, so the marks stay on them if you look away, several people can pile them onto the same target, and the fifth mark bursts the whole tally at once.

Ledgerburn (sword, mace) hits harder the more health you are missing, topping out at 70% missing so you do not have to sit on one heart to get anything from it.

Knucklebone (mace) is a gamble every swing. Most rolls are a small bonus, about one in twelve is a big one, and a low roll takes a quarter off the hit. It comes out ahead on average at every level.

Voidtithe (wand) takes a slice of the target's current health, so it is at its best as an opener and weakest as a finisher. A third of it comes back to you as mana. Capped at 12 magic damage so it cannot delete a boss in one cast.

Cofferguard (chestplate) spends one RACO to absorb up to 60% of a heavy hit. It only fires on hits worth paying for, so it will not empty your wallet on chip damage in a mob farm, and an empty wallet just means an ordinary chestplate.

Vaultskin (any armor) takes a flat amount off every hit instead of a percentage. Tank and Magic Resist are what you want against one enormous blow; this is what you want when you are being pecked to death.

Coinvein (pickaxe), Titherow (hoe) and Dredgeline (fishing rod) pay out in coin as you work. They move currency out of the supply rather than creating it, so they cannot inflate your economy, and they stop paying if the supply runs dry. Titherow only counts fully grown crops, so nobody can farm seedlings for money.

The rest: Coinbite, Gallowswing, Rimefang, Saltspine, Harpoonwake, Brinelash, Tollshot, Ravenquill, Splintervolley, Embertoll, Starvein, Glyphwrack, Ironvow, Paleward, Tombstride and Wardenknot.

All of them are priced in config.yml like everything else, and any of them can be disabled by setting the price to 0.

15 new treasure items
Pirate flavoured, and they slot into the same weighted drop table 1.5.0 introduced.

Doubloon of the Drowned Mate, Bosun's Cracked Whistle, Krakenbone Fishhook, Marooner's Split Compass, Powder Monkey's Tinderbox, Gibbet Cage Key, Salt Rimed Spyglass, Quartermaster's Short Straw, Bilge Rat Skull, Letter of Marque (Unsigned), Scuttler's Auger, Wreckwood Splinter, Cutthroat's Wedding Ring, Dead Man's Chest Hasp, and the Black Spot Token, which is Legendary and correspondingly rare.

The treasure catalogue has a sixth page for them.

Resource pack
Updated, with 15 new textures. Please re-download it if you use it, otherwise the new treasures show as plain gold nuggets and coal.

Same six client range downloads as before, 1.16 through 26.2.

One thing worth knowing, and it is not new: the 1.16 to 1.19 packs cannot show treasures added in 1.5.0 or 1.6.0, because those client versions use an older model format the pack does not carry for them. They show as their base vanilla item instead. Everything from 1.21 up is fine.

Fixes
You can take your own RACO shop listing back down again.
Before this, if you listed an item and then spent your RACO, the shop told you that you could not afford your own item. Taking a listing down was never supposed to cost anything and now it does not.
Update 1.5.0

Hi guys, this is the big one. 1.4.0 was the release that made the plugin fast, and
it deliberately added nothing. This one is the opposite: 76 new enchantments and
100 new treasure items, which more than doubles both.

Enchantments go from 58 to 134. Treasure items go from 34 to 134.

There are four new systems in here as well: bandit camps on loot plots, 25 quests
that ship ready to hand out, a price chart in the currency screen, and a switch for
how the magic wand comes off the crafting bench.

Tested on Minecraft 26.2. Please back up your `plugins/CustomEnchantments3` folder
before updating, and let me know if anything acts up in the discussions page.

## Read this first

**Your config carries over.** On the first start after updating, the plugin
rewrites `config.yml` with the new keys and keeps every value you had set, saving
the old file as `config.yml.old`. Prices, rates and toggles all survive.

**Two treasure stats start doing something.** `physical_dmg` and `physical_def`
have been written onto treasure items and shown in their lore since the feature
shipped, and nothing ever read them back. They reach the damage code now. If you
would rather they stayed decorative, set `TreasurePhysicalDamageCap: 0` and
`TreasurePhysicalDefenseScale: 0`.

**And a third one gets a ceiling.** `magical_dmg` always worked, but it is summed
across everything you carry and had no cap, so a stack of one treasure was unlimited
magic damage. `TreasureMagicalDamageCap` defaults to 6.0. Set it to `0` for the old
uncapped behaviour.

**Treasure drops are weighted now.** Which treasure you get used to be a flat
random pick. That was fine at 34 items. At 134 it would make the best item in the
game exactly as likely as a Dried Fish, so there are five tiers with weights you
control from config.

## 76 new enchantments

23 for tools, 30 for weapons, 23 for armor. A few of them, to give you the shape of
it:

**Tools.** Widebore mines a 3x3 two blocks deep. Quarryjack builds up haste the
longer you keep digging without stopping. Kilnfire drops ore already smelted.
Scytheswing harvests the whole row of crops at once. Drillseed replants the row
behind you. Sifting Hands pulls something worth having out of gravel and sand, very
occasionally a treasure item. Hairsbreadth stops your tool at one durability
instead of letting it break. Ironmonger makes it cheaper at the anvil.

**Swords, spears and maces.** Grudgework stacks bonus damage the longer you stay on
one target. Bloodtithe costs you a heart per swing and pays back far more. Ironjaw
guarantees a floor of damage that no amount of defence can stop. Ribcracker turns
your fall distance into a mace hit. Lancework also strikes whoever is standing
behind them. Skullsplit occasionally leaves the head.

**Bows.** Quiverburst fires two extra arrows every few shots. Tetherline ties the
target to the spot it was hit. Ashfletch leaves a blinding cloud where it lands.
Longdraw rewards holding the shot past full draw. Marrowshot ignores part of their
magic defence.

**Tridents.** Tidewrack leaves a whirlpool that pulls everything in. Stormhook drags
the target back to you. Skipstone ricochets off a wall into the nearest enemy.

**Wands.** Eight new spells. Chainarc is a bolt that jumps between targets, losing
strength each jump. Gravewell opens a patch of ground that drains them and heals
you, capped so it cannot be farmed. Mirrorstep swaps you with whatever you are
looking at. Cindershroud reduces your damage taken and sets melee attackers alight.
Hushfall takes away a target's abilities without touching their health. Emberwake,
Glasswind and Sundial round it out.

**Armor.** Deadweight refuses knockback, levitation and pulls, and at level 3 it
refuses the ones other CE enchantments cause too. Slagplate converts part of the
physical damage you take into magic damage, which is only good if you have built
magic defence. Backdraft throws everything off you when a big hit lands. Wardweave
adds maximum mana per piece. Sprintwell refills mana while you run. Ripostewall
sends blocked damage back through the shield.

Two new item classes came with this, so **shovels and fishing rods can carry
enchantments now**.

Every one of them is a config line. Set a price to `0` and it disappears from your
server completely, same as always.

## 100 new treasure items

Carrying one is enough, there is nothing to equip. They give mana regen, cooldown
reduction, defence, damage, health regen, XP multipliers and RACO on kill.

Every one is new art: a 16x16 sprite drawn for this release, its own name, its own
flavour line and its own stat block. No two of them share an effect.

They run across five themes so the list does not read as one long pirate joke.
Pirate call signs like Bosun Whistle and Marooners Coin. Elemental pieces like
Rimefang and Solar Filament. Relics like Oathring and Throne Fragment. Oddities
like Backward Compass, Jar of Held Breath and Knot That Unties Itself. Cursed
things like Nine Fingered Glove and Heart of the Deep Wreck.

The drop table, with the default weights:

| Tier | Items | Chance of one specific item per loot roll |
| --- | --- | --- |
| Common | 32 | about 1 in 1,100 |
| Uncommon | 37 | about 1 in 2,500 |
| Rare | 44 | about 1 in 6,400 |
| Epic | 15 | about 1 in 23,000 |
| Legendary | 6 | about 1 in 115,000 |

`TreasureItemChance` is unchanged at 5% and still decides whether a chest slot gives
a treasure at all. The five `TreasureWeight...` keys control the rest. Set a tier to
`0` to take it out of chest loot entirely.

## Bandits

Loot plots used to be a chest and a walk home. There is something guarding them now.

A camp sits dormant on a generated loot plot until a player comes within 15 blocks,
then a crew of 2 to 5 spawns and one of them is the leader. Crews are built from
zombies, skeletons, wither skeletons and witches, and everyone is named `CE3-` plus
one of 100 pirate style names shipped in `bandits.yml`: Blackjaw Morgan, Salt Tom
Rourke, Gutter Kate. If notifications are on, the chat line names the leader you are
about to meet.

They wear helmets, so a camp that generates on the surface is still there when you
arrive in daylight. Their gear never drops.

**They are a fight, not free loot.** An ordinary bandit carries 1.6x a vanilla mob's
health and an extra point of damage; a leader carries 3x and an extra 3.5. They also
put on a show with effects borrowed from the wand spells, Light Spirit, Death Ray,
Fireball, Frost and Nebula, on a chance roll every few seconds.

**A bandit never carries or drops a custom enchantment.** The abilities are
presentation. What they do drop is RACO, and a treasure item on a 6% roll, 30% from
the leader, pulled from the same weighted table chest loot uses so rare stays rare.

Everything above is a line in `bandits.yml`: crew size, spawn and despawn radius, the
900 second camp cooldown, health and damage multipliers, which mobs can appear, which
mobs can lead, the ability list and chance, both drop chances, the RACO payouts and
the name list. `Enabled: false` at the top turns the whole thing off.

## 25 quests, already written

The QUEST shop entity worked, but a fresh server had an empty `QuestConfig.yml`, so
it had nothing to hand out until an admin sat down and authored quests through the
chat prompts.

25 quests are seeded on first start now. Spawning the entity is enough.

They are ordinary quests, identical to what `/ce quest add` produces, so you can list,
edit and remove them the usual way. They only get written when the quest list is
empty, so a server that already has quests is never touched, and quests you delete
stay deleted.

Rewards are deliberately modest: vanilla items and a small RACO payout, sitting below
what the exchange pays for the same time spent. Nothing in the set awards a custom
enchantment, a treasure item, or anything with a stat line on it. They exist to give a
new player a reason to go somewhere, not to shortcut progression.

## The RACO price chart

Every trade has been logged and rolled up into hourly OHLC candles since 1.3.0, and
nothing ever showed them to anyone.

The currency exchange has a chart item in the middle now. Hover it and the tooltip
draws the price history as a candlestick chart in block characters, up to 24 hourly
candles over nine rows of price, with the last close, the high, the low and the number
of coins in circulation underneath. Green closed up, red closed down.

It reads the candles the plugin was already building. No new aggregation, no second
set of numbers, and it changes no economy behaviour at all.

## The resource pack

120 new sprites. 100 for the new treasures, and 20 for the original items that never
had a texture at all.

There is a fix in here worth knowing about. The pack had treasure textures, but
nothing pointing at them in the format Minecraft 1.21.4 and later actually reads, so
on a modern server every treasure item rendered as its plain vanilla material. All
134 are wired up properly now.

The original 34 keep their existing texture ids on purpose. Renumbering them would
have blanked the texture on every treasure already sitting in someone's inventory.

## Shops look different

Shop screens used to fill every slot they were not putting a book in with a glass
pane. A shop with six books in a double chest showed six books and twenty two panes.

They draw a frame now and leave the unused space empty. Books fill left to right
with no gaps.

Several shops grew to fit the new books. Armor is the only class that outgrew a
double chest, at 29 books against 28 slots, so it has a second page with a Next
sign. The magic shop is unchanged, its books sit in three separate groups and the
old layout suits it.

## The magic wand craft toggle

New key, `MagicWandNoEnchantOnCraft`, default `false`.

A freshly crafted magic wand has always come out with Fire Ball already on it as its
primary enchantment. Set this to `true` and it comes out blank, so wand progression
starts at the shop like every other item class. The default keeps today's behaviour,
so existing servers see no change unless they ask for one.

## Also fixed

- `/ce reload` used to stack a duplicate set of tutorial and crafting screens every
single time it ran. The list never got cleared, so it grew for the life of the
server and the treasure pages could end up showing stale items
- The treasure pool now rebuilds on reload, so a drop weight change takes effect
without restarting
- A handful of potion, particle and damage constants that Minecraft renamed after
1.16.4 are resolved by name now, so they cannot crash a listener on an older
server

## Compatibility

Spigot and Paper, 1.16.4 through to 26.2, unchanged. No other plugins required, and
there is still no NMS anywhere in the plugin.

Everything from 1.4.0's optimization pass is still in place. A sword swing still
costs a handful of reads instead of several hundred, loot plots still read chunk
data instead of scanning millions of blocks, and the 16 bugs that release fixed are
still fixed.

## Build

- Version 1.4.0 to 1.5.0
- Clean build, and the unit tests (23) pass, 7 of them new for the price chart
Update 1.4.0
Hi guys, this update is a big cleanup pass. I went through the whole plugin looking for slow code, and along the way I found 16 bugs, some of them pretty old. Everything is fixed in this release.

Tested on Minecraft 26.2. Please back up your plugins/CustomEnchantments3 folder before updating, and let me know if anything acts up in the discussions page.

Read this first
If you use /ce reload, your players' RACO balances were being wiped every time.
The reload code was looking in the wrong file for the saved balances, found nothing, and reset everyone to 0. The next save then wrote that back to disk. This is fixed, but any balance already lost is gone. Restarting the server was never affected, only /ce reload.

Seven fixes change gameplay. Full list further down under "Balance changes". Nothing else in this update should be noticeable in play.

Performance
This was the main reason for the update. Custom enchantments are stored as JSON on the item, and the plugin was re-reading and re-parsing that JSON far more often than it needed to.

One example: a single sword hit was costing several hundred JSON parses, because every attack and defence handler built its own player object and each of those read the main hand, the off hand and all four armor pieces twice over. That is down to a handful now.

  • Enchantment reads no longer allocate a JSON parser, a reflection object and a key on every single call
  • Player data is loaded when it is actually needed instead of up front
  • Enchantment name lookups are a map lookup instead of scanning all 58 every time
  • Server version checks are cached instead of re-parsing the version string, this one was being called twice per step inside 360-step particle loops
  • PlayerMoveEvent, the busiest event on any server, no longer reads your boots several times per tick
  • Block breaking with Deforestation was quadratic on large trees, now it is not
  • Loot plot generation used to scan around 4.5 million blocks on the main thread, twice. It now reads chunk block entity lists instead
Memory leaks fixed:

  • A permission object was being stacked on the player on every single /ce command and never removed
  • The currency exchange screen kept refreshing once a second forever, for every player who had ever opened it, even after they logged off
  • The world list grew forever, and gained another background task on every reload
  • Decorative particle drops (blood, gold nuggets) were added to a list that was never cleaned up and searched on every item pickup on the map
  • There was no logout handler at all, so per-player data piled up until restart
Bug fixes
  • Dummy shops could be killed. The damage readout worked, but with melee the hit also landed for real, so a decent weapon just killed the dummy. Fire, lava, fall damage, explosions and mobs could kill one too. Dummies are properly protected now, the same as every other shop entity
  • /ce reload wiped all RACO balances. Read the warning above
  • Armor enchantments ignored CustomEnchantsWorld. Tank, Magic Resist, Regain, Freeze, Thorns, Mana Shield, Sturdy, Omni Vamp and Blindness all kept working in worlds where the plugin is supposed to be off. Weapon enchantments were checking correctly, so the two halves disagreed
  • PENETRATION did nothing at all. The warrior passive was writing the wrong stat, onto an object that got thrown away immediately
  • Protected boundaries were not blocking mob spawns. The check was backwards, it only blocked spawns in worlds where the plugin was disabled
  • Loot plots almost never spawned. The "is there a bed nearby" check also matched BEDROCK, and the search box reaches 80 blocks below you, so most attempts got rejected on sight
  • Offline shop sales lost money. If you sold two items while offline you were only paid for the second one
  • LightSpiritManaCost in config.yml did nothing. The Lightning cost was being written over the top of it
  • Several 1.21.x versions were treated as unsupported. 1.21, 1.21.0, 1.21.2, 1.21.3, 1.21.6, 1.21.7 and 1.21.9 fell through the version check, which quietly turned off anything version-gated. Version checks are numeric now
  • The last treasure item could never drop. "Ancient Netherite Scrap" was unobtainable, and "Lucky Treasure" was dropping at double the intended rate
  • Empty loot rarity lists crashed chest generation. If LootItems.yml had no item of some rarity, chest generation broke for the whole world once that rarity rolled
  • Shops in another world could break commands. Distance checks against shops in a different world threw an error and aborted the whole handler
  • Three background tasks were reading player inventories and writing mana from async threads, which is not safe with the Bukkit API. All moved to the main thread
  • /ce settings protection list was doing millions of pointless allocations to build a list it then threw away
Balance changes
These are the ones your players may notice:

  • PENETRATION now works. Warriors ignore 0.5% of physical defence per level, 5% at level 10
  • Armor enchantments stop working in worlds not listed in CustomEnchantsWorld. Only affects you if you actually restrict the plugin to specific worlds. The default empty list means all worlds, so most servers see no change
  • Hostile mobs no longer spawn inside protected boundaries, which is what the feature was always meant to do
  • Loot plots will actually generate now, including underground. If that turns out to be too often for your taste, turn LootPlotSpawnChance down. Trapped chests also count as player building now, so plots avoid them
  • Light Spirit's mana cost drops from 12.5 to 10 with the default config, it is reading LightSpiritManaCost properly now. Lightning is unchanged, but its shop description was showing the wrong number and now shows the right one
  • "Ancient Netherite Scrap" is obtainable and "Lucky Treasure" drops at a normal rate
  • Dummies do not die and no longer get knocked around. They still flash when you hit them and still show the damage number, they just stay put now
Worth testing
If you can, please check these and report anything odd:

  • Hitting a dummy shop with your strongest weapon, it should survive and still show the damage
  • Melee combat against players wearing enchanted armor
  • Mob spawning inside a protected boundary
  • Light Spirit mana usage
  • /ce reload, then check a player's RACO balance is still there
  • Loot plot generation, if you have GenerateLootPlots: true
No features were added or removed in this update.
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock