Commit Graph
3576 Commits
Author SHA1 Message Date
bigguy345 c3e032dcf2 Abstracted ScriptContainer & JaninoScript to IScriptUnit + global implementation 2026-01-13 18:25:28 +02:00
bigguy345 1372127266 GuiScript now extends GuiScriptInterface + Full screen support 2026-01-13 18:25:20 +02:00
bigguy345 ca8285e23f Made these 3 detached GuiScripts depend on GuiScriptInterface 2026-01-13 18:25:09 +02:00
bigguy345 88d43f8199 Merge branch 'dev' into janino-scripts
# Conflicts:
#	repositories.gradle
2026-01-13 18:18:06 +02:00
Kam 0328be57eb Add BukkitUtil, VaultUtil for Future Economy Handling 2026-01-12 12:50:08 -05:00
Kam 63c704f80a Fix Compile 2026-01-12 05:55:49 -05:00
Kam ff5ce2f556 Add Ability Hooks to NPCs 2026-01-11 20:35:53 -05:00
Kam 276465a175 Merge branch 'ability' into dev 2026-01-11 20:35:45 -05:00
Kam 11808df036 Script Hook Handler 2026-01-11 17:15:13 -05:00
Kam cc94773845 Merge pull request #250 from KAMKEEL/review-ability-system-variables-in-custom-npc+
Refactor ability logic: remove vertical KB, add teleport modes, cutter/guard updates, collision & sounds
2026-01-11 16:05:00 -05:00
Kam 828e99d427 Revise ability logic and configs 2026-01-11 16:04:49 -05:00
Kam 3dc56aba06 Update api 2026-01-10 23:06:39 -05:00
Kam a0184206bf Update api 2026-01-10 23:06:30 -05:00
Kam fdb2ff98d8 Large Ability changes, cleanup, langs, fixes. 2026-01-10 23:06:13 -05:00
Claude c7d04cb9d3 Simplify ability interrupt logic and reorganize GUI
- Remove interruptThreshold field entirely - interrupts now based on damage source type
- Update canInterrupt() to only allow interrupts from direct physical hits (not magic/fire/explosions)
- Interruption only occurs during WINDUP phase, not ACTIVE
- Reorganize SubGuiAbilityConfig into 4 tabs: General, Type, Target, Effects
- Increase GUI size to 420x216 for better layout
2026-01-10 10:32:24 +00:00
Claude b40fec2270 Clean up imports to use short class names
Replace fully qualified class names with proper imports in ability files:
- Added cpw.mods.fml.relauncher.Side and SideOnly imports
- Added IAbilityConfigCallback and SubGuiAbilityConfig imports
- Added SubGuiAbility* imports for each ability type
- Replaced @cpw.mods.fml.relauncher.SideOnly(...) with @SideOnly(Side.CLIENT)
- Replaced fully qualified return types with short class names
2026-01-10 10:03:10 +00:00
Claude f28d3483e6 Refactor Ability GUI to support third-party extensibility
This refactoring allows third-party mods to provide their own custom GUI
for ability type settings by extending SubGuiAbilityConfig.

Changes:
- Refactored SubGuiAbilityConfig as base class with GuiMenuTopButton tabs
- Added virtual methods: initTypeTab(), handleTypeButton(), handleTypeTextField()
- Added createConfigGui() method to Ability base class for GUI instantiation
- Created 15 SubGuiAbility* subclasses in new ability package
- Updated GuiNPCAbilities and GuiNpcManageAbilities to use ability.createConfigGui()

Third-party mods can now:
1. Create a custom Ability subclass
2. Extend SubGuiAbilityConfig with their own GUI
3. Override createConfigGui() to return their custom GUI
2026-01-10 09:48:37 +00:00
Kam 479a2c5384 Update api 2026-01-10 02:17:00 -05:00
Kam bd9e0fdf43 Update api 2026-01-10 02:16:49 -05:00
bigguy345 fb0332e5cf Merge branch 'dev' into janino-scripts 2026-01-10 00:19:14 +02:00
bigguy345 deec2a1986 Merge remote-tracking branch 'origin/janino-scripts' into janino-scripts 2026-01-10 00:04:12 +02:00
bigguy345 b5df6b1709 Moved all janino classes to CNPC+ janino-scripts branch 2026-01-09 23:44:07 +02:00
Kam 18bab07f33 Fix Slam 2026-01-09 16:22:39 -05:00
Kam 166c8aa228 Ability Push 2026-01-09 15:29:00 -05:00
Kam 3e85557984 Update api 2026-01-06 15:15:44 -05:00
bigguy345 60af203165 Renamed to moveFromGlobalToLocal 2026-01-05 20:32:18 +02:00
bigguy345 e8ef60deb4 Important IAnimation takeTasksFrom global instance in AnimationController to local instance in entity AnimationData 2026-01-05 20:25:34 +02:00
bigguy345 db0aa94a3a IAnimation instead of Animation 2026-01-05 20:17:55 +02:00
bigguy345 eb660b38ae Added IAnimation consumers to API 2026-01-05 17:14:45 +02:00
bigguy345 a39178c75b Animation Data Store (for cross event/frame data handling) 2026-01-05 16:54:41 +02:00
bigguy345 68681931f8 Animation Data Store (for cross event/frame data handling) 2026-01-05 16:53:58 +02:00
bigguy345 a33acee117 Added Animation task consumers (much better than animation events) 2026-01-05 16:49:48 +02:00
Kam c5c35a1113 Update api 2026-01-04 02:10:58 -05:00
Kam 1eef2f871a Merge remote-tracking branch 'origin/claude/plan-market-updates-od0M1' into dev 2026-01-04 02:10:43 -05:00
Claude 47fc4ebcc1 Add comprehensive implementation plan for CNPC+ 1.11 Market Update
This plan covers three major features:
- Auction House: New Auctioneer NPC role with global auction system
- Currency System: VaultAPI integration for Bukkit hybrid servers
- Trader Enhancements: Stock/inventory system with reset timers

Includes detailed architecture, data structures, and implementation order.
2026-01-03 21:12:55 +00:00
Kam a0de82b8e4 Merge branch 'claude/fix-npc-spawn-biomes-hPE8Q' into dev 2026-01-03 15:55:31 -05:00
Kam c0f2846907 Update api 2026-01-03 01:23:56 -05:00
Kam 12696996a6 1.10.3 2026-01-03 01:23:45 -05:00
somehussar f78fc30660 Ban java.lang.reflect package 2026-01-03 02:54:08 +01:00
Claude f6114dfa5e Fix NPC biome spawn settings not persisting after editing
When users modified biomes, dimensions, or spawning options through the
sub-GUI dialogs, changes were only stored in client memory and never sent
to the server. This caused spawn configurations to appear correct in the
UI but fail to work after server restarts.

The closeSubGui() method now calls save() when SubGuiNpcBiomes,
SubGuiNpcDimensions, or SubGuiSpawningOptions dialogs close, ensuring
changes are immediately sent to the server via NaturalSpawnSavePacket.

Added @Override annotation for consistency with other GUI classes.
2026-01-02 09:50:28 +00:00
Kam 6cc78a62aa Merge branch 'claude/fix-bard-music-dialog-bug-Rm8DP' into dev 2026-01-02 00:09:38 -05:00
Kam cb0b18310a Merge remote-tracking branch 'origin/claude/fix-quest-cooldown-timer-hoXkh' into dev 2026-01-02 00:08:42 -05:00
Claude 1d191413fb Fix quest cooldown not working for MCCUSTOM and RLCUSTOM types
The canQuestBeAccepted() method was missing cases for MCCUSTOM and
RLCUSTOM repeat types, causing quests with custom cooldowns to become
permanently inaccessible after first completion. Added the missing
checks using quest.customCooldown for both MC ticks and real-life
milliseconds.
2026-01-02 03:58:52 +00:00
Claude f5deb8a823 Fix Bard music restarting/duplicating when opening dialogs
Two issues were causing the bug:
1. GuiDialogInteract.close() called stopAllSounds() unconditionally,
   which stopped Bard music even when the dialog had no sound or
   when a different Bard was playing nearby.

2. MusicController.stopMusic() didn't set playDelay, allowing Bards
   to immediately restart their music after dialog close.

Changes:
- MusicController.stopMusic() now sets playDelay=20 and clears entity
  reference to prevent immediate music restart
- Added MusicController.stopSound(key) to stop specific sounds
- Dialog GUIs now track their dialog sound and only stop that on close,
  preserving Bard music and other sounds
2026-01-02 03:54:19 +00:00
Kam 07a10b8414 Remove this 2026-01-01 22:35:32 -05:00
Kam e2291f8ccc Fix Debugging Error 2026-01-01 22:02:54 -05:00
Kam f19c53758e 1.10.3-beta 2026-01-01 21:47:17 -05:00
Claude 9b654621e8 Add attack speed check to NPC's attackEntityFrom before immunity check
The LivingAttackEvent handler was firing too late for NPCs because
EntityNPCInterface.attackEntityFrom() has its own immunity check that
runs BEFORE calling super (which fires LivingAttackEvent).

Now the attack speed bypass is checked directly in the NPC's
attackEntityFrom() method, before the immunity check at line 658.
2025-12-31 01:00:33 +00:00
Claude d06e680350 Fix attack speed formula to check elapsed time properly
Instead of blindly resetting hurtResistantTime for fast weapons, now
checks if enough time has elapsed based on the weapon's attackSpeed:
- timeElapsed = maxHurtResistantTime - hurtResistantTime
- Allow attack when: hurtResistantTime <= maxHurtResistantTime - attackSpeed

Example: attackSpeed=10, maxHurtResistantTime=20
- Allows attack when hurtResistantTime <= 10 (10 ticks elapsed)
2025-12-31 00:52:06 +00:00
Claude 185a8bc917 Move hurt resistant time handling from LivingHurtEvent to LivingAttackEvent
- Remove legacy attack speed handling from ServerEventsHandler.LivingHurtEvent
  (was setting hurtResistantTime AFTER immunity check, too late)
- Add proper handling in ScriptPlayerEventHandler.LivingAttackEvent
  (sets hurtResistantTime=0 BEFORE immunity check for fast weapons)
- For weapons with attackSpeed < 20, bypass invincibility frames to allow
  rapid attacks to land
2025-12-31 00:45:26 +00:00