promotional bannermobile promotional banner

Admin instruments: Custom NPCs —Improved by admins for admins

A patched build of Custom NPCs for Minecraft 1.16.5 (Forge). The same mod you know, with the bugs fixed, a rebuilt editor, a dark theme, a much stronger quest system
Back to Files

CustomNPCs-1.16.5-BRP-0.0.13.jar

File nameCustomNPCs-1.16.5-BRP-0.0.13.jar
Uploader
Rayman_GCRayman_GC
Uploaded
Sep 1, 2026
Downloads
6
Size
12.0 MB
Mod Loaders
Forge
File ID
8785009
Type
R
Release
Supported game versions
  • 1.16.5

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:custom-npcs-brp-1677747:8785009")

Learn more about Curse Maven

What's new

Changelog

Fixes on top of the restored CustomNPCs 1.16.5 sources.

🇺🇦 Це стислий англійський варіант; найдокладніший запис змін — українською в CHANGES.md. This is the English edition; the most detailed record is kept in Ukrainian in CHANGES.md.

Versions

BRP 0.0.13 — section 41: a review pass over the quest work (fixed the quest editor layout overflowing its own panel and buttons too narrow for their labels) and branching quest chains — a list of next-quest candidates with conditions, the first the player qualifies for wins; branches show on the scheme with IF/OR labels.

BRP 0.0.12 — section 40: the last fixed quest limits removed — kill targets, manual counters and quest dialogs are unlimited; entity picking from the registry with search; the quest editor moved to the measured layout with sections.

BRP 0.0.11 — sections 37–39: quests — an on-screen tracker and actionbar progress messages (with per-quest switches), location zones from the editor, player-picked rewards, the mixed quest type (objectives of several kinds in one quest), and a quest-chain scheme like the dialog one.

BRP 0.0.10 — sections 35–36: fixes from tester feedback — purchases are visible instantly (the inventory syncs at the moment of the trade), sound and a "Bought ×N" note, the shop editor refreshes its fields after the server answers, quest toasts in the theme; the network moved to per-element packets — no shop or quest line is ever packed into one packet again.

BRP 0.0.9 — section 34: the text editor (quests, dialogs, scripts) behaves like a normal editor — line breaks show immediately, the view follows the cursor, Home/End, Shift+click, Ctrl+Backspace.

BRP 0.0.8 — sections 31–33: hover hints for icon buttons (40 buttons); the quest log in the dark style with scrolling and coloured objectives; availability conditions became an unlimited list (was 4+4+2+2 fixed slots).

BRP 0.0.7 — section 30: an interface review. Restored the unreachable market picker in the shop editor, minus sign in numeric fields (stock "-1"), item tooltips in the shop, Esc from the dialog scheme goes back, removed an overlap in the availability window, anchored the quest dialog rows, stopped an empty hand from wiping an offer.

BRP 0.0.6 — section 29: the player conversation screen in journal style — the exchange history in a panel with speaker names, numbered replies, trade as its own button, digits as hotkeys.

BRP 0.0.5 — sections 27–28: availability conditions got an "any of" (OR) combiner and can now gate individual reply options; NPC dialogs and reply options are unlimited, as a list or tiles; a per-NPC dialog scheme window with IF / OR / END / GOTO labels.

BRP 0.0.4 — section 26: shop offers became data instead of slots. No more 18-offer limit; stock, reputation prices, up to four item prices, search, two view modes and bulk buying. The save format changed one-way.

BRP 0.0.3 — sections 24–25: the shop editor rebuilt (double slot frames, labels under buttons, a scrollbar, market picked from a list); dark input fields; double-firing tabs on container screens.

BRP 0.0.2 — sections 19–20: the shop up to 108 offers with scrolling; a file-descriptor leak on corrupted saves; a ConcurrentModificationException when finishing a quest from a script.

BRP 0.0.1 — sections 1–18: the recipe subsystem restored, permissions, packet safety, banks, the dark grey theme, dropdowns, scrolling instead of page-flipping, unlimited dialog options, shop from a dialog, the unsaved-changes indicator, the complete Ukrainian localisation.


