Posts: 2
Threads: 1
Joined: May 2020
Thanks: 0
Given 0 thank(s) in 0 post(s)
05-07-2020, 03:27 AM
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?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1075 thank(s) in 852 post(s)
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.
Posts: 2
Threads: 1
Joined: May 2020
Thanks: 0
Given 0 thank(s) in 0 post(s)
Thank you.
I'd like to make water walkable and change the hardness of a block. Are these things possible?
Posts: 952
Threads: 16
Joined: May 2013
Thanks: 66
Given 105 thank(s) in 89 post(s)
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.