Commit Graph
4449 Commits
Author SHA1 Message Date
KAMKEEL c634c4bd35 Revert "Refresh block bounds before reading a collision box so top slabs report the right height"
This reverts commit 715b38e694.
2026-08-11 15:09:59 -04:00
KAMKEEL 715b38e694 Refresh block bounds before reading a collision box so top slabs report the right height 2026-08-11 14:59:09 -04:00
KAMKEEL 9ff4b8ae16 Nudge npcs out of blocks they grow into when the hitbox changes 2026-08-11 12:53:08 -04:00
KAMKEEL e3d1c9b1a7 Apply the entity tracker spawn fix on the integrated server too 2026-08-11 12:29:57 -04:00
KAMKEEL 605907681c Return npcs to their start position when they fall out of the world 2026-08-11 12:29:56 -04:00
KAMKEEL 32c5cc78c7 Stop cloning a linked item from replacing its shared script handler 2026-08-11 12:18:59 -04:00
KAMKEEL 795464fb81 Key the skin overlay packet on UUID so it isn't dropped for unloaded players 2026-08-11 12:18:59 -04:00
KAMKEEL 4a52690d99 Let a script reload clear the errored latch on single-container handlers 2026-08-11 12:18:59 -04:00
KAMKEEL fae2c21893 Fix the script-facing effect apply and remove overloads throwing on every call 2026-08-11 12:18:59 -04:00
KAMKEEL c2ad3ef015 Small Behavior Restorations 2026-08-11 12:00:52 -04:00
KAMKEEL 98c94bd406 Trim comments 2026-08-11 11:32:01 -04:00
KAMKEEL 67ddaaab6f Keep entity hash consistent with equals, and campfire interaction handled
ScriptEntity.hashCode included tempData while equals compares only the entity,
so two wrappers of the same entity hashed differently - and tempData is mutable
and swapped wholesale by copyTempData, so an entry's hash could change while it
sat in a map.

BlockCampfire.onBlockActivated went from returning true to false, which lets the
held item be used or placed on top of the interaction. Restored.
2026-08-11 06:29:18 -04:00
KAMKEEL 22a8ef5036 Merge branch 'dev' into pr-254
# Conflicts:
#	src/main/java/noppes/npcs/client/gui/GuiNpcMobSpawnerSelector.java
2026-08-11 06:29:18 -04:00
KAMKEEL 2de0795a8e Keep the pBurnItem migration on revision 23
Revision 23 never shipped without the burn flag - it released together with it -
so no saved NPC carries version 23 from a build that lacked pBurnItem. The
migration belongs in the < 23 gate, and bumping ModRev would only force a
redundant pass over every NPC.
2026-08-11 06:07:58 -04:00
KAMKEEL c6e361f8e6 Register inventory tabs from the client proxy, not the mod class
Deferring registration to loadComplete is right - TConstruct needs to have
registered first - but naming TabRegistry and the tab classes in CustomNpcs put
client-only GUI types in a class the server loads, which the verifier resolves
at link time regardless of any runtime side check. A proxy hook keeps them in
ClientProxy while still running at the same point.
2026-08-11 05:56:08 -04:00
KAMKEEL 74511b7449 Merge branch 'dev' into pr-290
# Conflicts:
#	src/api
2026-08-11 05:54:41 -04:00
KAMKEEL 179fd4f834 Make ID reassignment safe, and apply it to quests too
The free-ID search only consulted the global map, so it could pick an id the
same category still held further down the iteration - and renameTo silently
overwrites on POSIX, so the rename then destroyed that entry's file. It now
skips ids held by the category and any file already on disk.

