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

1.13 Connecting Blocks #856

Closed
MylesIsCool opened this Issue Jul 18, 2018 · 62 comments

Comments

Projects
None yet
@MylesIsCool
Copy link
Owner

MylesIsCool commented Jul 18, 2018

In Minecraft 1.13 the server now connects blocks by indicating a state for the block to use (north,east,south etc).

Blocks which have this issue:

  • Redstone
  • Doors
  • Fences (Iron Bars too)
  • Panes
  • Stairs
  • Chests
  • Flowers

We're looking for suggestions/help implementing this as it's quite complicated to do at a protocol level.

We'll update this issue with progress (please don't bump etc). If you have any suggestions on a possible solution let us know.

Possible solutions off the top of my head:

  • Cache chunks and calculate connections our self (heavily resource intensive)
  • Use the main thread of the server and send the connection information to ViaVersion using NMS (somewhat complicated)
    - Tell everyone to update to 1.13

All comments welcome :)

@Matsv Matsv referenced this issue Jul 18, 2018

Closed

1.13 Roadmap #819

7 of 15 tasks complete
@creeper123123321

This comment has been minimized.

Copy link
Contributor

creeper123123321 commented Jul 18, 2018

Tall grass also have this issue

@TNTUP

This comment has been minimized.

Copy link

TNTUP commented Jul 18, 2018

Affects Chests aswell. They don't connect^^

@PureGero

This comment has been minimized.

Copy link
Contributor

PureGero commented Jul 19, 2018

If you only cache the blocks that get affected, and remove them from the cache on a chunk unload/respawn packet, it shouldn't be too resource intensive right?

@Bobcat00

This comment has been minimized.

Copy link

Bobcat00 commented Jul 20, 2018

I'd like to understand the issue. In the old version, the server would send that there was, say, a fence at position A, a fence at position B, and the client would see they were adjacent and connect them. In the new version, the server sends that there's a fence at A with a connection to the east, and a fence at B with a connection to the west?

If that's the case, ViaVersion has to emulate the functionality that was removed from the client.

The intuitively obvious way is to look at all 6(?) adjacent blocks and synthesize the connections. Is that really resource intensive? Isn't it just doing what the new 1.13 servers have to do anyway? (And the old servers don't do.) I suppose it might be problematic for blocks like chests, depending on how the old version stored the data.

I suppose different solutions could be implemented for different blocks. Doors, for example, have fewer potential connections. Maybe you could fix the doors before moving on to other blocks, although I admit that's probably more work in the end.

I noticed on my 1.8.8 server if I open a gate in a row of fences, all the adjacent fences on the same level become magically connected. Not sure how that's happening. Is it client side?

Sorry for not offering any real solutions. I'm just trying to understand the situation and to spur some conversation.

@MylesIsCool

This comment has been minimized.

Copy link
Owner Author

MylesIsCool commented Jul 20, 2018

It's done client side in below 1.13 (so yes 1.8), you can check adjacent blocks but this becomes an issue across chunks.

Clients may not have the same world as everyone else, so the obvious solution ends up looping through every block in a chunk storing every chunk and calculating connections (which to me, seems computationally expensive).

Just to try help you understand :)

@awgybop1

This comment has been minimized.

Copy link

awgybop1 commented Jul 20, 2018

This is a definite issue with NoCheatPlus on 1.8 servers as it sees the player as trying to walk inside of the block and therefore flags them as using "Phase". Could you somehow spoof this using client-side blocks so that the client understands they're connected? I know this would cause a little bit of server lag(not much) due to having to check their version and spoof this too them directly but it should still be doable nonetheless?

@awgybop1

This comment has been minimized.

Copy link

awgybop1 commented Jul 20, 2018

I've fixed the glass pane issue myself by simply placing a barrier block and then having an armor stand inside of it with the glass pane equipped on top of their head, and when breaking the block the armor stand disappears, the armor stand is rotated based on the direction the block was placed. This is definitely not an "optimal" solution but could be used as a temporary work-around.

@Bobcat00

This comment has been minimized.

Copy link

