Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invisible blocks on some servers #273

Open
HashimTheArab opened this issue Dec 2, 2024 · 3 comments
Open

Invisible blocks on some servers #273

HashimTheArab opened this issue Dec 2, 2024 · 3 comments

Comments

@HashimTheArab
Copy link
Contributor

HashimTheArab commented Dec 2, 2024

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

invis.mov
@GameParrot
Copy link
Contributor

Does it only happen on servers with custom blocks?

@HashimTheArab
Copy link
Contributor Author

HashimTheArab commented Dec 2, 2024

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

@GameParrot
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants