Fix incorrect ListTag.getLongArray result (MC-260378) (#9351)

This commit is contained in:
CreativeMD authored and GitHub committed 2023-02-24 13:16:32 -08:00
1 parent 62ce55d8d7
commit 121120aee1
1 file changed
+12
@@ -0,0 +1,12 @@
--- a/net/minecraft/nbt/ListTag.java
+++ b/net/minecraft/nbt/ListTag.java
@@ -224,7 +_,8 @@
public long[] m_177991_(int p_177992_) {
if (p_177992_ >= 0 && p_177992_ < this.f_128716_.size()) {
Tag tag = this.f_128716_.get(p_177992_);
- if (tag.m_7060_() == 11) {
+ // FORGE: Fix MC-260378 by using correct constant for long array tag which is Tag.TAG_LONG_ARRAY
+ if (tag.m_7060_() == 12) {
return ((LongArrayTag)tag).m_128851_();
}
}