Bobcat00 commented Jul 21, 2018

Thank you for your reply, Myles. So I'm guessing that ViaVersion is only working with data in one chunk at a time, so it's unable to examine possible connecting blocks in adjacent chunks? Well, that means you would only need to keep track of connections between chunks, i.e., on the chunk edges. That's a 75% reduction in the number of blocks you need to examine. Additionally, you only need to keep track of the connections that actually cross chunk boundaries, so most edge blocks will only have one possible connection. That's all you'd need to cache. All the other connections (intra-chunk) can be done when working with the chunk data. And doors can't cross chunk boundaries at all, so that's even easier; the same probably applies to flowers. Does this make sense?

@ishland

This comment has been minimized.

Copy link

ishland commented Jul 21, 2018

This bug is huge, players with 1.13 clients get stuck while walking on the fences.

@PureGero

This comment has been minimized.

Copy link
Contributor

PureGero commented Jul 21, 2018

@Bobcat00 There's also fences, iron bars, glass panes etc. When a player places one of these, ViaVersion will need to calculate it's connections when the block update gets sent to other players. The adjacent blocks will also need to be recalculated if they're also fences, etc. You could cache all of these in the chunk, but they also connect to solid blocks, so you'd also need a boolean array of the entire chunk (whether the blocks are solid or not). This array will also have to stay up to date with any changes.

Also, you'd need to cache this for every single player, which would become very resource hungry when you have 500+ players on a BungeeCord server. (None of this caching is required on the Spigot version as you could just ask the server for the block information)

Any better ideas?

@Bobcat00

This comment has been minimized.

Copy link

Bobcat00 commented Jul 21, 2018

Ahhh, I forgot about BungeeCord. Well, the bottom line is if you want to support 1.13, ViaVersion is going to have to provide the functionality that was removed from the client, one way or another.

@chilybones222

This comment has been minimized.

Copy link

chilybones222 commented Jul 21, 2018

I've noticed lava is also turned blue, and uses the same texture as water when a user is on 1.13 on a 1.12 generated world, along with the stair glitch as well.

@AmazedMender16

This comment has been minimized.

Copy link

AmazedMender16 commented Jul 22, 2018

Add Cobble Walls to the list :)

@ishland

This comment has been minimized.

Copy link

ishland commented Jul 23, 2018

You can place something next to them and change their status. And they will connect correctly (But sometimes only one fence connects incorrectly). But you have to update them every chunk loading or join.

@Rukes

This comment has been minimized.

Copy link

Rukes commented Jul 23, 2018

Is this only client visual bug?

@awgybop1

This comment has been minimized.

Copy link

awgybop1 commented Jul 23, 2018

Yes, the blocks on the server are actually connected, your Minecraft 1.13 client just doesn't see it that way is all.

@roie123400010

This comment has been minimized.

Copy link

roie123400010 commented Jul 23, 2018

I just saw that you can fix that until you disconnect, just put fence gate near fence, open it, then break it and it should be fixed until you log off

@ImEraze

This comment has been minimized.

Copy link

ImEraze commented Jul 25, 2018

Is there any chance of getting some assistance from either teams behind TheHive or Hypixel? Both have managed to fix this issue as far as I'm concerned, and I'm assuming they have decent solutions..

@awgybop1

This comment has been minimized.

Copy link

awgybop1 commented Jul 25, 2018

TheHive uses ViaVersion...

@awgybop1

This comment has been minimized.

Copy link

awgybop1 commented Jul 25, 2018

2018-07-24_22 15 54

@Chevels

This comment has been minimized.

Copy link

Chevels commented Oct 1, 2018

Thank you for your answer @ishland but I will not mount a PC under Linux just to compile a Java plugin once in my life. I think I have enough galley like that, maybe I will eventually find a charitable soul who wants to give me a jar already compiled.
Otherwise I will wait for an official update...

Bye!

@awgybop1

This comment has been minimized.

Copy link

awgybop1 commented Oct 1, 2018

Since you don't understand what to do, I'll be nice and do it for you.

@awgybop1

