zhuowei / MCPELauncher

Source code for BlockLauncher, a launcher that patches Minecraft for Android
Apache License 2.0
671 stars 193 forks source link

No manual? Entity.setPosition(); does not seem to work? #1459

Open ghost opened 7 years ago

ghost commented 7 years ago

I just downloaded this to try to get my Minecraft obsessed daughter to do some programming.

First, where is the manual? All I find are dead threads crying for someone to come back? I haven't found anything in 2017, and mostly it's just kids on youtube from 3 years ago? Is there official, up to date, documentation to go by?

Second, I try Entity.setPosition(Player.getEntity(),706.5,69.62,-28.5); and nothing happens. No error, or hints, just nothing.

I tried setPosition(getPlayerEnt(), Player.getX(),Player.getY()+1,Player.getZ()); as well, but it seems 'setPosition' is the old way of doing it, as well as the getX() directly from player, but then those work because I can clientMessage my coordinates with them.

I know these are basic questions, but I have nowhere to ask them, and no documentation to rely on. Am I doing something wrong, or is this broken?

jplosier commented 7 years ago

Try setPosition(Player.getEntity(), Player.getY()+1,Player.getZ());

You might try the info at https://github.com/Connor4898/ModPE-Docs/wiki/Old-Functions-Page to start.

Also, I just found https://code.org/minecraft that looks like a promising start for young beginners. Start with Adventurer, then Designer.

CtrlAltCuteness commented 6 years ago

ModPE mods are normally made in Javascript, and you can get a "very ugly" dump of what is available, minus one hook not dumped but kindly shown below:

// can use preventDefault();
function procCmd(cmd)

This hook allows processing chat commands (chats that start with /, but that first / is ommitted in the string argument given to the hook -- and this hook only fires when typed by the person running the script, thus the official command blocks cannot utilize this feature at this time)