Create

Create

86M Downloads

Game crash caused by Attribute Filter

if-OFF opened this issue · 1 comments

commented

Describe the Bug

When add a written book to attribute filter and choose "is the first-generation copy" , the game will crash. If the game is still working, put it on a brass funnel and it will crash.

I've tried for 4 times, in the first three times the game crashed after I put the attribute filter on the filter slot of the brass funnel, and the last time(in the video), the game crashed just after I set the attribute filter.

Reproduction Steps

In the video.

Expected Result

The game won't crash

Screenshots and Videos

1.mp4

Crash Report or Log

https://gist.github.com/336254/62257444ea5494bfb00b356a85b4fb1c

Operating System

Windows 10

Mod Version

0.5.0d

Minecraft Version

1.18.2

Forge Version

40.1.60

Other Mods

Macaw's Bridges, Farmer's Delight, Flywheel, Create, Xaero's Minimap, Create Deco, Xaero's World Map, Create Crafts & Additions, Just Enough Items, Applied Energistics 2

Additional Context

The launcher said the game crashed because the entity "Minecraft:player" unable to work properly.

I'm from China so my English isn't relly good, so there might be some grammar mistakes in my report, sorry for that😂

commented

Method AttributeFilterContainer#saveData called twice from client and server.
Serverside selectedAttributes doesn't have Pair.first<ItemAttribute> but clientside handles it fine.
Thats because method FilterScreenPacket#handle invokes static ItemAttribute.fromNBT(data) but NBT tag deserialization depends on default value BookCopyAttribute.generation=-1.
Trying to fix this behaviour.