Cuberite Forum
Set block properties - Printable Version

+- Cuberite Forum (
+-- Forum: Plugins (
+--- Forum: Plugin Discussion (
+--- Thread: Set block properties (/thread-3295.html)

Set block properties - mambooh - 05-07-2020

Hello to everyone. I'm trying to create a plugin which modifies some blocks properties (the members of cBlockInfo). e.g. setting "m_IsSolid" = true to water block or changing a block "m_Hardness". Is there a way to do this?

RE: Set block properties - xoft - 05-08-2020

Hello, welcome to the forum.

What exactly are you trying to achieve? These properties are only effective server-side, there's no way to actually send them to the client in the protocol, so the changes won't affect players. They should be considered pretty much read-only.

RE: Set block properties - mambooh - 05-08-2020

Thank you.
I'd like to make water walkable and change the hardness of a block. Are these things possible?

RE: Set block properties - tigerw - 05-08-2020

Your plugin could do something like teleport the player to the top of water constantly, or set the blocks underneath their feet to be tinted glass or blue wool. (I'm not aware of any method to tell the client that water has collision, apart from modified clients.)

For hardness, the plugin could listen for HOOK_PLAYER_BREAKING_BLOCK and family and then determine based on its own calculations of hardness how long it should take to break.