Jump to content

PureSpider

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by PureSpider

  1. Nevermind that, fixed it, your hint nudged us in the right direction: @Override public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { handleUpdateTag(pkt.getNbtCompound()); if (this.getWorld().isRemote) { this.getWorld().markBlockRangeForRenderUpdate(this.pos, this.pos); } } Thank you!
  2. How would we do that? Where do we get a world from, in onDataPacket?
  3. I just checked and getExtendedState only gets called when the world is first loaded, not on the update we send. I have no clue why not. We never manually call getExtendedState, we get that block state passed into getQuads. Here is log from the server and client confirming that the update is indeed reaching the client. I also made sure of this multiple times by reading the respective attributes on the TE after an update and made sure they updated correctly. The method writeDataToNbt takes care of serializing our TE state to NBT: [17:31:09] [Server thread/INFO] [org.bitbucket.factoryblock.LogHelper]: getUpdatePacket [17:31:09] [Server thread/INFO] [org.bitbucket.factoryblock.LogHelper]: getUpdateTag [17:31:09] [Server thread/INFO] [org.bitbucket.factoryblock.LogHelper]: writeDataToNbt [17:31:09] [main/INFO] [org.bitbucket.factoryblock.LogHelper]: onDataPacket [17:31:09] [main/INFO] [org.bitbucket.factoryblock.LogHelper]: handleUpdateTag [17:31:09] [main/INFO] [org.bitbucket.factoryblock.LogHelper]: readFromNBT
  4. In our case it doesnt cause a re-render, since our block is an IBakedModel that we are updating depending on the TE data, via IExtendedBlockState produced by getExtendedState() on the block. Is there anything special we need to keep in mind for this case as our block right now definitely doesnt get re-rendered when we send a notifyBlockUpdate?
  5. The scenario is: On right click, we update the tile entity and send that data down the line to the clients with a notifyBlockUpdate - which we call with the same, current blockstate twice as the actual blockstate of the block doesn't change; not sure if we should be doing something different here. In that same right click handler, we are tying to do a block render update, which most of the time causes timing issues since the new data we need for updating the rendering on the client has not been received by the client yet. What we ideally would need is a way to update the rendering of the block after we are sure we received the update data, so after handleUpdateTag happened. Is there an ideal way of doing this kind of thing? PS: I am working on the mod together with American2050.
×
×
  • Create New...

Important Information

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