Remove achievements (superseded by advancements)

This commit is contained in:
Jonas Herzig 2017-08-20 00:24:49 +02:00
parent eadc9a7eb3
commit 1ca2a9c8ac
3 changed files with 2 additions and 81 deletions

View file

@ -29,7 +29,6 @@ import com.github.steveice10.mc.protocol.data.game.scoreboard.ScoreboardPosition
import com.github.steveice10.mc.protocol.data.game.scoreboard.TeamAction;
import com.github.steveice10.mc.protocol.data.game.scoreboard.TeamColor;
import com.github.steveice10.mc.protocol.data.game.setting.Difficulty;
import com.github.steveice10.mc.protocol.data.game.statistic.Achievement;
import com.github.steveice10.mc.protocol.data.game.statistic.GenericStatistic;
import com.github.steveice10.mc.protocol.data.game.window.AdvancementTabAction;
import com.github.steveice10.mc.protocol.data.game.window.ClickItemParam;
@ -571,41 +570,6 @@ public class MagicValues {
register(EnterCreditsValue.SEEN_BEFORE, 0);
register(EnterCreditsValue.FIRST_TIME, 1);
register(Achievement.TAKING_INVENTORY, "achievement.openInventory");
register(Achievement.GETTING_WOOD, "achievement.mineWood");
register(Achievement.BENCHMARKING, "achievement.buildWorkBench");
register(Achievement.TIME_TO_MINE, "achievement.buildPickaxe");
register(Achievement.HOT_TOPIC, "achievement.buildFurnace");
register(Achievement.ACQUIRE_HARDWARE, "achievement.acquireIron");
register(Achievement.TIME_TO_FARM, "achievement.buildHoe");
register(Achievement.BAKE_BREAD, "achievement.makeBread");
register(Achievement.THE_LIE, "achievement.bakeCake");
register(Achievement.GETTING_AN_UPGRADE, "achievement.buildBetterPickaxe");
register(Achievement.DELICIOUS_FISH, "achievement.cookFish");
register(Achievement.ON_A_RAIL, "achievement.onARail");
register(Achievement.TIME_TO_STRIKE, "achievement.buildSword");
register(Achievement.MONSTER_HUNTER, "achievement.killEnemy");
register(Achievement.COW_TIPPER, "achievement.killCow");
register(Achievement.WHEN_PIGS_FLY, "achievement.flyPig");
register(Achievement.SNIPER_DUEL, "achievement.snipeSkeleton");
register(Achievement.DIAMONDS, "achievement.diamonds");
register(Achievement.WE_NEED_TO_GO_DEEPER, "achievement.portal");
register(Achievement.RETURN_TO_SENDER, "achievement.ghast");
register(Achievement.INTO_FIRE, "achievement.blazeRod");
register(Achievement.LOCAL_BREWERY, "achievement.potion");
register(Achievement.THE_END_1, "achievement.theEnd");
register(Achievement.THE_END_2, "achievement.theEnd2");
register(Achievement.ENCHANTER, "achievement.enchantments");
register(Achievement.OVERKILL, "achievement.overkill");
register(Achievement.LIBRARIAN, "achievement.bookcase");
register(Achievement.ADVENTURING_TIME, "achievement.exploreAllBiomes");
register(Achievement.THE_BEGINNING_1, "achievement.spawnWither");
register(Achievement.THE_BEGINNING_2, "achievement.killWither");
register(Achievement.BEACONATOR, "achievement.fullBeacon");
register(Achievement.REPOPULATION, "achievement.breedCow");
register(Achievement.DIAMONDS_TO_YOU, "achievement.diamondsToYou");
register(Achievement.OVERPOWERED, "achievement.overpowered");
register(GenericStatistic.CAKE_SLICES_EATEN, "stat.cakeSlicesEaten");
register(GenericStatistic.TIMES_CAULDRON_FILLED, "stat.cauldronFilled");
register(GenericStatistic.TIMES_CAULDRON_USED, "stat.cauldronUsed");

View file

@ -1,38 +0,0 @@
package com.github.steveice10.mc.protocol.data.game.statistic;
public enum Achievement implements Statistic {
TAKING_INVENTORY,
GETTING_WOOD,
BENCHMARKING,
TIME_TO_MINE,
HOT_TOPIC,
ACQUIRE_HARDWARE,
TIME_TO_FARM,
BAKE_BREAD,
THE_LIE,
GETTING_AN_UPGRADE,
DELICIOUS_FISH,
ON_A_RAIL,
TIME_TO_STRIKE,
MONSTER_HUNTER,
COW_TIPPER,
WHEN_PIGS_FLY,
SNIPER_DUEL,
DIAMONDS,
WE_NEED_TO_GO_DEEPER,
RETURN_TO_SENDER,
INTO_FIRE,
LOCAL_BREWERY,
THE_END_1,
THE_END_2,
ENCHANTER,
OVERKILL,
LIBRARIAN,
ADVENTURING_TIME,
THE_BEGINNING_1,
THE_BEGINNING_2,
BEACONATOR,
REPOPULATION,
DIAMONDS_TO_YOU,
OVERPOWERED
}

View file

@ -1,7 +1,6 @@
package com.github.steveice10.mc.protocol.packet.ingame.server;
import com.github.steveice10.mc.protocol.data.MagicValues;
import com.github.steveice10.mc.protocol.data.game.statistic.Achievement;
import com.github.steveice10.mc.protocol.data.game.statistic.BreakBlockStatistic;
import com.github.steveice10.mc.protocol.data.game.statistic.BreakItemStatistic;
import com.github.steveice10.mc.protocol.data.game.statistic.CraftItemStatistic;
@ -52,9 +51,7 @@ public class ServerStatisticsPacket implements Packet {
for(int index = 0; index < length; index++) {
String value = in.readString();
Statistic statistic = null;
if(value.startsWith("achievement.")) {
statistic = MagicValues.key(Achievement.class, value);
} else if(value.startsWith(CRAFT_ITEM_PREFIX)) {
if(value.startsWith(CRAFT_ITEM_PREFIX)) {
statistic = new CraftItemStatistic(value.substring(CRAFT_ITEM_PREFIX.length()));
} else if(value.startsWith(BREAK_BLOCK_PREFIX)) {
statistic = new BreakBlockStatistic(value.substring(BREAK_BLOCK_PREFIX.length()));
@ -83,9 +80,7 @@ public class ServerStatisticsPacket implements Packet {
out.writeVarInt(this.statistics.size());
for(Statistic statistic : this.statistics.keySet()) {
String value = "";
if(statistic instanceof Achievement) {
value = MagicValues.value(String.class, (Achievement) statistic);
} else if(statistic instanceof CraftItemStatistic) {
if(statistic instanceof CraftItemStatistic) {
value = CRAFT_ITEM_PREFIX + ((CraftItemStatistic) statistic).getId();
} else if(statistic instanceof BreakBlockStatistic) {
value = BREAK_BLOCK_PREFIX + ((BreakBlockStatistic) statistic).getId();