Jump to content

Recommended Posts

Posted

I'm attempting to create a thin, carpetlike block with very little friction, but modifying its friction value has no effect. Is the game checking friction for the block underneath it instead? How can I override this?

Posted

It's a logged bug that's existed since...basically forever.

I'd get you a link, but the bug tracker is undergoing maintenance.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I can confirm that when I place two of the custom block on top of each other the slipperiness works fine. Are there any methods that let you interfere with the friction-calculation process? I could check for entities stepping on or inside the block and manually set their friction to the desired value then.

Posted

https://bugs.mojang.com/browse/MC-1127

Resolved as "working as intended"

3 minutes ago, Syric said:

when I place two of the custom block on top of each other

Clarification required.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

NOTE: I never looked at this before, this is my quick assessment.

The answer to your question is kind of complicated and inconsistent.

Some places use entity.getY() -1.0D while the main LivingEntity.getBlockPosBelowThatAffectsMyMovement() uses getBoundingBox().minY-0.500001D

So if you are not a full block, it will probably look at the block below, but not always if you are bigger than half a block.

How the boat handles friction is a different story. 🙂

 

Overriding is probably difficult since the checks are calculated using the entities location to find the relevant block.

This is only indirectly related to your block given that the entity will be standing on top of your bounding box.

This means there is no place where it looks at your block during the calculation.

  • Thanks 1

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Posted
10 minutes ago, Draco18s said:

Clarification required.

My block is as thin as a snow layer. When I put two on top of each other (so with most of a block of empty space between them, like stacking carpets) the friction when walking on top of the top one is correct, suggesting that it's calculating based off the friction of the block below: i.e. the layer underneath it.

This matches warjort's info, which says that the game calculates friction based on the block 0.5 blocks below the bottom of the entity.

Hm. Perhaps it would work if I turned the block below into a 'slicked block' containing its previous state as data somehow and possessing the correct friction. That seems a bit overkill though, so I might just use SpeedFactor instead.

Posted (edited)
40 minutes ago, Syric said:

This matches warjort's info, which says that the game calculates friction based on the block 0.5 blocks below the bottom of the entity.

My info*
I looked at the code for it back in 2013, which was in the linked bug report. Warjort just rephrased it.

40 minutes ago, Syric said:

My block is as thin as a snow layer. When I put two on top of each other (so with most of a block of empty space between them, like stacking carpets)

That's what I thought, but I wasn't sure if you meant like carpets or like snow layers where you can make the block thicker, but still take up less than a full block.

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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