GregTechCEu / GregTech

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

Fix MTE Initial Sync sending the wrong data #2587

Closed ghzdude closed 2 months ago

ghzdude commented 3 months ago

What

Fixes a small issue when placing a block with NBT from creative mode's "ctrl + pick block". Originally, MTE initial sync is called within MetaTileEntityHolder#setMetaTileEntity() before the MTE is set with readFromNBT(), which gives the client incorrect info. MetaTileEntityHolder#setMetaTileEntity() is moved after the mte tag is handled, and the method was overloaded to accept the tag for the MTE to read before syncing.

Implementation Details

overload of method MetaTileEntityHolder#setMetaTileEntity() along with a default to maintain backwards compat

Outcome

using ctrl + pick block to copy MTEs now sync the correct data to client on initial sync