Cuberite Forum
Clientside/Serverside mods - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: Clientside/Serverside mods (/thread-2960.html)



Clientside/Serverside mods - nrgjrteherh435 - 05-22-2017

So this is more of a simple question from my last. Would it be possible to add support for a clientsided mod that (for example) added one block to the game? (assuming the block didn't have any special properties) Theoretically, all you would have to do is specify that the block exists on the server and notify the client that the servers accepts the block (through block id???), allowing you to put the block in your inventory as well as place it. I'm sure I know the answer, I just wanted to be sure as I've grabbed the source from github and seen what the block specification looks like.

The summery of my question: Could you tell the client that the server accepted the block without forge for something that simple? If so, how hard would that be to accomplish?

Please and thank you,
nrgjrteherh435.


RE: Clientside/Serverside mods - xoft - 05-22-2017

Cuberite doesn't really care about unknown block types. It should be perfectly possible to use client-side blocktypes. The only possible problem is in the block-to-pickup and item-to-placed-block conversions, not sure how those would react, so you'd need to try it out.


RE: Clientside/Serverside mods - NiLSPACE - 05-22-2017

Cuberite allows all blocks even if he doesn't know what they are, so if you're playing with a mod that adds a new block Cuberite should be able to work with it immediately. If that blocks needs some special functionality you'd need to do some magic with Lua, but it's probably better if we'd add some kind of API to do that.


RE: Clientside/Serverside mods - nrgjrteherh435 - 05-23-2017

Interesting... So if two clients have the same mod of the block (that has no properties) it should be fine?

Edit: Yes, only blocks with no properties are allowed to be placed (in this case, a block with particles)

[Image: qakU3hL.png]


btw, I tested with this mod in case you wanted to do your own testing: https://minecraft.curseforge.com/projects/extra-blocks-mod