Between versions 1.20.1 ~ 1.20.2, the return value type of getMessageHistory() changed from List to net.minecraft.util.collection.ArrayListDeque (a.k.a net/minecraft/class_8623 ), so if this code is compiled on 1.20.2+, there will be a mapping problem here on both 1.20 and 1.20.1.
Bug description
When we use Repeat feature on Minecraft 1.20 or 1.20.1,
java.lang.NoSuchMethodError
will be thrown and it crashes the whole game.Steps to reproduce
Expected behavior
Repeat my last message.
Actual behavior
The game crashes.
Relevant logs
No response
Minecraft version
1.20; 1.20.1
Mod version
1.4.0.2+
Other information
Why?
https://github.com/70CentsApple/ChatTools/blob/9393597120727eb8009358ad2e045d72f195616d/src/main/java/net/apple70cents/chattools/features/chatkeybindings/Repeat.java#L24
Between versions 1.20.1 ~ 1.20.2, the return value type of
getMessageHistory()
changed fromList
tonet.minecraft.util.collection.ArrayListDeque
(a.k.anet/minecraft/class_8623
), so if this code is compiled on 1.20.2+, there will be a mapping problem here on both 1.20 and 1.20.1.在1.20.1~1.20.2两个版本之间,
getMessageHistory()
的返回值类型从List
变成了net.minecraft.util.collection.ArrayListDeque
(即net/minecraft/class_8623
),所以这份代码如果编译于 1.20.2+ 的版本,在 1.20 和 1.20.1 两个版本,此处会有映射问题。How to fix it?
Solution:
解决方法:
Check list