Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 14 19:39
    kf106 commented #595
  • Jun 14 19:39
    kf106 commented #595
  • Jun 14 04:20
    ThallesP synchronize #599
  • Jun 11 12:52
    andriycraft commented #599
  • Jun 11 12:52
    andriycraft commented #599
  • Jun 11 12:51
    andriycraft commented #599
  • Jun 11 12:42
    ThallesP commented #599
  • Jun 11 10:09
    andriycraft commented #599
  • Jun 11 10:08
    andriycraft commented #599
  • Jun 11 10:07
    andriycraft commented #518
  • Jun 09 18:57
    ThallesP ready_for_review #599
  • Jun 09 18:55
    ThallesP synchronize #599
  • Jun 04 22:54
    ThallesP synchronize #599
  • Jun 04 21:38
    darksunlight opened #600
  • Jun 04 07:15
    andriycraft commented #553
  • Jun 03 23:17
    ThallesP synchronize #599
  • Jun 03 21:51
    ThallesP opened #599
  • Jun 03 15:34
    andriycraft closed #578
  • Jun 02 18:06
    KaffinPX commented #182
  • Jun 01 21:03
    darksunlight commented #598
rom1504bot
@rom1504bot
<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
rom1504bot
@rom1504bot
<U9G> cc @rom1504
<rom1504> CI failing