Quests had the same discard-on-collision behaviour and now get the same
reassignment, including re-registering shared quests under the new id.
2026-08-11 05:54:14 -04:00
KAMKEEL 1d0b640c61 Merge branch 'dev' into pr-293 2026-08-11 05:52:42 -04:00
KAMKEEL fab1062ce8 Bump ModRev so the pBurnItem migration can run
The migration sat in the npcVersion < 17 block, but ModRev has been 23 since
2023 and CheckNpcCompatibility returns early when the save already matches it -
so every NPC affected by the regression was skipped. Moved to a < 24 block and
bumped ModRev to 24 so it actually reaches them.
2026-08-11 05:52:30 -04:00
KAMKEEL 1532ef722c Merge branch 'dev' into pr-278 2026-08-11 05:51:40 -04:00
KAMKEEL caa39d6d5d Merge pull request #283 from zeng-github01: disable auto-open GUI for BlockBorder and BlockNpcRedstone 2026-08-11 05:22:36 -04:00
KAMKEEL a71532f49a Merge pull request #292 from postyizhan: adapt quest tracker height to content 2026-08-11 05:22:35 -04:00
KAMKEEL a028142dda Fix mouse wheel scrolling in the script editors
Mouse.getDWheel() clears the accumulated delta, so whichever widget polled it
first in a frame took it and every later reader saw zero. The script text areas
polled it themselves, after the parent screen had already drained it for its
scroll lists, so the wheel did nothing in the player, NPC and event script GUIs.
The screen now reads the wheel once per frame into the mouseScroll field it
already declared for this, and each widget zeroes it when it consumes it.
2026-08-11 05:08:15 -04:00
KAMKEEL 71bb4b451e Honour the effective windup instead of the raw field
start() and tick() compared against the raw windUpTicks, but when the windup is
synced to an animation the value that applies comes from getWindUpTicks(). An
ability configured that way skipped its windup entirely and fired on the first
tick. The telegraph duration used the raw field too, so it disagreed with the
phase it was meant to cover.
2026-08-11 05:01:50 -04:00
KAMKEEL 677d50fa03 Keep client-only sub-GUI types out of condition and zone descriptors
Same leak as the ability magic editor: @SideOnly strips the annotated method on a
server but not the synthetic lambdas it generates, so ConditionHasEffect,
ConditionQuestCompleted, AbilityTrap and AbilityZone all shipped methods whose
descriptors named a client-only GUI class. Each field is now built in the GUI
class it belongs to.
2026-08-11 05:00:02 -04:00
KAMKEEL 466b49db5e Let the day/night transform actually fire
EntityAITransform claimed the PASSIVE mutex, so any running movement or look
task blocked it from ever starting. The swap only happened in the gaps where
those yielded - which is why it appeared to trigger when an NPC said a line and
for a moment afterwards. The task only polls world time and flips the state, so
it needs no mutex at all.
2026-08-11 04:52:50 -04:00
KAMKEEL dedbe94cd8 Keep client-only sub-GUI types out of Ability's method descriptors
The magic editor field was built with lambdas inside Ability.getAllDefinitions.
subGuiField is generic, so those lambdas took SubGuiAbilityMagic as their
descriptor type. @SideOnly strips the annotated method on a server but not the
synthetic lambdas it generates, so anything reflecting over Ability's declared
methods - Nashorn's adapter generator when a script touches an ability - hit
NoClassDefFoundError. Building the field in the client class keeps the type out
of Ability entirely.
2026-08-11 04:44:14 -04:00
KAMKEEL c79f5998d6 Stop NPC pathfinding fighting Charge's own movement
Charge drives the NPC with applyVelocityFlat but never declared that it does, so
locking movement during the active phase zeroed its motion outright while not
locking left the navigator running against it - no setting worked. It now
declares its own movement and locks both phases, so the navigator stays clear.
2026-08-11 04:24:40 -04:00
KAMKEEL 1acda0e6b0 Scale hazard damage to its interval and floor the interval at 5 ticks
The value is configured, stored and labelled as damage per second, but a pulse
applied it whole, so the real rate was damage per interval - it only matched at
the default interval of 20. A pulse now deals the share of a second it covers.
The interval is floored at 5 ticks, which also bounds how often a zone scans;
this replaces the per-tick membership check, which cost 20x the entity queries.
2026-08-11 04:23:59 -04:00
KAMKEEL 4341c15cf4 Scale melee damage dealt to barriers
Barriers are plain entities, so no LivingHurtEvent fires for them and nothing
scaled an incoming melee hit - vanilla handed over the bare attackDamage
attribute and a dome took one point per swing however strong the attacker was.
Attributes now apply, and modifyBarrierMeleeDamage gives addons the same seam
they already have for barrier health.
2026-08-11 03:43:38 -04:00
KAMKEEL 6477ede022 Make hazard radius and barrier duration accurate
- Hazards only checked who was inside once per damage interval, so the boundary
  where damage started and stopped drifted by however far an entity moved in
  between - several blocks at sprint speed. Membership is now checked every
  tick and damage accrues per entity from the time it actually spends inside.
- Barriers counted elapsed ticks instead of holding a deadline, so every tick
  the entity missed extended it past its configured duration. They now expire
  on an absolute world time like the other energy entities.
2026-08-11 03:43:38 -04:00
KAMKEEL 7cafa4f677 Make anchored lasers and rotation lock affect ability aim
- Anchored lasers re-derived their direction straight at the target every tick,
  discarding the rate-limited look vector, so track speed did nothing and the
  beam was undodgeable. They now converge on the point the owner is aiming at.
- Rotation-locked NPCs aimed energy projectiles and hit-scan projectiles from
  the target''s position, so the lock was purely visual. Both now respect the
  frozen heading.
2026-08-11 03:43:37 -04:00
KAMKEEL 9f4334a803 Line the monkey tail up with the player model
heightFactor did not fully cancel ModelTail''s anchor, leaving both the wrapped
and plain monkey tails two pixels below where JBRA renders them on players.
2026-08-11 03:26:32 -04:00
KAMKEEL 6af66b8883 Fix NPCs getting stuck after using one ability
The terminal DAZED to IDLE transition was swallowed before the completion
switch ran, so the finished ability stayed set as the current one and the NPC
never started another until it died and reset. Guard abilities compounded it:
NPCs reuse a single ability instance and onExecute left pendingCompletion set,
ending every later activation on its first tick.
2026-08-11 03:25:51 -04:00
KAMKEEL abd1c7cbeb Make per-ability cooldowns work on NPCs
An NPC rolled both clocks and folded the ability''s cooldown into the global one
as well, so the global timer always outlasted the per-ability entry and the
setting could never reject anything. The global timer now only paces the NPC
when the ability tracks its own cooldown.
2026-08-11 03:24:59 -04:00
KAMKEEL 3565c66cf8 Keep ability cooldowns across logout
Dimension change and teleport were already fixed, but disconnect still cleared
cooldowns and login cleared them again, and they were never written to NBT - so
relogging reset every cooldown. They are absolute world-time deadlines, so they
now persist and are restored on load.
2026-08-11 03:24:19 -04:00
KAMKEEL aaf6734bd9 Take deleted abilities away from players properly
Deleting a custom ability only cleared the unlocked list. An active toggle kept
a direct reference and went on ticking, stale hotbar slots survived, and the
client was never resynced so it still showed and could select the ability.
Selecting a key the player no longer has now deselects instead of firing
whatever was previously selected.
2026-08-11 03:22:56 -04:00
KAMKEEL 68b5191db6 Fix trader edits being lost on an existing linked market
Closing the setup GUI saved the market from the server''s stale role and then
re-read that market over the edits it had just applied, so stock and currency
cost changes never survived. The role now saves first and the market is written
from it, and relinking to another market no longer pushes pre-link data over it.
2026-08-11 03:21:46 -04:00
KAMKEEL 17f61de57a Fix editor StackOverflow on self-referential generic bounds
fromGenericType expanded a type variable bound, then expanded the bound''s type
arguments, which led straight back to the same variable. Any enum reaches it
through Enum<E extends Enum<E>>, so typing ability.getAllowedBy() crashed the
client. Track the variables being expanded and emit repeats unbounded.
2026-08-11 03:20:34 -04:00
KAMKEEL 5aa843966a Fix divide by zero clicking the profiles scrollbar
The scrollbar hit test was pure geometry, so clicking its column before the
profile list had loaded - or on any list short enough not to scroll - divided
by a maxScrollY of zero. The draw path already guarded on the same value.
2026-08-11 03:19:52 -04:00
KAMKEEL 0829b6285f Update EntityNPCInterface.java 2026-08-11 02:17:28 -04:00
Mighty-S0715 2c134fe627 fix(dialogs): reassign colliding dialog IDs instead of discarding 2026-08-02 12:31:50 -04:00
postyizhan 322626015d fix: adapt quest tracker height to content 2026-08-02 22:32:00 +08:00
LLEVC 50e16dc538 the one change i wanted to make 2026-06-25 18:32:36 -07:00
KAMKEEL 4a7c7b09c7 - Fix Counter infinite recursion
- Tags Get Packet
- Cooldowns Resetting on Dimension Change / Teleport
2026-04-20 21:00:54 -04:00
bigguy345 1a77728bcd OVERHAULED IGuiData FRAMEWORK SO ALL UPDATES WIRE THROUGH SyncController (deprecated legacy setGuiData) 2026-04-03 18:00:27 +02:00
bigguy345 7f63b64a66 Set ScriptHandler default to enabled = true 2026-04-03 16:32:56 +02:00
bigguy345 8e8ab06507 Fixed janino script handler serialization inconsistencies 2026-04-03 16:32:34 +02:00
bigguy345 4c301b3c1c Improved PlayerDataSyncHandler 2026-04-02 04:29:29 +02:00
bigguy345 67c6cf14d3 SyncController common SyncRegistry registration (SyncTypes must be on client & server) 2026-04-02 04:26:49 +02:00