-
Notifications
You must be signed in to change notification settings - Fork 100
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.17.1 support #650
base: master
Are you sure you want to change the base?
1.17.1 support #650
Conversation
Looks like tests are passing. Do things seem to work? |
} | ||
}, // FIXME: fake heightmap | ||
chunkData: chunk.dump(), | ||
blockEntities: [] | ||
}) | ||
if (registry.supportFeature('lightSentSeparately')) { | ||
if (registry.supportFeature('dimensionDataIsAvailable')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the feature seems unrelated with the content of this if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied directly from mineflayer code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/PrismarineJS/mineflayer/blob/5c71edf48bb2f2dfa16cddb9af5baa0c4d55cf0d/lib/plugins/blocks.js#L264 definitely has the same issue
THINGS DO NOT WORK. Particularly, world saving is completely borked and sometimes the server crashes when trying to send chunk packets (all to do with the palette set to null error). |
I made PrismarineJS/prismarine-provider-anvil#74 which I think should fix this anvil problem Can you check if that helps the error you were seeing @Pandapip1 ? |
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: npm/[email protected] |
I'm still getting the following error, even after updating:
|
ok that's a different error than the palette |
would be great to have a test showing this, would make it faster to debug |
PrismarineJS/prismarine-provider-anvil#75 / PrismarineJS/prismarine-provider-anvil#73 is the blocker here |
hey getting now this error March 29th 2024, 18:47:08 [ERROR]: Error: TypeError: this.skyLightMask.toLongArray is not a function after world safe in 1.17.1 but yeah im tryng to fix it at moment i just dont know if its has somthing to do whit the anvil or just whit the chunkColumn.js |
i also try fixing redstone like piston activated and all stuff |
i fixed this error |
just need to fix the lightnigs |
ok made now the 1.17.1 support |
oh no relised world dosnt safe you just can join and build but nothing gets saved |
@rom1504 in which file is the savin logik? |
I'm coming to the conclusion that the problem is not in player.sendChunk, but in the generation of the chunk using Anvil I could observe that at some moments, sectionMask and skyLightMask stop being a BitArray and become Number. If you put a try/catch to temporarily hide this action, the world works perfectly, but it only renders what is in memory and some random chunks. It is also noticeable that the map is not being saved and there is no log confirming that the save was made. I thought about doing a /save command to force this action. The conclusion I came to is that the creation of the chunk is breaking (it is obvious that you have also noticed, right?) |
Apparently I discovered the problem with the chunks! Because some BitArrays return as numbers, it ends up implying in the lighting dump. The first thing I did regarding sectionMask is to just change Prismarine-Chunk so that the getMask method returns undefined if sectionMask is not an object (or a BitArray) And for skyLightMask, you can simply ignore the supportFeature dimensionDataIsAvailable and lightSentSeparately (JUST FOR TESTING OK?) Now, every time we turn on the server, the world will remain intact, but a new problem appears. The new problem is that now, if a player joins/leaves the server (I'm not sure), the chunk automatically corrupts and the save will be empty. Summary: |
I found something interesting. The problem seems to be in world.js, but nothing related to chunk or anvil (but we can't rule out this hypothesis). Look carefully at the save method of player. If we put any item in the inventory and click to destroy it, it will work perfectly. But if you log out of the server and log back in, you will notice that it will no longer be possible to destroy items in the inventory. This problem only occurs if you follow these steps. I've tried restarting the server and it only works when the user logs back in. Could the problem be with the player logging out or some save method? |
I still think PrismarineJS/prismarine-provider-anvil#73 (comment) this is the issue |
I'll follow your line of reasoning and explore Anvil then. I'll explore 1.18 and see what I can adapt. |
You're right @rom1504 , it's about the anvil I just copied /src/1.14/chunk.js to create a completely modified one. Writing chunk for 1.17.1 is being affected, the problem is in writing the chunks and not in reading them. The test I just did was to copy the writeSections function from /src/1.18/chunk.js and make some adaptations. The mask errors disappeared, now I just need to adapt them to save correctly, but now there are no crashes when rendering the map and no chunks are corrupted (not like before) |
Blocked by
PrismarineJS/diamond-square#15, PrismarineJS/prismarine-provider-anvil#73.