gnembon / carpet-autoCraftingTable

autoCraftingTable extension for carpet-mod
GNU Lesser General Public License v3.0
80 stars 27 forks source link

Potential issues with upgrading worlds to 1.18 #42

Open CarbonGhost opened 2 years ago

CarbonGhost commented 2 years ago

After a long time spent troubleshooting, I believe that Carpet AutoCraftingTable may cause chunk corruption when upgrading a 1.17.1 world to 1.18. The issue seems to specifically be related to tile entities, in corrupted chunks, tile entities will become invisible and containers will lose their items.

Steps to recreate bug:

  1. Download world
  2. Optimize in vanilla 1.17.1
  3. Optimize on vanilla 1.18
  4. Open world
  5. Go to 51 ~ 311

Seemed to fix the issue:

  1. Download world
  2. Optimize in vanilla 1.17.1
  3. Go to 51 ~ 311
  4. Optimize in vanilla 1.18
  5. Open world
  6. Tile entities in that chunk shouldn't be corrupted

Sorry for not giving a more descriptive issue, but I don't understand the bug enough to give more info.

Potential related / caused by MC-244164.

RealCrayfish commented 2 years ago

I also found that when running on a server it will lower the tps and mspt by a ton 20tps goes to 1-5tps when added

MickZi commented 2 years ago

Dealing with exacte same issue as CarbonGhost. Workaround is not a solution since loading in all builds would require immense effort.

Airblader commented 2 years ago

I'm the author of MC-244164 and I can at least confirm that I had installed carpet-autocraftingtable on the server shortly before the world download was taken that gets corrupted by updating to 1.18.

magneticflux- commented 2 years ago

My current theory, copied from MC-244164:

I believe the issue manifests when a TileEntity/BlockEntity with a non-vanilla ID is included in the list. Because in Schema2842 the DataFixer only reads types of DSL.list(TypeReferences.BLOCK_ENTITY.in(schema)) and the non-vanilla ID isn't considered a BLOCK_ENTITY so the type doesn't match. This deletes the data instead of throwing an error because the field is marked as optional.

magneticflux- commented 2 years ago

Relevant Fabric API issue here: https://github.com/FabricMC/fabric/issues/1837

rhettl commented 2 years ago

Has anyone found a real workaround for this? It's preventing me from upgrading my server 😢

gnembon commented 2 years ago

Well, it is a vanilla bug, not a carpet bug nor fabric bug.

Having said that, that's the main reason act is NOT part of any other carpet 'package', like carpet extra, since it by design violates the integrity of the vanilla worlds.

I suggest not using auto crafting table and switch to dropper crafters from carpet extra.

magneticflux- commented 2 years ago

@rhettl This works: https://github.com/apple502j/UpdateBlockEntity