Commit Graph
2870 Commits
Author SHA1 Message Date
Claude d09c6b0c81 Add auction filtering and sorting system
New files:
- EnumAuctionSort: Sorting options (price, time, name, bids, etc.)
- AuctionFilter: Search/filter criteria with builder pattern
- AuctionDataPacket: Large packet for server->client listing data

AuctionController changes:
- getFilteredListings(): Main filtering/pagination method
- sortListings(): Comprehensive sorting by various criteria
- quickSearch(): Convenience method for simple searches
- FilterResult: Pagination result container

AuctionListing changes:
- Added bidCount field with NBT persistence
- Added creationTime alias methods

AuctionActionPacket changes:
- QueryListings: Filter-based search
- QueryMyListings: Player's own listings
- QueryMyBids: Player's active bids
- QueryClaimable: Items ready to claim

NoppesUtil changes:
- Auction data storage and IAuctionData interface
- Client-side data handling for GUI integration
2026-01-04 09:33:29 +00:00
Claude 57f9b706bf Implement Phase 5: Network packets, permissions, and scripting API
- Add auction permission nodes (use, list, bid, buyout, admin)
- Create AuctionActionPacket for client-server communication
  - Supports: CreateListing, PlaceBid, Buyout, CancelListing, ClaimItem, ClaimProceeds
  - Includes permission checks and validation
- Register packet in PacketHandler
- Add auction scripting API methods to ScriptPlayer:
  - getAuctionListingCount()
  - getMaxAuctionListings()
  - hasAuctionClaims()
  - getAuctionClaimCount()
  - getActiveAuctionBidCount()
2026-01-04 08:57:13 +00:00
Claude c1dc58ae54 Implement Phase 4: Auction House core system
- Add auction enums:
  - EnumAuctionDuration.java - configurable auction durations (SHORT/MEDIUM/LONG/VERY_LONG)
  - EnumAuctionStatus.java - listing statuses (ACTIVE/SOLD/EXPIRED/CANCELLED/CLAIMED)
  - EnumAuctionCategory.java - auto-categorization of items for browsing

- Add AuctionListing.java data class:
  - Complete auction listing with seller/bidder tracking
  - Pricing with starting price, buyout price, current bid
  - Timing with snipe protection (extends TO X minutes, not by)
  - Item validation (checks trade restrictions and blacklist)
  - Previous bidder tracking for refund notifications
  - NBT serialization for persistence

- Add AuctionController.java:
  - Global auction house management
  - Create/cancel/finalize listings
  - Bid placement with automatic outbid refunds via claims system
  - Buyout support with immediate sale
  - Claim system for sellers (proceeds) and buyers (items)
  - Search and filter by category/name
  - Periodic expiration processing
  - Persistence via auctions.dat

- Add RoleAuctioneer.java NPC role:
  - Configurable tabs (listings, my listings, my bids, claims)
  - Configurable permissions (create, bid, buyout)
  - Custom welcome/disabled messages
  - Opens auction GUI on interaction

- Update ConfigMarket.java:
  - Duration-specific settings (hours and fees)
  - Removed deprecated AvailableDurations string

- Update EnumRoleType.java - add Auctioneer
- Update EnumGuiType.java - add PlayerAuction, SetupAuctioneer
- Update DataAdvanced.java - handle Auctioneer role creation
- Update CustomNpcs.java - initialize AuctionController
2026-01-04 08:43:55 +00:00
Claude dc9d15f3e3 Implement Phase 3: Item Attributes & Restrictions
- Add ItemTradeAttribute.java for trade restriction utilities
  - TAG_UNTRADEABLE for items that cannot be traded
  - Check existing TAG_PROFILE_SLOT and TAG_SOULBIND tags
  - canTrade() checks all three restriction types
  - getTradeBlockReason() returns localization key for UI
  - Utility methods for setting/getting each restriction type
  - clearAllRestrictions() and getRestrictionSummary() helpers

- Add AuctionBlacklist.java controller
  - Blacklist items by registry name (e.g., "minecraft:diamond_sword")
  - Blacklist entire mods by mod ID (e.g., "minecraft")
  - Blacklist items with specific NBT tags (supports dot notation)
  - isBlacklisted() and getBlacklistReason() for checking
  - Persistence via auction_blacklist.dat
  - Add/remove methods for each blacklist type

- Initialize AuctionBlacklist in CustomNpcs.java

- Add scripting API methods to ScriptItemStack.java
  - canTrade() - check if item can be traded
  - getTradeBlockReason() - get block reason
  - isUntradeable() / setUntradeable() - manage untradeable flag
  - isProfileSlotBound() / getProfileSlot() / setProfileSlotBound()
  - isSoulbound() / getSoulbindOwner() / removeSoulbind()
  - clearTradeRestrictions() - remove all restrictions
  - getRestrictionSummary() - human-readable summary
2026-01-04 08:34:45 +00:00
Claude c9f77bed05 Implement Phase 2: Trader Enhancements with stock and currency system
- Add EnumStockReset.java for stock reset timing types
  - NONE, MCDAILY, MCWEEKLY, MCCUSTOM (MC time)
  - RLDAILY, RLWEEKLY, RLCUSTOM (real time)
  - Helper methods for interval calculation and display formatting

- Add TraderStock.java for stock management
  - Per-slot stock limits with -1 for unlimited
  - Per-player vs per-server stock tracking modes
  - Automatic reset timer with configurable intervals
  - PlayerTraderStock inner class for per-player tracking
  - NBT serialization for persistence

- Modify RoleTrader.java to support stock and currency
  - Add TraderStock instance for stock management
  - Add useCurrency flag and slotPrices array for virtual currency
  - Auto-check for stock reset on interact()
  - Helper methods: hasStock(), getAvailableStock(), consumeStock()
  - Helper methods: getSlotPrice(), setSlotPrice(), hasSlotPrice()
  - getTimeUntilResetFormatted() for GUI display

- Modify ContainerNPCTrader.java for transactions
  - Check stock availability before purchase
  - Handle virtual currency purchases via CurrencyController
  - Fall back to item-based currency when useCurrency disabled
  - Consume stock after successful purchase
2026-01-04 08:29:03 +00:00
Claude 60b985d33d Fix currency storage to use main PlayerData file
- Currency now stored in main player save file, not separate file
- Currency excluded from getNBT/setNBT (slot-specific data)
- Currency saved in save() after getNBT(), loaded before setNBT()
- This ensures currency is preserved during profile slot changes
- Removed loadCurrency() and saveCurrency() separate file methods
- Updated VaultHelper to call save() instead of saveCurrency()
2026-01-04 08:23:50 +00:00
Claude 7e6b17c106 Implement Phase 1: Currency System foundation
- Add ConfigMarket.java with separate market.cfg config file
  - Currency settings (name, starting balance, max balance, Vault integration)
  - Auction settings (durations, fees, snipe protection, claim expiration)
  - Trader settings (stock system defaults)

- Add PlayerCurrencyData.java for balance storage
  - NOT profile slot bound - shared across all slots
  - Tracks balance, lifetime earned, and lifetime spent
  - Deposit/withdraw with overflow protection

- Add VaultHelper.java for Bukkit hybrid server integration
  - Reflection-based VaultAPI integration
  - Falls back to internal currency when Vault unavailable
  - Supports getBalance, deposit, withdraw, transfer operations

- Add CurrencyController.java for currency operations
  - Claims system for auction refunds and NPC payments
  - Claim expiration with configurable days
  - Persistence via currency_claims.dat

- Update PlayerData.java to integrate currency
  - Separate loadCurrency/saveCurrency methods
  - Currency file stored separately from slot data

- Add scripting API methods to ScriptPlayer.java
  - getCurrencyBalance(), addCurrency(), removeCurrency()
  - canAffordCurrency(), getCurrencyName(), formatCurrency()
  - hasPendingClaims(), getPendingClaimsTotal(), claimAllCurrency()
2026-01-04 08:14:29 +00:00
Kam a0de82b8e4 Merge branch 'claude/fix-npc-spawn-biomes-hPE8Q' into dev 2026-01-03 15:55:31 -05:00
Kam 12696996a6 1.10.3 2026-01-03 01:23:45 -05: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
Kam ce8e38b6bd Update ScriptPlayerEventHandler.java 2025-12-30 19:41:02 -05:00
Kam 592a910cbc Add some more Attack Speed Handling 2025-12-30 19:29:44 -05:00
Kam 8dad290486 Merge branch 'claude/fix-mount-movement-jitter-7JrfX' into dev 2025-12-30 18:21:38 -05:00
Claude de8c317023 Add mount edge case handling for dismount scenarios
- Player logout: Dismount from NPC mount before logout to prevent
  orphaned mount state (ServerTickHandler)
- Teleportation: Dismount before cross-dimension teleport to prevent
  mount being left behind in old dimension (NoppesUtilPlayer)
- Dead rider: Validate rider is alive, dismount dead/invalid riders
  to prevent stuck mount state (NPCMountUtil)
- Role disable: Dismount rider when mount role is disabled to prevent
  mounted player on non-mount NPC (RoleMount)
2025-12-30 23:20:54 +00:00
Claude 096c9b0a69 Fix mount movement jitter by following vanilla horse/boat sync pattern
- Remove all velocityChanged=true flags from mount movement code
  (NPCMountUtil, EntityNPCInterface, EntityNPCFlying)
- Make performMountedMovement physics server-side only like vanilla horse
- Remove syncMountedRiderVelocity method that forced rider velocity packets
- Fix ground movement to not reset motionY every tick
- Let Minecraft's entity tracker handle position sync naturally

The jitter was caused by S12PacketEntityVelocity being sent every tick,
which constantly reset client interpolation. Vanilla horses/boats never
set velocityChanged and rely on the entity tracker for smooth sync.
2025-12-30 23:06:16 +00:00
Claude 370abd2f94 Fix Player Data search functionality bugs
- Fix category search logic for Quest/Dialog/Transport tabs that was
  incorrectly checking selectedCategory.isEmpty() before filtering,
  which cleared the category list instead of filtering it
- Add resetScroll() calls to all search methods so scroll position
  resets when search results change
2025-12-30 23:04:32 +00:00
Kam 2065d5dde5 Merge branch 'mount-movement-fix' into dev 2025-12-30 17:49:27 -05:00
somehussar e767f4f46c Fix Party Crash 2025-12-19 20:39:54 +01:00
bigguy345 c291ab174f Made npc left/right leg model access public 2025-12-14 13:36:58 +02:00
bigguy345 c1cd8b0386 public EntityCustomNpc npc field to ModelMPM 2025-12-14 13:36:37 +02:00
bigguy345 93e6a92b59 Made GuiNpcButtons with multiple displays i.e ("Hair","Eyes","Fur")
right clickable to select in reverse
2025-12-09 17:46:07 +02:00
bigguy345 7adbdd30e4 More GUI NPC rendering improvements 2025-12-09 15:01:01 +02:00
bigguy345 27de3c77a4 Hooked renderingEntityInGUI accordingly 2025-12-09 13:45:38 +02:00
bigguy345 00ea0200c4 Fixed GuiScrollWindow scrolling when a subgui is open 2025-12-09 13:45:07 +02:00
bigguy345 06483566cf Improved GuiTextureSelection 2025-12-09 13:44:42 +02:00
bigguy345 cca69d8e1d Added GUI NPC rendering utilities 2025-12-09 12:49:40 +02:00
bigguy345 0ef48c5477 Better fix for ESC closing all sub guis at once 2025-12-09 11:12:30 +02:00
bigguy345 1337aba841 Added GuiTextureSelection.setLocation 2025-12-09 11:11:32 +02:00
google-labs-jules[bot] 000cefdab9 Fix mount movement sync and speed issues
- Remove server-side check for setAIMoveSpeed to fix client prediction desync on ground mounts
- Increase air strafe factor for flying mounts to match ground speed feel
2025-12-06 01:27:27 +00:00
lonewolf8351 0b2bf5fd04 added attack speed parameter to linked Items 2025-12-03 13:44:56 -05:00
lonewolf8351 c3651fd6f7 Merge remote-tracking branch 'origin/dev' into dev 2025-12-03 13:43:33 -05:00
lonewolf8351 bdf3791e38 Added setHurtTime function to IEntityLivingBase 2025-12-03 13:43:11 -05:00
Kam ee413c31b9 Improve mount client sync and flight speed scaling 2025-11-13 19:54:10 -05:00
Kam b13be2969a 1.10.3 2025-11-13 16:47:20 -05:00
Kam c33ac04d11 Refine mount GUI layout and flight handling 2025-11-07 22:44:22 -05:00
Kam 9744209938 Refactor mount helpers and expose NPC flight state 2025-11-07 20:15:49 -05:00
Kam 6c84263769 Update GuiNpcMount.java 2025-11-07 16:11:44 -05:00
Kam 6ff4814983 Fix Bow Rendering positioning for Compat with Mixins 2025-11-06 14:49:36 -05:00
Kam f65662efaf Preserve airborne momentum when mounts dismount riders 2025-11-06 02:34:47 -05:00
Kam bed60002c3 Restrict mount riders and expose jump controls 2025-11-06 02:14:11 -05:00