1. Recipes no longer vanish after a restart

The whole carpentry recipe subsystem was dead in the original 1.16.5 build — not one bug but an unfinished port, confirmed by reading the original jar's bytecode: loadCategories was a bare return (the recipe file was never read), saveRecipe returned null, delete found a recipe and did not delete it, and the client always received an empty list. Loading, saving, deletion, name lookup and client sync are all implemented; recipes get a stable id (RecipeId in NBT). Recipe names with uppercase or non-ASCII letters no longer crash on ResourceLocation.

Compatibility: old recipes.dat files are read. If the world already ran on the broken build, the file may simply be empty — those recipes have to be recreated once.

2. Permissions

29 of the 30 permission nodes registered with defaultValue = true, i.e. available to every player. All nodes now default to OP. Intentional change: non-operator NPC editors need explicit customnpcs.* grants.

3. Reading any block's NBT

Any player could request the NBT of any block in the world — chest contents, command blocks included. Now: a null check, an 8-block range limit and the EDIT_BLOCKS permission.

4. Mail

Container validation and a length cap on letters.

5. Banks

The slot fee was charged before the limit check, so hitting the cap still cost money.

6. Script events that decided nothing

Two script events exposed editable fields and then ignored them (faction point changes among them). Both now honour what the script wrote — a prerequisite for reputation prices later.

7. Lists stopped lagging

The editor's scroll lists rebuilt and re-sorted themselves every frame; now they rebuild on change.

8. The dark grey theme

GuiTheme: a palette (panel, raised, sunken, slot, border, divider, text, dim, accent, ok, error) replacing the fixed 256px background textures, which could be neither recoloured nor resized. Config switch GuiThemeName: dark (default), light, legacy for the original look. Text colour became surface-dependent, so labels stay readable on both themed and legacy panels.

9. Miscellaneous interface bugs

Bulk buying with Shift-click (64 items used to be 64 clicks); the trade window's layers used different damage/NBT flags; quest objectives overflowed the panel; assorted smaller fixes.

10. The global script lock

Script execution synchronised on a public static object any code could lock. Replaced with a private lock.

11. Dialog options: unlimited, with scrolling

Reply options used to cap at six. The editor became a scrollable list; the player screen got a six-row window that follows the selection. The radial wheel (artwork for six slots) is kept for dialogs that request it and fit it.

12. Buttons in the theme

Themed buttons, top-tabs and side-tabs; a style survey of all screens.

13. Null-safety review

A crash on Shift-click in the quest item target editor; EntityFakeLiving breaking the LivingEntity contract; the scripting recipe API doing nothing; one self-made regression found and fixed.

14. Page-flipping → scrolling

The quest log, player factions and recipe manager scroll instead of flipping pages. Fixed a pre-existing quest log bug where a short quest kept the previous page count.

15. The cycle-button became a dropdown

Clicking used to step through values blind. Dropdowns show the whole list at once, scroll when long, and were wired into the base screens (render, click, scroll, close).

16. Shop from a dialog

A dialog option can open a saved market — the NPC needs no trader role. Markets are picked from a list instead of typed from memory. Built on the market files that already existed.

17. The unsaved-changes indicator and Ctrl+S

The editor shows how many changes are unsaved and saves with Ctrl+S without closing.

18. The complete Ukrainian localisation

Full parity with the English file, format specifiers verified automatically. The mod had no Ukrainian file at all.

19. Shop: up to 108 offers (superseded by section 26)

The first ceiling lift: 18 → 108 offers with a windowed slot grid (Slot.xPos is final, so the grid stays and the view moves — the creative-inventory trick) and a server-owned scroll offset (purchases travel the vanilla channel, scrolling the mod channel; letting the client move its own window could buy the wrong offer).

20. Review: descriptor leak and concurrent modification

File streams leaked on corrupted saves (11 call sites converted to try-with-resources); finishing a quest from a script broke iteration (ConcurrentModificationException); one bug in my own earlier code.

21. Nine textured screens moved to the theme

Nine screens whose art was nothing but a background and slot frames now draw from the palette; slot frames come from the container, so windowed grids hide their empty tails. Screens with real artwork (the wheel, the mailman) intentionally stayed on textures.

