Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 16 14:35
    darvinde commented #465
  • Sep 16 12:08
    darvinde opened #525
  • Sep 14 07:14

    dependabot[bot] on npm_and_yarn

    (compare)

  • Sep 14 07:14
    dependabot[bot] closed #522
  • Sep 14 07:14
    dependabot[bot] commented #522
  • Sep 14 07:14
    dependabot[bot] labeled #524
  • Sep 14 07:14
    dependabot[bot] opened #524
  • Sep 14 07:14

    dependabot[bot] on npm_and_yarn

    Bump jest from 26.6.3 to 27.2.0… (compare)

  • Sep 12 14:48

    dependabot[bot] on npm_and_yarn

    (compare)

  • Sep 12 14:48
    dependabot[bot] commented #520
  • Sep 12 14:48
    dependabot[bot] closed #520
  • Sep 12 14:48
    rom1504 commented #520
  • Sep 10 23:58
    CriminosaMC commented #523
  • Sep 10 23:36
    CriminosaMC opened #523
  • Sep 09 07:11

    dependabot[bot] on npm_and_yarn

    (compare)

  • Sep 09 07:11
    dependabot[bot] closed #521
  • Sep 09 07:11
    dependabot[bot] commented #521
  • Sep 09 07:11
    dependabot[bot] labeled #522
  • Sep 09 07:11
    dependabot[bot] opened #522
  • Sep 09 07:11

    dependabot[bot] on npm_and_yarn

    Bump jest from 26.6.3 to 27.1.1… (compare)

