GregTechCEu / GregTech

GregTech CE 1.12 fork continuing progression and development
GNU Lesser General Public License v3.0
255 stars 176 forks source link

Add `writeCustomData()` overload #2631

Closed ghzdude closed 1 month ago

ghzdude commented 1 month ago

What

adds an overload for writeCustomData() that only accepts an id without configuring the buffer

Implementation Details

ideal for when all you need is the id to run logic without needing the buffer

Outcome

a simpler way of syncing to client

ghzdude commented 1 month ago

i'd like to search for usages for this method and see if they can use the new method without issue before this gets merged

ghzdude commented 1 month ago

searching through all usages of writeCustomData(int, Consumer<PacketBuffer>), i only found one that could safely use the new method. ready for review now ig.