[MCPE-7091] CompoundTag::putLong has wrong parameter type (should be long long, not long) Created: 13/Apr/14  Updated: 02/Jun/18  Resolved: 14/Apr/14

Status: Resolved
Project: Minecraft (Bedrock codebase)
Component/s: None
Affects Version/s: 0.8.1
Fix Version/s: 0.9.0 Build 1

Type: Bug
Reporter: Zhuowei Zhang
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Relates
relates to MCPE-18739 Entering a seed past a 32bit integer ... Resolved
Confirmation Status: Unconfirmed
Platform: Tablet - Android - Asus Nexus 7

 Description   

The NBT library included in MCPE can load TAG_Long values fine, but when saving, only 32 bits are saved, because the save method is declared as

CompoundTag::putLong(std::string const&, long)

when it should be declared as

CompoundTag::putLong(std::string const&, long long)

On ARM, long is a 32-bit integer, and long long is the 64 bit integer.

This affects world time and world seed, since as far as I know those values are the only values stored as longs.



 Comments   
Comment by Delvin4519 [ 02/Jun/18 ]

MCPE is the only version of Minecraft using 32bit, Java and 4J studios Console edition use 64bit. So it limits possibilites of world seeds

Comment by [Mojang] Shoghi Cervantes [ 13/Apr/14 ]

World seed is sent as a 32-bit Integer, and if I remember right, it was saved as a 32-bit number

Generated at Sat Jan 11 14:35:17 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.