Jump to content

[API]Custom tile entity packet code broken


Ivorius

Recommended Posts

Yo.

 

So, in 1.5 or so Minecraft introduced a generic tile entity data packet type (finally, yaaay).

However, Forge overrides it, so all my ML mods using this piece of code can't sync their data. This is not a problem in vanilla yet. It might become so, though, since they did implement it, and when did they ever implement code for mods before...? x)

 

Okay, since vanilla code posting is not allowed, the code I'm talking about is in NetClientHandler, in handleTileEntityData(Packet132TileEntityData).

If the actionType equals 255, it gets the custom param 1 (an NBTTagCompound), and extracts the string under value 'ID'. If this equals the registered Tile Entity ID, the tile entity data gets applied (it's a validity >> delay check).

 

So yeah, in Forge, my packets never arrive the clients. This fucks up some logic and rendering, and thus renders the mods incompatible.

This should be the case because Forge removes this feature [though I didn't specifically check].

 

I would be glad if someone could fix this one.

 

Thanks in advance,

 

~Ivorius

 

[edit: Used builds universal-1.5.2-7.8.0.700 and down]

Link to comment
Share on other sites

Minecraft does not use packet 132 for generic callbacks it is very much a specialized callback for vanilla tile entities {In particular MobSpawner, CommandBlock, Beacon and Skull.

 

Forge adds a generic callback:

https://github.com/MinecraftForge/MinecraftForge/blob/master/patches/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java.patch#L41

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Ah, I see it is not a vanilla feature now, but rather a ModLoader one.

 

I'd still love for Forge to pick up this feature, though, because with FML you do aim for full ML mod compatibility, and this is most definitely a missing feature. =)

Link to comment
Share on other sites

You'd have to provide cpw a mod that works on ModLoader but doesn't work on FML.

FML is a clean room implementation, which means he only implements the documented features of ModLoader.

Either way, i'd advise moving to Forge directly as we can not garentee ModLoader compatibility for to much longer.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.