This comment has been minimized.

@Chevels

This comment has been minimized.

Copy link

Chevels commented Oct 1, 2018

Thank you very much @awgybop1 !! You are super nice! :)
Once again, sorry for asking you. At least I know how to do now and when I'll have more time, I will try to understand why this damn JDK refuses to install. I don't like to stay on a defeat in front of a PC^^

Kiss to all!

@AustinGarrettRichards

This comment has been minimized.

Copy link

AustinGarrettRichards commented Oct 4, 2018

Any status on the additional blocks/connections? A lot are still missing/not working fully like stairs, etc.

@Matocolotoe

This comment has been minimized.

Copy link

Matocolotoe commented Oct 5, 2018

If you are talking about the fork of Gerrygames ask him for the connected blocks
But for the official ViaVersion I don't know, it could be very fast or very slow to fix this

@awgybop1

This comment has been minimized.

Copy link

awgybop1 commented Oct 6, 2018

I've been experimenting with stairs and I've got them to almost work perfect, but not always, and sometimes they completely go invisible upon client re-login..

@RepublicanSensei

This comment has been minimized.

Copy link

RepublicanSensei commented Oct 22, 2018

Maybe detect these blocks on block place event and set block as placed blocks?

@Janmm14

This comment has been minimized.

Copy link

Janmm14 commented Oct 22, 2018

Maybe detect these blocks on block place event and set block as placed blocks?

Don't see how that could fix this issue.

@smmmadden

This comment has been minimized.

Copy link

smmmadden commented Oct 23, 2018

1.6.0 made no difference in fences or doors for 1.12.2.

@rukenantoni

This comment has been minimized.

Copy link

rukenantoni commented Oct 23, 2018

how are hypixel doing it

@DutchUser

This comment has been minimized.

Copy link

DutchUser commented Oct 23, 2018

Custom plugin. They dont use ViaVersion.

@sgdc3

This comment has been minimized.

Copy link
Contributor

sgdc3 commented Oct 23, 2018

i just host the builds, you need to report that to @Gerrygames

@PinkLolicorn

This comment has been minimized.

Copy link

PinkLolicorn commented Oct 28, 2018

I think @Gerrygames's version is real memory eater.

suspect
suspect_details

I do not recommend using this version for servers with more than 20 players online, especially for creative servers.

Repository owner deleted a comment from sgdc3 Oct 28, 2018

Repository owner deleted a comment from rukenantoni Oct 28, 2018

Repository owner deleted a comment from AustinGarrettRichards Oct 28, 2018

@MylesIsCool

This comment has been minimized.

Copy link
Owner Author

MylesIsCool commented Oct 28, 2018

See #1061 for progress.

@TNTUP TNTUP referenced this issue Oct 28, 2018

Closed

[WIP] Block connections for 1.13+ #1061

9 of 10 tasks complete
@mcraftpete

This comment has been minimized.

Copy link

mcraftpete commented Nov 1, 2018

I agree with someone else , using the GerryGames version has bad memory leak , i used it on bungee and after a few hours server crashes with out of memory , removing it the leak is gone.

@ForceUpdate1

This comment has been minimized.

Copy link
Contributor

ForceUpdate1 commented Nov 2, 2018

@mcraftpete
It is not recommended to use this version on the bungee cord.
Besides, this version is not up to date.

@MylesIsCool

This comment has been minimized.

Copy link
Owner Author

MylesIsCool commented Dec 2, 2018

Block connections will be available in the next release / also on our CI.

@MylesIsCool MylesIsCool closed this Dec 2, 2018

@bundabrg

This comment has been minimized.

Copy link

bundabrg commented Dec 3, 2018

I assume this does not yet work for ViaVersion on Bungeecord? I downloaded the latest release from CI and installed to my Bungee server but still get glitchy doors on the backend.

In my case I can't install it on the backend server because the backend is a 1.12-R2 vanilla server.

@Gerrygames

This comment has been minimized.

Copy link
Contributor

Gerrygames commented Dec 3, 2018

You have to enable the config option @bundabrg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment