Skip to content

Conversation

@M-W-K
Copy link
Contributor

@M-W-K M-W-K commented Jan 22, 2025

What

Improves packet system for initial sync data allowing for the creation of sub-buffers to enforce data separation when necessary, allowing for improved logging of read/write mismatches.

Implementation Details

Introduces the AdvancedPacketBuffer class, which extends PacketBuffer while additionally containing logic for creating and managing sub-buffers from an original buffer.

Outcome

Allow for data separation & improved logging of when packets are not fully read.
Also allows for future functionality to be added to packet buffers in the future, since now our packet buffers will be part of our code base.

Additional Information

Addresses the same problem as #2703 but without sacrificing logging functionality.

@M-W-K M-W-K requested a review from a team as a code owner January 22, 2025 22:43
@M-W-K M-W-K added the type: refactor Suggestion to refactor a section of code label Jan 22, 2025
M-W-K added 5 commits January 22, 2025 16:40
# Conflicts:
#	src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
#	src/main/java/gregtech/api/metatileentity/SyncedTileEntityBase.java
#	src/main/java/gregtech/api/metatileentity/interfaces/ISyncedTileEntity.java
#	src/main/java/gregtech/common/metatileentities/electric/MetaTileEntityBlockBreaker.java
#	src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityPowerSubstation.java
#	src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityObjectHolder.java
#	src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityRotorHolder.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants