#How do you call Vectors (Velocity/Location)?

1 messages · Page 1 of 1 (latest)

tidal lark
#

Error: cannot read property of 'y' at...

I am unsure how to reference velocity and location now. According to the docs it should still just be

player.velocity.y```
ancient rapids
#

We need verson based docs current they like 1.19.70

tidal lark
#

That's what I was looking for. Why is there no Preview tag

#

@lone sonnet

ancient rapids
#

There is

tidal lark
#

But beta refers to the different modules that are still in beta

ancient rapids
#

It just preview stable

lone sonnet
#

actualy tru3

tidal lark
#

Preview != beta

#

Preview isn't stable either

lone sonnet
#

post tags

#

?

tidal lark
#

yes

#

ahh okay, I needed to read more of the documentation

lone sonnet
#

ok if people use Experimental APIs / Beta APIs they should test on latest version

#

that my opinion

#

use Stable API 😂

#

jk

tidal lark
#

so I guess my question is how would you then get the x, y or z location/velocity

nimble summit
#

player.getVelocity().y (1.19.70+)

tidal lark
#

ah

lone sonnet
#

ya

#

ya 1.19.70.20 has confusing changelog

tidal lark
#

how would this work for blocks?

lone sonnet
#

blocks?

tidal lark
#

since Location nand BlockLocation no longer exist

lone sonnet
#

location is not same as velocity

#

Vector3 then

nimble summit
#

player.viewDirection = player.getViewDirection()
player.velocity = player.getVelocity()

tidal lark
#

my question was more geared towards how these have changed, thank you

ancient rapids
#

maby they just havent updatedd it to 71

lone sonnet
tidal lark
#

I had it installed a day before I built my new computer

#

needs a way to discern between someone on preview builds vs stable

#

since there are instances where there are huge changes occuring

#

like right now

ancient rapids
#

no it is

tidal lark
#
player.tell(` PLAYER VELOCITY: ${player.getVelocity().y}`);```
#

this does not work

ancient rapids
tidal lark
#

.70.21

lone sonnet
#

sendMessage

#

read changelog maybe

#

thats version was huge

tidal lark
#

It didn't say player.tell was changed to sendMessage

#

it only said world and beforeChatEvent

lone sonnet
#

there is no sendMessage in BeforeChat

#

lol

ancient rapids
#

make a package.json with just {} and run npm i --save @minecraft/server@beta and look at the typings for docs

tidal lark
#

what?

#

what are you talking about

ancient rapids
lone sonnet
#

try it then xd

#

gtg its 2 am for me

#

bye

tidal lark
#

works for me

lone sonnet
#

tell -> sendMessage

tidal lark
#

yes

#

that's what I said

lone sonnet
#

ya but for players

tidal lark
#

The changelogs do not say anywhere that player.tell has changed to sendMessage

lone sonnet
#

no for BeforeChat

tidal lark
#

It says BeforeChatEvent dude

lone sonnet
#

changelog is autogenerated so itsnot always like that

ancient rapids
tidal lark
#

It's not

#

oh wait

lone sonnet
#

lol

#

xd

tidal lark
#

I am sorry

lone sonnet
#

nvm

ancient rapids
#

thats the player class

tidal lark
#

yes

#

🥹

lone sonnet
#

bye

ancient rapids
#

thats why you use the typings as docs

tidal lark
#

goodbye

ancient rapids
#

bye

tidal lark
#

have to reinstall them

#

installed them on my old pc a day before I built my new one

ancient rapids
#

you can just open the pack in the integrated terminal it will create a node_modules folder with the typings