Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/31/20 in all areas

  1. Sorry I just had a look the event is actually triggered on both sides, you just need to check for !World#isRemote for server side then it should be fine.
    1 point
  2. You've only create an instance of ItemEntity, use World#addEntity to add it to the world. Also it should be done on server side, where iirc the event you are using is client only, you can use onBlockActivate in your block class, otherwise send a packet.
    1 point
  3. Wooh, got it! I continued reading about getUpdatePacket and onDataPacket, and stumbled over @diesieben07's post on the matter: I was certain I had to handle all the data through getUpdateTag and onDataPacket, but seems like the data first has to be sent through getUpdateTag (which is then processed by handleUpdateTag). I still still struggle with wrapping my head around exactly how it works, but I think I'm starting to grasp the concept. Here's the latest, working version. Some of the code has been optimized and moved around since last time. DynamiteBlock: DynamiteTileEntity: Thanks a lot for helping out, poopoodice!
    1 point
  4. If I understand it correctly getUpdateTag provides the information that needs to be synced (check its doc), and getUpdatePacket provides the packet that going to be send to the client, I think it's fine to put any number for the tileEntityTypeIn (the second parameter of SUpdateTileEntityPacket), since it's hardcoded to check if the tileentity and the number matches. And then onDataPacket is called when the client has received the packet, it provides the data send from the server which you gather the information you need for client from it.
    1 point
  5. Block.onBlockActivate: if world.isRemote: do nothing else: revert DynamiteTileEntity.active DynamiteTileEntity.tick: if world.isRemote & active: spawn particles DynamiteTileEntity.active on client side is always false as it's never updated. Although it can be caused by something else but I can't access your full code so this is just my guess. You need to find a way to sync the value, using some default syncing methods in TileEntity/IForgeTileEntity e.g. getUpdatePacket and onDataPacket. There are also quite a lot of posts about this, you should have a look at them.
    1 point
  6. Armor with custom armor models are an absolute pain to correctly implement with no understanding. So, to counteract that, I have decided to write a detailed account of how to create your armor and your model correctly. Please note: I will not go over the specifics of any particular modeling software or anything that should already be known about items. I expect that you have made at least one item before and know how to register it. Here is the link if you would like to take a read. Please let me know if there is anything I need to correct or update. This thread is old and outdated, please do not refer to this anymore.
    0 points
  7. The genVSCodeRuns Gradle task generates run configurations for VS Code.
    0 points
×
×
  • Create New...

Important Information

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