use of net.minecraft.util.TupleIntJsonSerializable in project SpongeCommon by SpongePowered.
the class StatisticDataProcessor method getVal.
@Override
protected Optional<Map<Statistic, Long>> getVal(EntityPlayerMP player) {
checkNotNull(player, "null player");
StatisticsManagerServer stats = player.getStatFile();
Map<StatBase, TupleIntJsonSerializable> data = ((IMixinStatisticsManager) stats).getStatsData();
Map<Statistic, Long> statMap = Maps.newHashMap();
for (Entry<StatBase, TupleIntJsonSerializable> statEntry : data.entrySet()) {
statMap.put((Statistic) statEntry.getKey(), (long) statEntry.getValue().getIntegerValue());
}
return Optional.of(statMap);
}
Aggregations