#Get falling distance of an anvil

1 messages Β· Page 1 of 1 (latest)

flint hemlock
#

Any ideas ??

chrome kiln
#

do you wanne get it when the fallingblock lands ?

vivid tinsel
#

Save the location when it starts to fall and get location where it lands

#

Then calculate height difference

flint hemlock
chrome kiln
#

EntityChangeBlockEvent `?

flint hemlock
#

Yep

chrome kiln
#

i dont think it wont work....

flint hemlock
chrome kiln
#

tested it ....

#

dont work πŸ˜„

#

getTicksLived and calculate from the ticks how long it was falling and with that the distance ^^

#

asserting just falling down

flint hemlock
#

I try it and I show you results…

#

Thanks 😊

chrome kiln
#

for what do you need this ^^ ?

#

it actually has a changing falldistance

#

but when the event gets called its too late

flint hemlock
#

@chrome kiln The solution works !

flint hemlock
chrome kiln
#

ahmmm you should use SHIFT+WIN+S to create screenshots and not use your handy πŸ˜„

flint hemlock
#

Windows ?? Ahaha, what is that ?? 😁😁

chrome kiln
#

your coding on a PI ???

flint hemlock
#

Yes πŸ˜…

chrome kiln
#

tested a little bit and seems like the entity gets set on the ground before event is called and thats why falldistance is also 0

flint hemlock
#

I have trouble with my computer πŸ˜…

#

@chrome kiln Yes it is what I was thinking too

#

Thanks you very much for your support β€οΈπŸ˜„

#

Get falling distance of an anvil

chrome kiln
#

np ... looks like there cant be an fix for this since the move tick (which sets the falldistance to 0) is called and in the next tick the entity checks for collision ... but you can try to create an bug report

vivid tinsel
#

Also why are you manually obfuscating method and param names

#

That looks like a pain to work with

flint hemlock
flint hemlock
vivid tinsel
#

How so?

flint hemlock
#

Screen + bad angle with my phone lens = bad light render

vivid tinsel
#

That doesn't change method names

#

I'm talking about the fact that you're naming stuff a, b and param names as var2 etc..

#

Makes it hard for yourself to read

flint hemlock
#

Just because I am not creative Β―_(ツ)_/Β―

vivid tinsel
#

Oh well

#

Just a tip when coding

#

Name things to what they do and store

flint hemlock
#

I just naming classes

#

Yep, I will try it thanks