gophertunnel icon indicating copy to clipboard operation
gophertunnel copied to clipboard

Invisible blocks on some servers

Open HashimTheArab opened this issue 1 year ago • 4 comments

When connecting with gophertunnel, many servers have "invisible blocks", hive, cubecraft, this exists on mostly every server. These blocks are not there in vanilla, but on many servers these invisible blocks can appear in the place of air, chests, or any other block. Instead of seeing obsidian, it appears to be invisible bedrock.

I've noticed by testing on play.ubgnetwork.fun that instead of individual blocks it's the entire column of blocks that's invisible. I haven't verified if this is the case on every server. This does happen on servers without custom blocks.

For some reason, this block of code fixes it, no errors are outputted

case *packet.LevelChunk:
    c, err := chunk.NetworkDecode(air, pk.RawPayload, int(pk.SubChunkCount), world.Overworld.Range())
    if err != nil {
        fmt.Println("error processing", err.Error())
        c = chunk.New(air, world.Overworld.Range())
    }

    data := chunk.Encode(c, chunk.NetworkEncoding)
    chunkBuf := bytes.NewBuffer(nil)
    for _, s := range data.SubChunks {
        chunkBuf.Write(s)
    }
    chunkBuf.Write(data.Biomes)
    chunkBuf.WriteByte(0)
    pk.RawPayload = append([]byte(nil), chunkBuf.Bytes()...)
    pk.SubChunkCount = uint32(len(data.SubChunks))

https://youtu.be/v15Z8yQcwE4

https://github.com/user-attachments/assets/4c1d1ab7-60fd-4072-8fd8-449ad14833b8

HashimTheArab avatar Dec 02 '24 12:12 HashimTheArab

Does it only happen on servers with custom blocks?

GameParrot avatar Dec 02 '24 18:12 GameParrot

I'm not sure but this could probably be the case Edit: It happens on servers without custom blocks too

HashimTheArab avatar Dec 02 '24 18:12 HashimTheArab

The hive is playable for me (no block issues) with gophertunnel I am using a custom protocol to forward start game packet and fix the falling issue

GameParrot avatar Dec 06 '24 21:12 GameParrot

Can reproduce too

JaxkDev avatar Mar 26 '25 16:03 JaxkDev