22. Three infinite recursions

Server-start crashes: Forge alias methods (getRecipeWidth() implemented as getWidth()) meant a subclass override calling the alias recursed forever. Found by a signature-and-name comparison scan; the same scan later caught a second one I introduced myself.

23. The rebuilt NPC editor

GuiLayout measures the labels that will actually be drawn and starts the control column after the widest one — hard-coded offsets tuned for English clipped every other language. Five of the six editor tabs rebuilt (Display, Stats, AI, Advanced, Global) with sectioned layouts; the new screens inherit the old ones and override only widget placement, so behaviour cannot drift. A first-open choice and a tab-bar switch keep the classic layout available. The Inventory tab stays classic: its layout is slot positions in a server-shared container.

24. The shop editor rebuilt

The screen shifted guiTop by 10px mid-render, so its own slot frames landed 10px away from the container's — every cell drew doubled. Grid geometry moved into the container (the only place that knows where slots are), labels went through the measured layout, a real scrollbar replaced the bare counter, and the market became pickable from a list.

25. Three fixes touching every screen

Input fields were black boxes (vanilla fills them from inside renderWidget; the themed bed is now drawn around a background-less widget with compensated insets). Tab clicks fired twice on container screens. Dropdowns did not work on container screens at all.

26. Shop offers became data

The root rework. An offer is a record (TradeOffer): product, up to four prices, faction reputation price, stock (-1 = unlimited), category, enabled. RoleTrader holds a list; the list order is the index, so the byte-slot ceiling is gone along with the 18/108 limits. Buying is an explicit packet — the server checks index, price, stock, reputation and gives the items into the inventory; Shift buys 8, Ctrl a stack. The player screen has search, tile/list modes, and unavailable offers dim with the reason instead of hiding. The editor edits one offer at a time; its slots copy the held item instead of taking it, so setting up a shop no longer costs items or requires creative.

Compatibility: the old TraderCurrency/TraderSold format is read and converted, but only the new format is written — a one-way door. Back up the world before first launch.

27. Availability: OR, and on reply options

Every availability condition used to combine with an implicit AND. A per-availability combiner was added: all conditions / any condition — evaluated over the configured conditions only, so ALL mode is bit-for-bit the historical behaviour. Reply options got their own availability, checked on the server: an unavailable option is cut from the dialog before it is sent, and the choice is validated again on click.

28. Dialogs: unlimited, and a conversation scheme

The NPC's dialog list dropped its twelve-slot grid for a searchable list with list/tile modes and reordering (the lowest available slot is the one that opens). Reply options became an ordered unlimited list showing colour, target and IF/OR/END badges. And the scheme: the NPC's conversation drawn as a graph — nodes are dialogs, edges are replies in their colours, END where a reply stops the talk, GOTO on jumps back, IF/OR where conditions gate; nodes drag, empty space pans, clicking a node opens the ordinary dialog editor.

29. The player conversation screen

The screen always kept the whole exchange but painted it as loose strings. Now it reads like a journal: the history in a panel with speaker names (NPC in accent, player in green), a scrollable log with a position marker, numbered replies in their own panel, digits 1–9 as hotkeys — and options that open something other than talk (a shop, the trade role) as a button at the bottom, where a player looks for "Trade". Clicking outside a reply row no longer activates anything — conversations used to be easy to click through by accident.

30. Interface review: seven fixes

The market picker in the shop editor was unreachable (a handler without its button); "-1" could not be typed into stock (numeric fields rejected the minus); item tooltips had vanished from the shop along with the slots; an empty-hand click wiped an offer (now right-click clears); Esc from the dialog scheme dropped to the world instead of the list; quest dialog rows floated detached from their panel (missing guiTop); an overlap in the availability window.

31. Hover hints

GuiNpcButton had no tooltip mechanism at all — 45 icon-only buttons ("X", "↻") explained nothing. Buttons can now carry a hint, drawn at the very end of the frame so nothing covers it; 40 hints set across the editors.

32. The quest log

