by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 23 20:11
    rom1504 commented #688
  • May 23 19:06
    Paultje52 commented #688
  • May 23 13:10
    rom1504 commented #721
  • May 23 11:43
    Henry00IS commented #721
  • May 23 11:36
    Henry00IS opened #721
  • May 22 21:06
    rom1504 pinned #712
  • May 22 21:06
    rom1504 pinned #235
  • May 22 20:35

    rom1504 on master

    fix require self setup require… (compare)

  • May 22 14:58
    Gjum commented #720
  • May 22 14:55
    Gjum commented #720
  • May 22 00:00
    Footsiefat commented #720
  • May 21 23:57
    rom1504 commented #720
  • May 21 23:44
    Footsiefat opened #720
  • May 21 23:38
    Footsiefat closed #719
  • May 21 23:38
    Footsiefat commented #719
  • May 21 23:12
    Footsiefat commented #719
  • May 21 22:42
    Footsiefat commented #719
  • May 21 22:41
    Footsiefat commented #719
  • May 21 22:40
    rom1504 commented #719
  • May 21 22:37
    Footsiefat commented #719
rom1504bot
@rom1504bot
<skylydev> yes
rom1504bot
@rom1504bot
<skylydev> javascript //Join player_info { action: 0, data: [ { UUID: 'dcdd1527-2485-33b9-8968-0ea2167e77d8', name: 'Gamewave567', properties: [], gamemode: 1, ping: 43, displayName: undefined } ] } //Leave player_info { action: 4, data: [ { UUID: 'dcdd1527-2485-33b9-8968-0ea2167e77d8', name: undefined, properties: undefined, gamemode: undefined, ping: undefined, displayName: undefined } ] }
<skylydev> action is 4 when player leaves
<skylydev> action is 0 when player joins
<skylydev> when player leaves it only gives me uuid
<Dennis_> then you can store uuid's in an object to see which uuid is which player's
rom1504bot
@rom1504bot
<IMaster> > @IMaster maybe you need to wait a bit before creating another one
@dada513 and how do i create a wait?
<IMaster> err Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:205:27) { errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' }this is the err
<dada513> setTimeout(() => {
// your code
}, 1000) // 1000 ms = 1 second
IMaster: don't be impatient
Romain Beaumont
@rom1504
skylydev: same as what mineflayer does ? store it using player info packet
rom1504bot
@rom1504bot
<xling> How would I go about caching chunks on connection to load them on my server instance.
<xling> I'm working on a project that creates a client, connects to the server in my config, then routes the packets from the server(whatever the ip may be) to my server instance running on localhost.
<xling> However, when I connect to my server instance, the chunks around me arent loaded.
<xling> When I type /server skyblock, or tp to an area without chunks loaded in, the chunks begin loading.
Romain Beaumont
@rom1504
Have a look at the proxy example
It sounds like what you want
rom1504bot
@rom1504bot
<SiebeDW> rom, issue is his client probalby joins before he joins the proxy. Wich means all the important packets at the start of joining in the server arent send once he logs in the server.
xling, I would recommend to cache the chunks like mineflayer (plugin: blocks.js) then once someone logs in u can loop the columns and send them
rom1504bot
@rom1504bot
<Dennis_> im gonna make a bungee-squid thing
rom1504bot
@rom1504bot
<circuit10> > how can i sent a respawn request? ive seen that there is a client_status packet in https://wiki.vg/Protocol#Client_Status but there is none in the prismarine.js doc
You can match them by the packet ID
<circuit10> It's client_command
<circuit10> @IMaster
rom1504bot
@rom1504bot
<xling> Why would I be receiving this error(context: just creating a new server instance and logging into it)
Romain Beaumont
@rom1504
What's your code
rom1504bot
@rom1504bot
<AntiCheap> I'm getting an unknown packet without server having turned on compression when I try to login with an invalid session. Is it encrypted even if the server says auth failed?
<AntiCheap> [S->C] 01 00 a2 01 30 81 9f 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 81 8d 00 30 81 89 02 81 81 00 87 6b fb 18 b7 d8 90 a2 b3 45 b9 1c ef c9 2f ab 7e 87 92 0a cd 35 8f af 88 be ae 48 72 91 15 b4 a1 bc 25 ea e5 1b 37 cd 14 05 8f e3 51 2c f1 3e 60 e1 ff 89 b2 f4 47 7e ce c3 2a 4c b8 d1 c5 8f be ee ce 45 af 61 7c 06 9d 51 f2 5b 04 c3 dc c6 9c 6e 7d 34 56 17 25 5d 81 68 c4 68 ae 39 25 6c 6d a3 7b f1 54 b6 4d d0 4f a9 f0 0e 6e c9 4b ae d0 e7 6c 91 25 bd 91 5e e8 b6 a6 0e 19 69 cc dd 02 03 01 00 01 04 99 c7 d1 16
[S->C] 73 51 5d 8d 38 da 72 77 05 36 7e 80 d3 37 88 85 c9 60 38 a6 8a f9 ab e1 d2 8d 66 e6 65 95 03 d8 43 cc 08 9e 8e d2 61 6f d0 0f 43 9a 22 c7 e1 b3 68 14 e1 f9 26 4f c6 a3 cf
<AntiCheap> Would making a request to join fix all?
<AntiCheap> This is a localhost server in online mode
rom1504bot
@rom1504bot
<AntiCheap> The response is 204 meaning it's ok but the server still says the session is invalid
rom1504bot
@rom1504bot
<AntiCheap> Solved, the server id was not in ascii, isn't an empty string always identical?
<AntiCheap> Time to implement AES D:
rom1504bot
@rom1504bot
<AntiCheap> Hi I'm still getting invalid session randomly, should I wait more than 1second before sending encryption response packet?
rom1504bot
@rom1504bot
<SoundTech> Is there any easy way to make createClient not connect automatically? I'd like to register it in an IoC container, but it's a little funky having to create a new client object to reconnect. This is what I have right now:
import {singleton} from 'tsyringe'
import {createClient, states, Client} from 'minecraft-protocol'
import Config from '../../config.json'

@singleton()
export default class MinecraftConnection {

    public client: Client

    connect(){
        this.client = createClient(Config.minecraft)
    }

    disconnect() {
        if (this.connected()) {
            this.client.end('logout')
        }
    }

    connected(): boolean {
        return this.client?.state === states.PLAY
    }
}
rom1504bot
@rom1504bot
<SoundTech> Ideally I'd just like to just be able to
import {container} from 'tsyringe'
import {Client, createClient} from 'minecraft-protcol'

container.register<Client>(Client, { useValue: createClient(Config.minecraft) })

const client = container.resolve(Client);
// As I please
client.connect()
client.disconnect()
<SoundTech> but without it connecting automatically when I register the object with the container
Romain Beaumont
@rom1504
AntiCheap: what are you coding ? I don't understand why you need to do that low level stuff
rom1504bot
@rom1504bot
This message was deleted
Romain Beaumont
@rom1504
SoundTech: you can create your own client abstraction on top of createclient that will do the behavior you exposed
When I put the name of the person in front of my message it means I'm answering to that person
rom1504bot
@rom1504bot
<AntiCheap> @rom1504 I'm trying to understand how shit works low level and make authentication from token instead of credentials
<Pork> There's already supported for token authentication in node minecraft protocol
<AntiCheap> I still wanna learn how the game works
<AntiCheap> I can understand if you're not willing to help but i'd like to learn something
Romain Beaumont
@rom1504
AntiCheap : online mode is always encrypted
That's what online mode is about
If you want to disable encryption you have to use offline mode
rom1504bot
@rom1504bot
<AntiCheap> Yes I got how it works now, I was not waiting for the end of the https request I was just looking at the header when I sent encryption response
Romain Beaumont
@rom1504
Okay