lrocher / CodeConnectFix

Allow use 'Code Connection for Minecraft' v1.50 with Minecraft Bedrock v1.19.x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Execute only one command

Felina-Lain opened this issue · comments

commented

Hello,
I've returned to fiddling with this tool, and I found a bug. I'm not sure if it's the minecraft version that did it (1.19.81) but when I try to use the code, if I lanch multiple blocks one after the other, only the first one get executed (and sometime executed partially)

Exemple:
image
This code, only place one single grass block:
image

and this one:
image
Only teleport the agent, but then it won't move

If there is any log to send or anything, I'll send them

Hope you have a nice day!

Hi,

I can't reproduce your issue. I have minecraft bedrock to last version (v1.19.81).
When i reproduce same blocks as you indicate, it's perform correctly.

You should have a log in console output.
Something like :

Enter '/connect 192.168.0.22:19135' to establish a connection.
If connection established, CodeConnectFix will connect to localhost:19131 and forward messages
<- [2] connected
-> [2] command: 823fb4f0-64f6-4224-a8b9-4ee08eba726e geteduclientinfo
-> [2] version: 1
<- [2] commandResponse: 823fb4f0-64f6-4224-a8b9-4ee08eba726e 0
<- [2] version: 17039360
-> [2] keyExchange: 7dfaf921-bebd-4457-b9a2-d0d7abb6e400
-> [2] command: 66a81d18-d6b3-474f-abdf-2a812b08c221 agent create
<- [2] completeEncryption
<- [2] commandResponse: 093b11f6-7948-4af2-bf76-63ddba33685e 0
<- [2] commandResponse: 66a81d18-d6b3-474f-abdf-2a812b08c221 0
-> [2] subscribe: MultiplayerRoundEnd
-> [2] subscribe: AgentCommand
-> [2] commandLegacy: 0 geteduclientinfo
-> [2] command: 1 geteduclientinfo
<- [2] commandResponse: 1 0
-> [2] subscribe: MultiplayerRoundStart
-> [2] subscribe: PositionCommand
-> [2] command: 5 getlocalplayername
<- [2] commandResponse: 5 0
-> [2] subscribe: PlayerMessage
-> [2] command: 11 agent create
<- [2] commandResponse: 11 0
-> [2] command: 12 agent tp
<- [2] commandResponse: 12 0
<- [2] event: PlayerMessage
-> [2] command: 13 closechat
-> [2] command: 14 fill ~5 ~ ~5 ~5 ~ ~5 grass 0 replace
<- [2] commandResponse: 13 0
<- [2] commandResponse: 14 -2147352576
-> [2] command: 15 fill ~5 ~15 ~5 ~5 ~10 ~5 sand 0 replace
<- [2] commandResponse: 15 0
<- [2] event: PlayerMessage
-> [2] command: 16 closechat
-> [2] command: 17 agent tp
<- [2] commandResponse: 16 0
<- [2] commandResponse: 17 0
-> [2] commandAgent: 18 agent move forward
<- [2] commandResponse: 18 0
<- [2] commandAgentResponse: 18 move
-> [2] commandAgent: 19 agent move forward
<- [2] commandResponse: 19 0
<- [2] commandAgentResponse: 19 move
-> [2] commandAgent: 20 agent move forward
<- [2] commandResponse: 20 0
<- [2] commandAgentResponse: 20 move
-> [2] commandAgent: 21 agent move forward
<- [2] commandResponse: 21 0
<- [2] commandAgentResponse: 21 move
-> [2] commandAgent: 22 agent move forward
<- [2] commandResponse: 22 0
<- [2] commandAgentResponse: 22 move
<- [2] event: PlayerMessage
-> [2] commandAgent: 23 closechat
-> [2] commandAgent: 24 fill ~5 ~ ~5 ~5 ~ ~5 grass 0 replace
<- [2] commandResponse: 23 0
<- [2] commandResponse: 24 0
-> [2] commandAgent: 25 fill ~5 ~15 ~5 ~5 ~10 ~5 sand 0 replace
<- [2] commandResponse: 25 0

Perhaps, it's a speed issue (my pc is a bit old and slow).
Do you see same trace ?

commented

No, I only see the first command being called and executed, even in the log:

Enter '/connect 192.168.109.1:19135' to establish a connection.
If connection established, CodeConnectFix will connect to localhost:19131 and forward messages
<- [1] connected
-> [1] command: 7c7832fc-9e8e-408d-ad37-719ddc3b3de1 geteduclientinfo
-> [1] version: 1
<- [1] commandResponse: 7c7832fc-9e8e-408d-ad37-719ddc3b3de1 0
<- [1] version: 17039360
-> [1] keyExchange: 947406e1-8aeb-4604-8b3e-16a7519a9668
-> [1] command: f88a8c13-9eb2-440d-884b-1aebd50908f8 agent create
<- [1] completeEncryption
<- [1] commandResponse: a3c9e22c-7680-4901-8eba-f9da2005da70 0
<- [1] commandResponse: f88a8c13-9eb2-440d-884b-1aebd50908f8 0
-> [1] subscribe: MultiplayerRoundEnd
-> [1] subscribe: AgentCommand
-> [1] commandLegacy: 0 geteduclientinfo
-> [1] command: 1 geteduclientinfo
<- [1] commandResponse: 1 0
-> [1] subscribe: MultiplayerRoundStart
-> [1] subscribe: PositionCommand
-> [1] command: 5 getlocalplayername
<- [1] commandResponse: 5 0
-> [1] subscribe: PlayerMessage
<- [1] event: PlayerMessage
-> [1] command: 7 closechat
-> [1] command: 9 agent create
<- [1] commandResponse: 7 0
<- [1] commandResponse: 9 0
-> [1] command: 10 agent tp
<- [1] commandResponse: 10 0

And then nothing. It just stops.
If I execute the command again nothing happens. I have to re-enter the code interface, stop the code, relaunch the code, and then I can execute the first line again, but only the first line.

My pc and internet both are good, and I allowed your patch through the firewall, so I don't think it's that?

Mhh, it's strange.
Looks like makecode is not executing the following commands.
But, i don't quite understand why.

I have push a new version with a "DEBUG mode" for additionnal information.

You must define an enviroment variable before run 'CodeConnectionFix'.
On windows, open a cmd.exe in CodeConnectionFix directory. Type 'SET NODE_ENV=development', then run CodeConnectionFix.exe or npm start.

I'm not sure if it can help to understand what wrong.

commented

Well, while running the command, when trying using npm it told me the node.js wasn't installed. Which I thought weird because it didn't need it before?
But anyway, I went to install the version that was mentioned on the main page, and now it works with the debug version?

I'm not sure if it's the debug, the node or something else, but it works, so I'm happy XD
Do you want the logs anyway? (if you want them, what folder do they save to? I couldn't find any log in the folder I have the .exe in)

I have updated package dependency, so perhaps it's fix your issue.

npm command is for run directly from repository source code. NodeJs must be installed.
But if you run windows executable CodeConnectionFix.exe you don't need NodeJs installed (everything is included in the executable).

But if it's work, it's not necessary to send debug log :)