Was a 252px book texture with side tabs, page-flipped text and room for three objectives. Now: two themed columns — quests of the chosen category on the left, the story on the right, scrolled by wheel, with every objective listed and coloured by completion. A duplicate-quests bug on every init() died with the rewrite.

33. Availability conditions as a list

The fixed slots (4 dialogs + 4 quests + 2 factions + 2 scoreboards) became an unlimited list of typed conditions with per-kind editors. Old NBT is read and converted; only the list format is written. The scripting API keeps working: the index now counts conditions of that kind, and setting past the end appends.

34. The text editor

Quest, dialog and script text all go through one widget, whose main habit looked broken: split("\n") drops trailing empty strings, so pressing Enter at the end of the text produced a newline no line represented — nothing visibly happened and the cursor vanished. Fixed with split("\n", -1). Also added: the view follows the cursor on every edit, Home/End (line) and Ctrl+Home/End (document) with Shift-selection, Shift+click extends the selection, Ctrl+Backspace deletes a word; the frame moved onto the palette.

35. Tester feedback: "items only change when I close the window"

The trade container has no slots, and vanilla syncs the player inventory only through the open container's slots — so the server consumed the price instantly while the client found out on window close. The server now pushes the player container explicitly at the moment of purchase. Confirmations added: a pickup sound and a green "Bought ×N" in the shop header, plus hover tooltips on the goods. The shop editor also refreshed stale fields after server answers, and quest toasts ("New quest" / "Quest complete") joined the theme.

36. The network: per-element packets

Forge's packet limit is about a megabyte and the window-open payload far less; a big enough shop or quest category packed into one compound is a player disconnect. Shops now sync as an op stream (RESET → OFFER×N → SELECT, one offer per packet; edits echo back as the op the server applied; a market opened from a dialog sends only its name). Login sync sends each dialog and each quest as its own packet, with categories as bare metadata — renaming a category no longer drags all its dialogs along or wipes them client-side.

37. Quests: progress you can see

An on-screen tracker (title in accent, objectives coloured by state) drawn from data the client already held for the quest log, and actionbar progress messages ("Zombie 3/5", "Location found"). All of it admin-controlled: QuestHud, QuestHudMax, QuestHudPosition in the config, and per-quest "tracker" and "progress messages" switches — a secret quest can stay silent everywhere.

38. Quests: zones, reward choice, the mixed type

Location slots can carry an X/Y/Z/radius zone (+ optional dimension) straight from the editor — standing inside marks the objective found with no waypoint block in the world (a found-flag key mismatch for slots 2–3 died on the way). A per-quest reward mode: all items / one random / player picks one — the pick screen is one click, closing it loses nothing, and the server re-validates the choice. And the mixed quest type: items + dialogs + kills + locations + manual counters in one quest, built as composition of the existing types, so every tracking hook feeds the parts unchanged; an empty part does not gate the quest.

39. The quest-chain scheme

A "Scheme" button in the quest manager opens the graph: nodes are quests (type, R for repeatable, END where the chain stops), edges are next-quest links, jumps back are GOTO. Roots are outlined in accent; nodes drag, the canvas pans, clicking a node opens the quest editor. The same engine as the dialog scheme.

40. Quests: the last fixed limits removed

Kill targets, manual counters and quest dialogs are unlimited lists; kill targets are picked from the entity registry with search (a typo used to make a quest that silently never completes — the name field stays editable for NPC and player names). The quest editor moved to the measured layout with sections: basics, hand-in, sub-editors and the per-quest switches.

41. Review pass, and branching chains

A verification pass over the quest work found and fixed four defects of my own: the quest editor layout overflowing its own panel, text buttons too narrow for their labels, long labels in the quarter-width row, and an OR branch drawn as GOTO in the scheme (an edge-flag bit collision). Then branching: a quest now carries a list of next-quest candidates, each gated by the same availability system dialogs use (AND/OR included). At turn-in the candidates are tried in order and the first the player passes starts; the old single next quest remains the unconditional fallback and is exactly what old data reads into. The editor manages the list (order = priority) and the scheme draws every branch with IF/OR labels.

This mod has no related projects