After the “Custom Data Serialization Changes” update, player login with custom data will fail with error:
[18:09:59 WARN]: Failed to handle packet for /127.0.0.1:50886
net.minecraft.util.ReportedException: Loading entity NBT
at net.minecraft.entity.Entity.func_70020_e(SourceFile:1525) ~[sn.class:?]
at net.minecraft.world.storage.SaveHandler.func_75752_b(SourceFile:176) ~[bbt.class:?]
at net.minecraft.server.management.PlayerList.func_72380_a(SourceFile:283) ~[mt.class:?]
at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(SourceFile:1214) ~[mt.class:?]
at net.minecraft.server.management.PlayerList.func_72355_a(SourceFile:1173) ~[mt.class:?]
at net.minecraft.server.network.NetHandlerLoginServer.func_147326_c(SourceFile:120) ~[mk.class:?]
at net.minecraft.server.network.NetHandlerLoginServer.func_73660_a(SourceFile:66) ~[mk.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(SourceFile:232) ~[er.class:?]
at net.minecraft.network.NetworkSystem.func_151269_c(SourceFile:187) [mh.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:1603) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:335) [lh.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:562) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:466) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_71]
Caused by: java.util.NoSuchElementException: No value present
at java.util.Optional.get(Unknown Source) ~[?:1.8.0_71]
at org.spongepowered.common.data.util.DataUtil.deserializeManipulatorList(DataUtil.java:158) ~[DataUtil.class:1.11.2-6.1.0-BETA-3]
at net.minecraft.item.ItemStack.readFromNbt(SourceFile:2283) ~[afj.class:?]
at net.minecraft.item.ItemStack.handler$onRead$zge000(SourceFile:2116) ~[afj.class:?]
at net.minecraft.item.ItemStack.<init>(SourceFile:139) ~[afj.class:?]
at net.minecraft.entity.player.InventoryPlayer.func_70443_b(SourceFile:459) ~[aax.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70037_a(SourceFile:805) ~[aay.class:?]
at net.minecraft.entity.player.EntityPlayerMP.func_70037_a(SourceFile:175) ~[ly.class:?]
at net.minecraft.entity.Entity.func_70020_e(SourceFile:1516) ~[sn.class:?]
... 13 more
[18:09:59 INFO]: com.mojang.authlib.GameProfile@4e72c862[***] (/127.0.0.1:50886) lost connection: Internal server error
Question is, why DataView#getString
return empty result?
DataQueries.DATA_ID.toString()
get “ManipulatorId”
public static SerializedDataTransaction deserializeManipulatorList(List<DataView> containers) {
checkNotNull(containers);
final SerializedDataTransaction.Builder builder = SerializedDataTransaction.builder();
for (DataView view : containers) {
updateDataViewForDataManipulator(view);
final String dataId = view.getString(DataQueries.DATA_ID).get();
The view is:
MemoryDataContainer{
safety=NO_DATA_CLONED,
map= {
DataClass=arkutil.data.ArkData,
ManipulatorData=MemoryDataView {
path=ManipulatorData,
safety=NO_DATA_CLONED,
map= {
ContentVersion=1,
ark=MemoryDataView {
path=ManipulatorData.ark,
safety=NO_DATA_CLONED,
map= {
buttontype=MemoryDataView {
path=ManipulatorData.ark.buttontype,
safety=NO_DATA_CLONED,
map= {
pluginid:enum=MemoryDataView {
path=ManipulatorData.ark.buttontype.pluginid:enum,
safety=NO_DATA_CLONED,
map= {
name=NONE
}
}
}
},
exchangerate=0.92,
expire=1,
boundedplayer=MemoryDataView {
path=ManipulatorData.ark.boundedplayer,
safety=NO_DATA_CLONED,
map= {
UuidMost=0,
UuidLeast=0
}
}
}
}
}
}
}
}
Is there any problem in the data structure?
Because people just can’t login, even if I want abandon all of my custom data, there is no easy way to do this, unless to check every single item in the server world.