Set block properties
#1
Question 
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?
Reply
Thanks given by:
#2
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.
Reply
Thanks given by:
#3
Thank you.
I'd like to make water walkable and change the hardness of a block. Are these things possible?
Reply
Thanks given by:
#4
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.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)