Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.18.2] Making a slippery block

Recommended Posts

the friction seems to just speed me up or slow me down, i think its something to do with the ICE and ICE_SOLID materials, but i have been looking for ages and still cant find how they actually affect slipperiness.

Link to comment
Share on other sites

17 minutes ago, diesieben07 said:

The creation of Blocks.ICE calls BlockBehavior.Properties#friction with 0.98F.

it only makes me faster. the actual gradual speeding up and slowing down doesnt happen.

Link to comment
Share on other sites

Posted (edited)

after BlockBehaviour.Properties.of(Material.STONE, MaterialColor.STONE) i added .friction(0.98f), thats what the ice block does when registered.

it just speeds me up when walking on it

Edited by KaboomRoads
Link to comment
Share on other sites

you'll probably want to do it manually.

to slow down the player or speed them up you'd normally override stepOn if the block is a full cube block or entityInside if it's not a cube.

but if you want some loss of control too, maybe you want to respond to keyboard event (don't remember the name) and mess up the input if the player is above your block (you don't want instant changes of direction).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

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