Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 30 20:06
    andriycraft review_requested #603
  • Sep 30 20:06
    andriycraft review_request_removed #603
  • Sep 30 20:06
    andriycraft review_request_removed #603
  • Sep 30 20:06
    andriycraft review_requested #603
  • Sep 30 20:05
    andriycraft commented #603
  • Sep 30 20:04
    andriycraft commented #603
  • Sep 30 20:03
    andriycraft synchronize #603
  • Sep 30 20:02
    andriycraft synchronize #603
  • Sep 30 20:01
    andriycraft synchronize #603
  • Sep 30 17:48

    rom1504 on npm_and_yarn

    (compare)

  • Sep 30 17:48

    rom1504 on master

    Bump expect from 28.1.3 to 29.1… (compare)

  • Sep 30 17:48
    rom1504 closed #611
  • Sep 30 17:21
    rom1504 closed #604
  • Sep 30 17:21

    rom1504 on master

    chore: patch placement (#604) (compare)

  • Sep 30 17:17
    rom1504 commented #603
  • Sep 30 17:16

    rom1504 on master

    Slot update notification (#602)… (compare)

  • Sep 30 17:16
    rom1504 closed #602
  • Sep 30 07:26

    dependabot[bot] on npm_and_yarn

    (compare)

  • Sep 30 07:26
    dependabot[bot] closed #610
  • Sep 30 07:26
    dependabot[bot] commented #610
rom1504bot
@rom1504bot
<U9G> but imo it could be implemented much simpler like this: before any {event} fires, first check server._events if there is a listener on pre_{event}, emit an event and await the result of that event whether its true or false to decide whether to do that action
<U9G> if not, just continue forward
<U9G> the whole cancel count etc is confusing imo
rom1504bot
@rom1504bot
<U9G> @rom1504 what do you think about that
rom1504bot
@rom1504bot
<rom1504> cool, do you have it online somewhere ?
<rom1504> don't use canceling
<rom1504> it will be removed
<rom1504> there's an open issue to remove it
<paradise> damn alright thanks
rom1504bot
@rom1504bot
<paradise> im confused even more now, I can see this right here https://github.com/PrismarineJS/flying-squid/blob/73dd100d6f29c9e8b053e6f176da339254df102f/src/lib/plugins/placeBlock.js#L28 yet if I try js module.exports.server = function(serv) { // Create your server events here serv.onItemPlace('stone', () => { console.log('stone'); }); }; I get TypeError: serv.onItemPlace is not a function
rom1504bot
@rom1504bot
<Karang> thats because you are calling it too soon
<PrismarineJS> Showing lines 111 to 129 of 73dd100d6f29c9e8b053e6f176da339254df102f/src/lib/plugins/redstone.js
 111   const notifyEndOfLine = async (world, pos, dir, tick) => {
 112     const blockPos = pos.plus(dir)
 113     const block = await world.getBlock(blockPos)
 114     if (isSolid(block) && await isWireDirectedIn(world, pos, dir)) {
 115       serv.updateBlock(world, blockPos, tick, tick)
 116       serv.notifyNeighborsOfStateChangeDirectional(world, pos, dir, tick, tick)
 117     }
 118   }
 119 
>120   serv.on('asap', () => {
 121     serv.onItemPlace('redstone', () => {
 122       return { id: redstoneWireType, data: 0 }
 123     })
 124 
 125     serv.onItemPlace('redstone_torch', ({ direction }) => {
 126       const directionToData = [0, 5, 4, 3, 2, 1]
 127       // Placing an unlit torch allows to detect change on the first update
 128       // and reduce the block updates
 129       return { id: unlitRedstoneTorchType, data: directionToData[direction] }
<Karang> the asap event gets triggered once every plugins are registered
rom1504bot
@rom1504bot
<paradise> o yeah I remember something about that tx
rom1504bot
@rom1504bot
<paradise> Are there any issues with comparing blocks by their name property over id except that they might change?
rom1504bot
@rom1504bot
<Ic3Tank> I think most people use mcData to get the id off a block for a specific version and then compare with the id.
<paradise> Makes sense, just that the function annoyed me so I implemented regex to check the name property instead of ID and I'm wondering if there's an actual downside
rom1504bot
@rom1504bot
<Ic3Tank> If the name changes you have to change the name checking at multiple places. Were as with mcData you only have to change the name at one place.
<Karang> comparing id is faster than comparing name (especially when using a regex) that being said if you do it only once or twice, it shouldn't be an issue
rom1504bot
@rom1504bot
<paradise> I c
<paradise> Well ty guess I won't do a pr then 👍
rom1504bot
@rom1504bot
<DrunkMoon> In my about me
rom1504bot
@rom1504bot
<rom1504> I mean the code
<DrunkMoon> It’s uh
<DrunkMoon> Not online anywhere yet since it’s just a pretty primitive modification of diamond-square
rom1504bot
@rom1504bot
<DrunkMoon> drop iron axe -> drops coral fan
use axe -> place coral fan
break coral fan -> drops axe
drop coral fan -> drops black shulker box
break black shulker box -> drop coral fan
drop black shulker box -> nothing
<DrunkMoon> block id and item id discrepancy is pain
<U9G> yeah, its an easy fix
<U9G> submit a pr where you match based on name not based on number
<U9G> ie find the cooresponding name in blocks that was just placed
<DrunkMoon> drop iron axe -> drops coral fan
use axe -> place coral fan
break coral fan -> drops axe
use coral fan -> place coral fan
drop coral fan -> drops black shulker box
break black shulker box -> drop coral fan
drop black shulker box -> nothing
rom1504bot
@rom1504bot
<paradise> How would I go by making an entity invisible?
rom1504bot
@rom1504bot
<DrunkMoon> why does opening the crafting window alter the entire player.inventory?
https://cdn.discordapp.com/attachments/413438265475989534/880989540960043048/unknown.png
<U9G> how?
<DrunkMoon> not entirely sure what happened
<DrunkMoon> can't reproduce now
<DrunkMoon> but basically since the actual player.inventory's IDs are one lower than that of the crafting table window's
<DrunkMoon> the items in the player.inventory got moved to their respective positions as in the crafting table
rom1504bot
@rom1504bot
<DrunkMoon> Btw it doesn’t send the confirmation packets for actions right?
rom1504bot
@rom1504bot
<DrunkMoon> the inventory management is quite a mess rn
rom1504bot
@rom1504bot
<nickelpro> Lol using flying squid
<nickelpro> :salutcat:
rom1504bot
@rom1504bot
<paradise> how would I be able to retrieve an entity ID after spawning it? js const spawnedEntity = serv.spawnObject(entity.id, serv.getPlayer('user').world, serv.getPlayer('user').position, { velocity: new Vec3((Math.random() - 0.5) * 10, Math.random() * 10 + 10, (Math.random() - 0.5) * 10) }); console.log(spawnedEntity); returns undefined
rom1504bot
@rom1504bot
<DrunkMoon> what's the best way to smooth the edges
<mat> calculating the biome per-block instead of per-chunk
rom1504bot
@rom1504bot
<DrunkMoon> right
rom1504bot
@rom1504bot
<nikku> looks like you need some anti-aliasing @DrunkMoon :umad:
rom1504bot
@rom1504bot
<Juaan> Hey! I was going to work on 1.16.2+ support and it seems there's already a PR that implemented the login packet changes. Why wasn't it merged? PrismarineJS/flying-squid#518