Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 16 14:18
    andriycraft synchronize #603
  • Oct 16 14:16
    andriycraft synchronize #603
  • Oct 12 11:33
    rom1504 opened #613
  • Oct 09 20:37
    nathan130200 edited #612
  • Oct 09 20:26
    nathan130200 edited #612
  • Oct 09 20:26
    nathan130200 edited #612
  • Oct 09 20:22
    nathan130200 edited #612
  • Oct 09 20:22
    nathan130200 edited #612
  • Oct 09 20:22
    nathan130200 opened #612
  • 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)

rom1504bot
@rom1504bot
<Ic3Tank> ```
(node:30) UnhandledPromiseRejectionWarning: Error: Cannot find module 'prismarine-chunk/src/pc/1.14/ChunkSection'
Require stack:
  • /app/node_modules/prismarine-provider-anvil/src/1.14/chunk.js
  • /app/node_modules/prismarine-provider-anvil/src/chunk.js
  • /app/node_modules/prismarine-provider-anvil/src/index.js
  • /app/node_modules/prismarine-provider-anvil/index.js
  • /app/src/lib/plugins/world.js
  • /app/src/lib/requireindex.js
  • /app/src/index.js
  • /app/index.js
  • /app/examples/basic.js
    ``` anyone know what might be causing this?
<U9G> yeah, this needs the pr that prismarine-chunk has open to be pushed
rom1504bot
@rom1504bot
<Ic3Tank> So its currently broken? Or do we just need a new release for npm?
<U9G> currently broken
<Ic3Tank> Uh so the last published npm version is broken too?
<Ic3Tank> Whats the last npm version that works?
rom1504bot
@rom1504bot
<rom1504> just make a release pr
<rom1504> in anvil provider
rom1504bot
@rom1504bot
<INotSleep> ummm what
<INotSleep> flying squid??
rom1504bot
@rom1504bot
<rom1504> do you have a question?
rom1504bot
@rom1504bot
<Saiv46> Bruh, my test server has a terrible uptime
https://status.flying-squid.host/
rom1504bot
@rom1504bot
<DrunkMoon> are there any existing plugins that would prevent armour from being placed as blocks?
rom1504bot
@rom1504bot
<XTridios> armor can placed?!
rom1504bot
@rom1504bot
<DrunkMoon> turns out there's an issue from 2015 about this :/
rom1504bot
@rom1504bot
rom1504bot
@rom1504bot
<paradise> so I can see that cancelling is implemented here https://github.com/PrismarineJS/flying-squid/blob/master/src/lib/behavior.js but is there any way to set it from within an event? eg js player.on('connected', () => { this.cancelled = true; });
<paradise> without having to manually do it
rom1504bot
@rom1504bot
<U9G> I have no idea how that works
<paradise> same
<paradise> I did experiment with js serv.on('changeTime', (data, cancelled, cancelCount) => { cancelled = true; }); for example but im not sure if it'd actually work
<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