Ghost blocks/bugged chunks
When you set player's view distance with api to lower than what client have, you see ghost blocks/chunks, especially when walking away from them. I did some investigating and this bug is related to block changes outside of player's view distance. What can we do about it?
I don't see where this project provides a "view distance api" your talking about.
So i don't see how this project can fix something that is not even provided?
I don't see where this project provides a "view distance api" your talking about.
So i don't see how this project can fix something that is not even provided?
Don't you have viewDistance in EntityPlayer? public int viewDistance; // PaperSpigot - Player view distance API
with this simple plugin,
public final class Testplugin extends JavaPlugin {
@Override
public void onEnable() {
getCommand("test").setExecutor(this);
// Plugin startup logic
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(sender instanceof Player) {
Player player = (Player) sender;
player.spigot().setViewDistance(Integer.parseInt(args[0]));
}
return false;
}
}
after trying server/client to view-distance to 10 and tried 3 to 6 to 10 to 4
also random to 32 chunks then client to 32 and then back to 10 view-distance server it kind of unloaded slow client side server was fast
but haven't found any "ghost" chunks
even with a second client breaking block outside the other 3 viewdistance client I haven't observed your behavior
with this simple plugin,
public final class Testplugin extends JavaPlugin { @Override public void onEnable() { getCommand("test").setExecutor(this); // Plugin startup logic } @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if(sender instanceof Player) { Player player = (Player) sender; player.spigot().setViewDistance(Integer.parseInt(args[0])); } return false; } }after trying server/client to view-distance to 10 and tried 3 to 6 to 10 to 4
also random to 32 chunks then client to 32 and then back to 10 view-distance server it kind of unloaded slow client side server was fast
but haven't found any "ghost" chunks
even with a second client breaking block outside the other 3 viewdistance client I haven't observed your behavior
Try sending block change packet outside of view distance.
- Have client-side render of 10.
- Have server-side view distance to 6.
- Have player's view distance to 4.
- When you receive block change packet from outside of player's view distance and run away this chunk, when you go back to it it will have ghost blocks. You can repeat that to have even more ghost blocks.
Or I do something wrong with your steps. Or I don't get the same result then you.
video of the steps I did: https://www.youtube.com/watch?v=ice5FMWJ7Ug
also tried it by flying away even further same as video above with the changing chunks just outside the player view distance but not outside the client distance
You are placing blocks normally not sending block change packets manually, also it has to be done pretty much at the same time. That's how I was bugging it.
You are placing blocks normally not sending block change packets manually, also it has to be done pretty much at the same time. That's how I was bugging it.
~~If it was a floating block with a empty chunk and the block was the block that was touched~~ ~~by the packet then I found it and I also believe I found a solution for it that got patched in paper 1.12~~
~~ https://github.com/mechoriet/PandaSpigot/tree/pr/PacketPlayOutBlockChange-void-chunks ~~
~~Looks like this fixes that no floating block or empty void chunks on the edges of the view-distance~~
I don't understand, but if this is the fix that's not it. https://github.com/mechoriet/PandaSpigot/blob/pr/PacketPlayOutBlockChange-void-chunks/patches/server/0064-Fix-block-break-desync.patch
Bump