Optimization#6
Merged
Merged
Conversation
…tion and IP Firewall architectures
- Backend: soft depend Citizens, log hook success/failure on enable - Backend: CitizensHook + CitizensSkinChannelHandler (freesia:citizens_setskin in, freesia:citizens_uuid_resp out) - Backend: TrackerProcessor tracks Citizens NPC entities (NPC metadata check, no Citizens API needed) - Proxy (Waterfall + Velocity): merge /listysmplayers + /dworkerc into unified /freesia command - Proxy: add /freesia setskin <npc_id> <model_id> subcommand - Proxy: VirtualPlayerManager handles citizens_uuid_resp -> build YSM NBT -> setVirtualPlayerEntityState
…skin - Add freesia.setskin.* lang keys to all 6 lang files (en_US, vi_VN, zh_CN x Velocity+Waterfall) - CitizensSkinChannelHandler: include NPC entity ID in outbound response packet - VirtualPlayerManager (Waterfall+Velocity): read entityId from citizens_uuid_resp, call addVirtualPlayer() before setVirtualPlayerEntityState() to ensure NPC is registered
…mat, fix fetchTrackerList for NPC UUIDs, add debug logging
- addVirtualPlayer: fallback to clean state (setPlayerEntityId) instead of completeExceptionally when stored NBT fails to deserialize (prevents entityId staying at -1 which silently blocks notifyFullTrackerUpdates) - addVirtualPlayer: when NPC proxy already exists (re-setskin), update its entityId and return true instead of false
…constructing wrong format - Stop constructing binary manually (writeUtf only was incomplete/wrong format) - Add npcModelBinaryCache to YsmMapperPayloadManager (Waterfall + Velocity) - RealPlayerYsmPacketProxyImpl: after capturing 2.6 binary, probe first readUtf() as model path and cache the full binary for NPC reuse - VirtualPlayerManager: handleCitizensUuidResponse now looks up the cache; if no cached binary for the model, logs a warning and skips sending (prevents DecoderException crash caused by malformed binary payload) - Client will no longer disconnect when /freesia setskin is called
…cModelBinary YSM 2.6 stores model paths as 'ModelName.ysm' (e.g. 'Kipfel.ysm') but users type 'Kipfel' in the setskin command. Now tries both with and without .ysm suffix when looking up cached binary.
…arts - Backend: add npcId to citizens_uuid_resp packet so proxy can map Citizens NPC ID (int) to modelId without needing UUID - Add NpcPersistenceManager (Velocity + Waterfall): persists npc_assignments.dat (npcId->modelId) and npc_model_cache.dat (modelPath->bytes) to PLUGIN_DIR using DataOutputStream binary format - YsmMapperPayloadManager: load model binary cache from disk on startup; save to disk whenever a new model is cached from a real player - VirtualPlayerManager: load NPC assignments on init; auto-reapply all NPC models when the first player joins (re-triggers setskin to backend which returns fresh UUID+entityId); save assignment on every setskin cmd - Result: after first-time setup, NPC models persist across proxy/server restarts without needing a real player with that model to be online
- Rewrite NpcPersistenceManager (Velocity + Waterfall) to use NpcEntry (npcId, UUID, modelId). - Proxy pre-loads persistent NPC models at startup via YsmMapperPayloadManager#preloadNpcModels with entityId = -1. - Send real NPC entityId via Backend TrackerProcessor's virtual tracker_sync plugin message when a player discovers the NPC. - Proxy uses YsmMapperPayloadManager#updateVirtualPlayerEntityId to lazily apply network updates in real-time when tracking occurs. - Removes the requirement for a player connection on Proxy restart to restore NPC models.
- Update TrackerProcessor to append stable Citizens npcId alongside UUID mappings in track sync packets. - Implemented UUID realignment across backend server reboots (replaces cached stale UUID tied to npcId). - Resolve transient YSM handshake dropping packet bugs by enforcing queueTrackerUpdate synchronization block for proxies
…ckerProcessor - Resolves a bug where Citizens Player NPCs were incorrectly categorized as Real Players because they inherit from org.bukkit.entity.Player, causing their tracking packets (and proxy model alignment) to be dropped.
… support - Added Freesia-NPC module for backend NPC tracking. - Implemented NpcMessageReceiver in Waterfall and Velocity for NPC synchronization. - Enhanced YsmMapperPayloadManager with NPC model binary caching and remapping. - Improved VirtualPlayerManager and NpcPersistenceManager for better state handling. - Integrated CyanidinRealPlayerTrackerUpdateEvent in Freesia-Backend.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.