rom1504bot
@rom1504bot
<Dennis_> so yes it would probably work with flying squid too
<Dennis_> lemme find my code
<Dennis_> (yes i did write all code in a single file.. smh old me)
rom1504bot
@rom1504bot
<paradise> Well, makes it easier to read for me, ty
rom1504bot
@rom1504bot
<the9g> okay tests are failing now on master by just cloning and running npm i, this should be fixed
rom1504bot
@rom1504bot
<the9g> how did the login packet end up messed up
<the9g> looks like someone just overwrote the 1.8 login packet
<the9g> with the new login packet
rom1504bot
@rom1504bot
rom1504bot
@rom1504bot
<yourfriend> My eyes are burning
<yourfriend> Please stop this blasphemy
rom1504bot
@rom1504bot
<Ic3Tank> Yeah flying-squid 1.12 is not working
<Ic3Tank> ok nvm it just crashes if you use a world that was generated in 1.16
rom1504bot
@rom1504bot
<Ic3Tank> Is it possible to load plugins for flying-squid like it is for mineflayer? This line https://github.com/PrismarineJS/flying-squid/blob/73dd100d6f29c9e8b053e6f176da339254df102f/src/index.js#L51 looks like its only possible to load plugins that are in the same directory as flying-squid files.
rom1504bot
@rom1504bot
<Dennis (pingme)> i am trying to,,,
rom1504bot
@rom1504bot
<Ic3Tank> Im making a sort of virtual gui for players with flying-squid were flying squid is sending open_window packets. But if the player clicks on slots in the window it sometimes throws errors in other parts off flying-squid that expect window clicks. Are there proposals to introduce something like an event handler were you can cancel incoming events?
rom1504bot
@rom1504bot
<roblox22r3> Why are you a bot?
<ghqst> probably IRC
<ghqst> or gitter or whatever
rom1504bot
@rom1504bot
<rom1504> yeah was still using irc at the time
<rom1504> then too many things moved to discord and I gave up
rom1504bot
@rom1504bot
<Ic3Tank> Im loading a schematic into a world in flying-squid but the blocks dont update for the player until the reloads the chunks. Is there a method in flying-squid to set blocks with block updates?
<Ic3Tank> This is what im using right now js const schematic = await loadSchematic(Path.join(__dirname, '../../../schematics', '0_0.json')) console.info('Pasting') schematic.forEach((block, pos) => { console.info(pos, block.name) world.setBlock(at.plus(pos), block) }) world is from serv.command.add({ action(_, ctx) { ctx.player.world }})
rom1504bot
@rom1504bot
<Ic3Tank> Ok figured out how to use player.setBlock. Is there currently a better way to set a large amount off blocks at once without having to send a block update for every block you place?
rom1504bot
@rom1504bot
<Ic3Tank> Does flying squid implement this packet? https://wiki.vg/Protocol#Multi_Block_Change
<nickelpro> Flying Squid is to node-minecraft-protocol's Server what Mineflayer is to it's Client. Which is a long way of saying "yes"
<nickelpro> node-minecraft-protocol implements all packets, and therefore Flying Squid implements all packets
rom1504bot
@rom1504bot
rom1504bot
@rom1504bot
<Ic3Tank> So I guess I can use the serv.updateBlock function to push updates to a queue that are then all send at the same time with a multi block change?
<Ic3Tank> Hm looks like the block updates only allow for updating of blocks. But I guess I can add a block update to every block placed after adding all blocks directly into the world. Then the server should send a multi block update packet updating all added blocks.
rom1504bot
@rom1504bot
<Ic3Tank> Does not seam to work for me. js async function pastSchematic(serv, world, at) { const schematics = await loadSchematicFolder(Path.join(__dirname, '../../../schematics')) for (const key in schematics) { let [x, z] = key.split('_') x = parseInt(x) z = parseInt(z) if (isNaN(x) || isNaN(z)) throw new Error('Parsing number failed ' + x + ' ' + z) const cursor = new Vec3(x * 16, 0, z * 16) console.info('Pasting', key, 'at', cursor.plus(at)) const schematic = schematics[key] await schematic.forEach((block, blockPos) => { let pos = blockPos.plus(cursor).plus(at) world.setBlock(pos, block) serv.updateBlock(world, pos, serv.tickCount, serv.tickCount + 1, false, null) }) return } } this is my function to paste multiple schematic. It does work in pasting the schematic into the world but players in the same chunk dont receive block updates about the changes in the world.
<Ic3Tank> I think it does not work because the update handler does not think the block changed. It would be nice if there was a function like setBlockQueue that would collect all blocks within a server tick and then send block changes on the next server tick to players in the area.
<Ic3Tank> As serv.updateBlock seams to be designed to update changed blocks like furnace lighting up or doors changing states?
rom1504bot
@rom1504bot
<Grooble_> Not sure the implementation is working well by the way
rom1504bot
@rom1504bot
<nickelpro> What's broken? If you have a reproducible example please open an issue
<nickelpro> Post-flattening there's no difference between "updating" a block and "changing" a block. Both swapping out the state ID of a given block coordinate
rom1504bot
@rom1504bot
<rom1504> @Ic3Tank did you try yet the existing plugin handling schematic for flying-squid?
rom1504bot
@rom1504bot
<Ic3Tank> No I did not. But it looks like the plugin uses schematic-to-world and that just loads a new world with the schematic in it. What I wanted to do was paste a schematic into a existing world. But its not really important anyway as I was just testing some stuff.
rom1504bot
@rom1504bot
<rom1504> No it doesn't create a new world, it adds a schematic in an existing world
<rom1504> https://github.com/rom1504/flying-squid-schematic/blob/master/plugin.js#L34 and then that's the plugin way to send stuff to players
rom1504bot
@rom1504bot
<rom1504> No it doesn't create new chunks
rom1504bot
@rom1504bot

<paradise> ehm I'm getting ```js
node_modules/flying-squid/src/lib/plugins/chat.js:3
if(whitelist.type === 'player') whitelist = [whitelist]

TypeError: Cannot read property 'type' of undefined
at MCServer.serv.broadcast (node_modules/flying-squid/src/lib/plugins/chat.js:3:19)~~and my code is~~js
module.exports.server = function(serv) {
serv.broadcast("etc");
}```

rom1504bot
@rom1504bot
<paradise> had to wrap it within a listening event
rom1504bot
@rom1504bot

<paradise> does flying-squid have no inventory support? eg bukkit has ```java
player.getInventory().setItem(itemPosID, itemStack);

// or, for armor

player.getInventory().setHelmet(itemStack);```

rom1504bot
@rom1504bot
<U9G> because nobody worked on it
rom1504bot
@rom1504bot
<paradise> hmm, is there any way to build a raw packet to send to the player? because minecraft-data doesn't seem to have the packet for it either, and player._client.write is expecting a chunk argument
<paradise> perhaps it's packet_set_slot nvm