Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:50
    andriycraft commented #523
  • 16:49
    andriycraft commented #523
  • 16:47
    andriycraft commented #465
  • 16:42
    andriycraft commented #465
  • 16:41
    andriycraft commented #465
  • 16:05
    andriycraft synchronize #552
  • 15:54
    andriycraft synchronize #552
  • 15:51
    andriycraft synchronize #552
  • Jan 20 21:03
    andriycraft synchronize #552
  • Jan 20 16:30
    rom1504 commented #552
  • Jan 20 16:27
    rom1504 closed #554
  • Jan 20 16:27

    rom1504 on master

    Small changes to blockUpdates.j… (compare)

  • Jan 19 08:41
    andriycraft commented #432
  • Jan 18 16:04
    andriycraft commented #552
  • Jan 18 16:04
    andriycraft edited #554
  • Jan 18 16:04
    andriycraft commented #554
  • Jan 18 16:03
    andriycraft commented #554
  • Jan 18 16:01
    andriycraft edited #554
  • Jan 18 16:01
    andriycraft synchronize #554
  • Jan 18 16:00
    andriycraft closed #551
rom1504bot
@rom1504bot
<nickelpro> Ya that's an easy update
<directive> just need to change the require statement?
<nickelpro> Yes
rom1504bot
@rom1504bot

<Ic3Tank> Is the deploy Dockerfile for flying-squid broken? When I do docker build . -f .\deploy\Dockerfile -t flying-squid-viewer in the root directory I get ```

#8 80.78 npm ERR! code ENOENT

#8 80.78 npm ERR! syscall chmod

#8 80.78 npm ERR! path /app/node_modules/flying-squid/app.js

#8 80.78 npm ERR! errno -2

#8 80.78 npm ERR! enoent ENOENT: no such file or directory, chmod '/app/node_modules/flying-squid/app.js'

#8 80.78 npm ERR! enoent This is related to npm not being able to find a file.

#8 80.78 npm ERR! enoent

```

rom1504bot
@rom1504bot

<Ic3Tank> Is the Dockerfile in the deploy folder in flying-squid broken? ```

=> ERROR [5/6] RUN npm run prepare 0.6s

[5/6] RUN npm run prepare:

#9 0.595 npm ERR! missing script: prepare

#9 0.603

#9 0.603 npm ERR! A complete log of this run can be found in:

#9 0.603 npm ERR! /root/.npm/_logs/2021-08-15T13_15_45_065Z-debug.log

``` it want to run npm prepare but package.json does not have a prepare script

<U9G> it seems like it yeah
<Ic3Tank> The bin part in package.json also breaks when you want to build a docker image
<Ic3Tank> npm tries to change execution permissions on app.js but it fails as its not in node_modules
<Ic3Tank> Thats this error
<U9G> that does seem like a problem
<U9G> I don't know docker well enough to fix it, sorry
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?