updated Via*, added protocol selection

This commit is contained in:
FlorianMichael 2023-02-20 04:59:09 +01:00
parent c5461964be
commit 2ce8031494
15 changed files with 577 additions and 449 deletions

View File

@ -9,9 +9,9 @@ mod_version=1.0.0
maven_group=de.florianmichael
archives_base_name=every-protocol
vialoadingbase_version=ad5fd83ad1
vialoadingbase_version=15f55e6b3e
viaversion_version=4.6.0-23w07a-SNAPSHOT
viabackwards_version=4.6.0-23w07a-SNAPSHOT
vialegacy_version=f451a8ffb2
viaaprilfools_version=e98bfb8aa5
vialegacy_version=29a7082d7f
viaaprilfools_version=cd4d0a2973
mcstructs_text_version=2.2.0

View File

@ -38,6 +38,7 @@ import de.florianmichael.vialoadingbase.ViaLoadingBase;
import de.florianmichael.vialoadingbase.api.SubPlatform;
import io.netty.channel.DefaultEventLoop;
import io.netty.util.AttributeKey;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer;
import net.fabricmc.loader.api.metadata.Person;
@ -46,17 +47,18 @@ import net.minecraft.client.MinecraftClient;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.raphimc.viaaprilfools.api.AprilFoolsProtocolVersion;
import net.raphimc.vialegacy.api.LegacyProtocolVersions;
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class ViaFabricPlus {
public class ViaFabricPlus implements ClientModInitializer {
public static final AttributeKey<UserConnection> LOCAL_USER_CONNECTION = AttributeKey.newInstance("via-version-user-connection");
private final static ViaFabricPlus self = new ViaFabricPlus();
private static final ViaFabricPlus self = new ViaFabricPlus();
private final SubPlatform SUB_PLATFORM_VIA_LEGACY = new SubPlatform("ViaLegacy", () -> true, ViaLegacyPlatformImpl::new, protocolVersions -> protocolVersions.addAll(LegacyProtocolVersions.PROTOCOLS));
private final SubPlatform SUB_PLATFORM_VIA_LEGACY = new SubPlatform("ViaLegacy", () -> true, ViaLegacyPlatformImpl::new, protocolVersions -> protocolVersions.addAll(LegacyProtocolVersion.PROTOCOLS));
private final SubPlatform SUB_PLATFORM_VIA_APRIL_FOOLS = new SubPlatform("ViaAprilFools", () -> true, ViaAprilFoolsPlatformImpl::new, this::invokeAprilFoolsProtocols);
private final List<Item> availableItemsInTargetVersion = new ArrayList<>();
@ -71,13 +73,13 @@ public class ViaFabricPlus {
origin.add(v1_16_2Index - 1, AprilFoolsProtocolVersion.sCombatTest8c);
}
public void create() {
public void preInit() {
ViaLoadingBase.ViaLoadingBaseBuilder builder = ViaLoadingBase.ViaLoadingBaseBuilder.create();
builder = builder.subPlatform(SUB_PLATFORM_VIA_LEGACY);
builder = builder.subPlatform(SUB_PLATFORM_VIA_APRIL_FOOLS);
builder = builder.runDirectory(MinecraftClient.getInstance().runDirectory);
builder = builder.runDirectory(new File("ViaFabricPlus"));
builder = builder.nativeVersion(SharedConstants.getProtocolVersion());
builder = builder.singlePlayerProvider(() -> MinecraftClient.getInstance().isInSingleplayer());
builder = builder.eventLoop(new DefaultEventLoop());
@ -118,13 +120,15 @@ public class ViaFabricPlus {
availableItemsInTargetVersion.clear();
availableItemsInTargetVersion.addAll(Registries.ITEM.stream().filter(item -> ItemReleaseVersionDefinition.contains(item, protocolVersion)).toList());
});
builder.build();
}
@Override
public void onInitializeClient() {
ValueHolder.setup();
PackFormatsDefinition.load();
ItemReleaseVersionDefinition.load();
builder.build();
}
public List<Item> getAvailableItemsInTargetVersion() {

View File

@ -26,7 +26,7 @@ import de.florianmichael.viafabricplus.platform.ProtocolRange;
import de.florianmichael.vialoadingbase.api.version.ComparableProtocolVersion;
import net.minecraft.item.Item;
import net.minecraft.item.Items;
import net.raphimc.vialegacy.api.LegacyProtocolVersions;
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
import java.util.Arrays;
import java.util.HashMap;
@ -618,7 +618,7 @@ public class ItemReleaseVersionDefinition {
register(Items.ZOMBIE_VILLAGER_SPAWN_EGG, ProtocolRange.andNewer(ProtocolVersion.v1_11));
register(Items.BONE_BLOCK, ProtocolRange.andNewer(ProtocolVersion.v1_10));
register(Items.MAGMA_BLOCK, ProtocolRange.andNewer(ProtocolVersion.v1_10), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.MAGMA_BLOCK, ProtocolRange.andNewer(ProtocolVersion.v1_10), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.NETHER_WART_BLOCK, ProtocolRange.andNewer(ProtocolVersion.v1_10));
register(Items.POLAR_BEAR_SPAWN_EGG, ProtocolRange.andNewer(ProtocolVersion.v1_10));
register(Items.RED_NETHER_BRICKS, ProtocolRange.andNewer(ProtocolVersion.v1_10));
@ -803,500 +803,500 @@ public class ItemReleaseVersionDefinition {
register(Items.YELLOW_STAINED_GLASS_PANE, ProtocolRange.andNewer(ProtocolVersion.v1_7_1));
register(Items.COOKED_SALMON, ProtocolRange.andNewer(ProtocolVersion.v1_7_1));
register(Items.BLACK_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.BLACK_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.COAL_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.BLUE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.BLUE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.BROWN_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.BROWN_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.CYAN_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.CYAN_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.DIAMOND_HORSE_ARMOR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.GOLDEN_HORSE_ARMOR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.GRAY_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.GRAY_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.GREEN_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.GREEN_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.HAY_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.HORSE_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.IRON_HORSE_ARMOR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.LEAD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.LIGHT_BLUE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.LIGHT_BLUE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.LIGHT_GRAY_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.LIGHT_GRAY_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.LIME_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.LIME_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.MAGENTA_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.MAGENTA_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.NAME_TAG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.ORANGE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.ORANGE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.PINK_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.PINK_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.PURPLE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.PURPLE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.RED_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.RED_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.WHITE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.WHITE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.YELLOW_CARPET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.YELLOW_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersions.r1_6_1));
register(Items.BLACK_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.BLACK_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.COAL_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.BLUE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.BLUE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.BROWN_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.BROWN_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.CYAN_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.CYAN_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.DIAMOND_HORSE_ARMOR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.GOLDEN_HORSE_ARMOR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.GRAY_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.GRAY_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.GREEN_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.GREEN_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.HAY_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.HORSE_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.IRON_HORSE_ARMOR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.LEAD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.LIGHT_BLUE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.LIGHT_BLUE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.LIGHT_GRAY_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.LIGHT_GRAY_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.LIME_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.LIME_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.MAGENTA_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.MAGENTA_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.NAME_TAG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.ORANGE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.ORANGE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.PINK_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.PINK_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.PURPLE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.PURPLE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.RED_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.RED_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.WHITE_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.WHITE_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.YELLOW_CARPET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.YELLOW_TERRACOTTA, ProtocolRange.andNewer(LegacyProtocolVersion.r1_6_1));
register(Items.ACTIVATOR_RAIL, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.QUARTZ_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.REDSTONE_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.CHISELED_QUARTZ_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.DAYLIGHT_DETECTOR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.DROPPER, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.HEAVY_WEIGHTED_PRESSURE_PLATE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.HOPPER, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.LIGHT_WEIGHTED_PRESSURE_PLATE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.HOPPER_MINECART, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.TNT_MINECART, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.NETHER_BRICK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.QUARTZ, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.NETHER_QUARTZ_ORE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.QUARTZ_PILLAR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.QUARTZ_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.QUARTZ_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.COMPARATOR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.TRAPPED_CHEST, ProtocolRange.andNewer(LegacyProtocolVersions.r1_5tor1_5_1));
register(Items.ACTIVATOR_RAIL, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.QUARTZ_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.REDSTONE_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.CHISELED_QUARTZ_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.DAYLIGHT_DETECTOR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.DROPPER, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.HEAVY_WEIGHTED_PRESSURE_PLATE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.HOPPER, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.LIGHT_WEIGHTED_PRESSURE_PLATE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.HOPPER_MINECART, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.TNT_MINECART, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.NETHER_BRICK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.QUARTZ, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.NETHER_QUARTZ_ORE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.QUARTZ_PILLAR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.QUARTZ_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.QUARTZ_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.COMPARATOR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.TRAPPED_CHEST, ProtocolRange.andNewer(LegacyProtocolVersion.r1_5tor1_5_1));
register(Items.ANVIL, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.BAKED_POTATO, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.BAT_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.BEACON, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.CARROT, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.CARROT_ON_A_STICK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.COBBLESTONE_WALL, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.COMMAND_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.MAP, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.ENCHANTED_BOOK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.FIREWORK_ROCKET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.FIREWORK_STAR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.FLOWER_POT, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.GOLDEN_CARROT, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.ITEM_FRAME, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.MOSSY_COBBLESTONE_WALL, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.NETHER_BRICK_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.NETHER_STAR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.OAK_BUTTON, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.POISONOUS_POTATO, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.POTATO, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.PUMPKIN_PIE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.WITCH_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.ANVIL, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.BAKED_POTATO, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.BAT_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.BEACON, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.CARROT, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.CARROT_ON_A_STICK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.COBBLESTONE_WALL, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.COMMAND_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.MAP, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.ENCHANTED_BOOK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.FIREWORK_ROCKET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.FIREWORK_STAR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.FLOWER_POT, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.GOLDEN_CARROT, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.ITEM_FRAME, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.MOSSY_COBBLESTONE_WALL, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.NETHER_BRICK_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.NETHER_STAR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.OAK_BUTTON, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.POISONOUS_POTATO, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.POTATO, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.PUMPKIN_PIE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.WITCH_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
// "[The disc was] made available in survival" Is this the release in which it was added or made available?
register(Items.MUSIC_DISC_WAIT, ProtocolRange.andNewer(LegacyProtocolVersions.r1_4_2));
register(Items.MUSIC_DISC_WAIT, ProtocolRange.andNewer(LegacyProtocolVersion.r1_4_2));
register(Items.BIRCH_PLANKS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.BIRCH_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.BIRCH_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.BIRCH_WOOD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.EMERALD_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.WRITABLE_BOOK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.COCOA_BEANS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.EMERALD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.EMERALD_ORE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.ENCHANTED_GOLDEN_APPLE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.ENDER_CHEST, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.JUNGLE_PLANKS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.JUNGLE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.JUNGLE_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.JUNGLE_WOOD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.OAK_WOOD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.SANDSTONE_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.SPRUCE_PLANKS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.SPRUCE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.SPRUCE_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.SPRUCE_WOOD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.TRIPWIRE_HOOK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.WRITTEN_BOOK, ProtocolRange.andNewer(LegacyProtocolVersions.r1_3_1tor1_3_2));
register(Items.BIRCH_PLANKS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.BIRCH_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.BIRCH_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.BIRCH_WOOD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.EMERALD_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.WRITABLE_BOOK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.COCOA_BEANS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.EMERALD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.EMERALD_ORE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.ENCHANTED_GOLDEN_APPLE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.ENDER_CHEST, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.JUNGLE_PLANKS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.JUNGLE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.JUNGLE_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.JUNGLE_WOOD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.OAK_WOOD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.SANDSTONE_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.SPRUCE_PLANKS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.SPRUCE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.SPRUCE_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.SPRUCE_WOOD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.TRIPWIRE_HOOK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.WRITTEN_BOOK, ProtocolRange.andNewer(LegacyProtocolVersion.r1_3_1tor1_3_2));
register(Items.CHISELED_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.FIRE_CHARGE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.JUNGLE_LEAVES, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.JUNGLE_LOG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.JUNGLE_SAPLING, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.OCELOT_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.CHISELED_SANDSTONE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.CUT_SANDSTONE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.REDSTONE_LAMP, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.EXPERIENCE_BOTTLE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_2_1tor1_2_3));
register(Items.CHISELED_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.FIRE_CHARGE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.JUNGLE_LEAVES, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.JUNGLE_LOG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.JUNGLE_SAPLING, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.OCELOT_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.CHISELED_SANDSTONE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.CUT_SANDSTONE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.REDSTONE_LAMP, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.EXPERIENCE_BOTTLE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_2_1tor1_2_3));
register(Items.BLAZE_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.CAVE_SPIDER_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.CHICKEN_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.COW_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.CREEPER_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.ENDERMAN_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.GHAST_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.MAGMA_CUBE_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.MOOSHROOM_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.PIG_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.SHEEP_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.SILVERFISH_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.SKELETON_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.SLIME_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.SPIDER_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.SQUID_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.VILLAGER_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.WOLF_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.ZOMBIFIED_PIGLIN_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.ZOMBIE_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_1));
register(Items.BLAZE_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.CAVE_SPIDER_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.CHICKEN_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.COW_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.CREEPER_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.ENDERMAN_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.GHAST_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.MAGMA_CUBE_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.MOOSHROOM_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.PIG_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.SHEEP_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.SILVERFISH_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.SKELETON_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.SLIME_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.SPIDER_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.SQUID_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.VILLAGER_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.WOLF_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.ZOMBIFIED_PIGLIN_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.ZOMBIE_SPAWN_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_1));
register(Items.GHAST_TEAR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.BLAZE_ROD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.NETHER_WART, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.GOLD_NUGGET, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.GLASS_BOTTLE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.POTION, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.SPLASH_POTION, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.SPIDER_EYE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.FERMENTED_SPIDER_EYE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.BLAZE_POWDER, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MAGMA_CREAM, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.GLISTERING_MELON_SLICE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.ENDER_EYE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_11, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_BLOCKS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_CHIRP, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_FAR, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_MALL, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_MELLOHI, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_STAL, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_STRAD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_WARD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.BREWING_STAND, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.ENCHANTING_TABLE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.NETHER_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.NETHER_BRICK_FENCE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.NETHER_BRICK_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.END_PORTAL_FRAME, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.END_STONE, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.DRAGON_EGG, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.CAULDRON, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.GHAST_TEAR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.BLAZE_ROD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.NETHER_WART, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.GOLD_NUGGET, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.GLASS_BOTTLE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.POTION, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.SPLASH_POTION, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.SPIDER_EYE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.FERMENTED_SPIDER_EYE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.BLAZE_POWDER, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MAGMA_CREAM, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.GLISTERING_MELON_SLICE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.ENDER_EYE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_11, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_BLOCKS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_CHIRP, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_FAR, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_MALL, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_MELLOHI, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_STAL, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_STRAD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.MUSIC_DISC_WARD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.BREWING_STAND, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.ENCHANTING_TABLE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.NETHER_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.NETHER_BRICK_FENCE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.NETHER_BRICK_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.END_PORTAL_FRAME, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.END_STONE, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.DRAGON_EGG, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.CAULDRON, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
// b1.9-pre1
register(Items.MYCELIUM, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.LILY_PAD, ProtocolRange.andNewer(LegacyProtocolVersions.r1_0_0tor1_0_1));
register(Items.MYCELIUM, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.LILY_PAD, ProtocolRange.andNewer(LegacyProtocolVersion.r1_0_0tor1_0_1));
register(Items.STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.MOSSY_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.CRACKED_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.INFESTED_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.INFESTED_MOSSY_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.INFESTED_CRACKED_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.INFESTED_STONE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.BRICK_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.BROWN_MUSHROOM_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.RED_MUSHROOM_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.MUSHROOM_STEM, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.MELON, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.MELON_SEEDS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.PUMPKIN_SEEDS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.IRON_BARS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.GLASS_PANE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.OAK_FENCE_GATE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.BRICK_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.STONE_BRICK_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.CHICKEN, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.COOKED_CHICKEN, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.BEEF, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.COOKED_BEEF, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.ENDER_PEARL, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.MELON_SLICE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.ROTTEN_FLESH, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.VINE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.INFESTED_COBBLESTONE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.STONE_BRICK_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.b1_8tob1_8_1));
register(Items.STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.MOSSY_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.CRACKED_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.INFESTED_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.INFESTED_MOSSY_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.INFESTED_CRACKED_STONE_BRICKS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.INFESTED_STONE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.BRICK_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.BROWN_MUSHROOM_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.RED_MUSHROOM_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.MUSHROOM_STEM, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.MELON, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.MELON_SEEDS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.PUMPKIN_SEEDS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.IRON_BARS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.GLASS_PANE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.OAK_FENCE_GATE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.BRICK_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.STONE_BRICK_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.CHICKEN, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.COOKED_CHICKEN, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.BEEF, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.COOKED_BEEF, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.ENDER_PEARL, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.MELON_SLICE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.ROTTEN_FLESH, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.VINE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.INFESTED_COBBLESTONE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.STONE_BRICK_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.b1_8tob1_8_1));
register(Items.PISTON, ProtocolRange.andNewer(LegacyProtocolVersions.b1_7tob1_7_3));
register(Items.STICKY_PISTON, ProtocolRange.andNewer(LegacyProtocolVersions.b1_7tob1_7_3));
register(Items.SHEARS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_7tob1_7_3));
register(Items.PISTON, ProtocolRange.andNewer(LegacyProtocolVersion.b1_7tob1_7_3));
register(Items.STICKY_PISTON, ProtocolRange.andNewer(LegacyProtocolVersion.b1_7tob1_7_3));
register(Items.SHEARS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_7tob1_7_3));
register(Items.DEAD_BUSH, ProtocolRange.andNewer(LegacyProtocolVersions.b1_6tob1_6_6));
register(Items.GRASS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_6tob1_6_6));
register(Items.FERN, ProtocolRange.andNewer(LegacyProtocolVersions.b1_6tob1_6_6));
register(Items.OAK_TRAPDOOR, ProtocolRange.andNewer(LegacyProtocolVersions.b1_6tob1_6_6));
register(Items.MAP, ProtocolRange.andNewer(LegacyProtocolVersions.b1_6tob1_6_6));
register(Items.DEAD_BUSH, ProtocolRange.andNewer(LegacyProtocolVersion.b1_6tob1_6_6));
register(Items.GRASS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_6tob1_6_6));
register(Items.FERN, ProtocolRange.andNewer(LegacyProtocolVersion.b1_6tob1_6_6));
register(Items.OAK_TRAPDOOR, ProtocolRange.andNewer(LegacyProtocolVersion.b1_6tob1_6_6));
register(Items.MAP, ProtocolRange.andNewer(LegacyProtocolVersion.b1_6tob1_6_6));
register(Items.BIRCH_SAPLING, ProtocolRange.andNewer(LegacyProtocolVersions.b1_5tob1_5_2));
register(Items.COBWEB, ProtocolRange.andNewer(LegacyProtocolVersions.b1_5tob1_5_2));
register(Items.DETECTOR_RAIL, ProtocolRange.andNewer(LegacyProtocolVersions.b1_5tob1_5_2));
register(Items.POWERED_RAIL, ProtocolRange.andNewer(LegacyProtocolVersions.b1_5tob1_5_2));
register(Items.SPRUCE_SAPLING, ProtocolRange.andNewer(LegacyProtocolVersions.b1_5tob1_5_2));
register(Items.BIRCH_SAPLING, ProtocolRange.andNewer(LegacyProtocolVersion.b1_5tob1_5_2));
register(Items.COBWEB, ProtocolRange.andNewer(LegacyProtocolVersion.b1_5tob1_5_2));
register(Items.DETECTOR_RAIL, ProtocolRange.andNewer(LegacyProtocolVersion.b1_5tob1_5_2));
register(Items.POWERED_RAIL, ProtocolRange.andNewer(LegacyProtocolVersion.b1_5tob1_5_2));
register(Items.SPRUCE_SAPLING, ProtocolRange.andNewer(LegacyProtocolVersion.b1_5tob1_5_2));
register(Items.TRAPPED_CHEST, ProtocolRange.andNewer(LegacyProtocolVersions.b1_4tob1_4_1));
register(Items.COOKIE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_4tob1_4_1));
register(Items.TRAPPED_CHEST, ProtocolRange.andNewer(LegacyProtocolVersion.b1_4tob1_4_1));
register(Items.COOKIE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_4tob1_4_1));
register(Items.RED_BED, ProtocolRange.andNewer(LegacyProtocolVersions.b1_3tob1_3_1));
register(Items.REPEATER, ProtocolRange.andNewer(LegacyProtocolVersions.b1_3tob1_3_1));
register(Items.COBBLESTONE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.b1_3tob1_3_1), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.OAK_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.b1_3tob1_3_1));
register(Items.SANDSTONE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.b1_3tob1_3_1));
register(Items.RED_BED, ProtocolRange.andNewer(LegacyProtocolVersion.b1_3tob1_3_1));
register(Items.REPEATER, ProtocolRange.andNewer(LegacyProtocolVersion.b1_3tob1_3_1));
register(Items.COBBLESTONE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.b1_3tob1_3_1), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.OAK_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.b1_3tob1_3_1));
register(Items.SANDSTONE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.b1_3tob1_3_1));
register(Items.CAKE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.DISPENSER, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.LAPIS_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.LAPIS_ORE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.NOTE_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.SANDSTONE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.SPRUCE_LOG, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.BIRCH_LOG, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.SPRUCE_LEAVES, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.BIRCH_LEAVES, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.BONE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.BONE_MEAL, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.LAPIS_LAZULI, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.COCOA_BEANS, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.INK_SAC, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.CHARCOAL, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.SUGAR, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.WHITE_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.ORANGE_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.MAGENTA_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.LIGHT_BLUE_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.YELLOW_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.LIME_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.PINK_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.GRAY_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.LIGHT_GRAY_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.CYAN_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.PURPLE_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.BLUE_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.BROWN_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.GREEN_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.RED_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.BLACK_DYE, ProtocolRange.andNewer(LegacyProtocolVersions.b1_2_0tob1_2_2));
register(Items.CAKE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.DISPENSER, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.LAPIS_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.LAPIS_ORE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.NOTE_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.SANDSTONE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.SPRUCE_LOG, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.BIRCH_LOG, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.SPRUCE_LEAVES, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.BIRCH_LEAVES, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.BONE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.BONE_MEAL, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.LAPIS_LAZULI, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.COCOA_BEANS, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.INK_SAC, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.CHARCOAL, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.SUGAR, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.WHITE_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.ORANGE_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.MAGENTA_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.LIGHT_BLUE_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.YELLOW_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.LIME_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.PINK_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.GRAY_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.LIGHT_GRAY_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.CYAN_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.PURPLE_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.BLUE_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.BROWN_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.GREEN_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.RED_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.BLACK_DYE, ProtocolRange.andNewer(LegacyProtocolVersion.b1_2_0tob1_2_2));
register(Items.NETHERRACK, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.SOUL_SAND, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.GLOWSTONE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.CARVED_PUMPKIN, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.JACK_O_LANTERN, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.CLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.GLOWSTONE_DUST, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.COOKED_COD, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.COD, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.PUMPKIN, ProtocolRange.andNewer(LegacyProtocolVersions.a1_2_0toa1_2_1_1));
register(Items.NETHERRACK, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.SOUL_SAND, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.GLOWSTONE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.CARVED_PUMPKIN, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.JACK_O_LANTERN, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.CLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.GLOWSTONE_DUST, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.COOKED_COD, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.COD, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.PUMPKIN, ProtocolRange.andNewer(LegacyProtocolVersion.a1_2_0toa1_2_1_1));
register(Items.FISHING_ROD, ProtocolRange.andNewer(LegacyProtocolVersions.a1_1_0toa1_1_2_1));
register(Items.COMPASS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_1_0toa1_1_2_1));
register(Items.FISHING_ROD, ProtocolRange.andNewer(LegacyProtocolVersion.a1_1_0toa1_1_2_1));
register(Items.COMPASS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_1_0toa1_1_2_1));
// Indev with former 20100223 (it's not known)
register(Items.PAINTING, ProtocolRange.andNewer(LegacyProtocolVersions.a1_1_0toa1_1_2_1));
register(Items.PAINTING, ProtocolRange.andNewer(LegacyProtocolVersion.a1_1_0toa1_1_2_1));
register(Items.OAK_FENCE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_17toa1_0_17_4));
register(Items.OAK_FENCE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_17toa1_0_17_4));
// a1.0.14 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.JUKEBOX, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.EGG, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.MUSIC_DISC_13, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.MUSIC_DISC_CAT, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CHEST_MINECART, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.FURNACE_MINECART, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.JUKEBOX, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.EGG, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.MUSIC_DISC_13, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.MUSIC_DISC_CAT, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.CHEST_MINECART, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.FURNACE_MINECART, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// a1.0.11 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.SUGAR_CANE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CLAY, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.PAPER, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.BOOK, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CLAY_BALL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.SLIME_BALL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.BRICK, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.SUGAR_CANE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.CLAY, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.PAPER, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.BOOK, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.CLAY_BALL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.SLIME_BALL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.BRICK, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// a1.0.8 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.LEATHER, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.MILK_BUCKET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.LEATHER, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.MILK_BUCKET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// a1.0.6 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.CACTUS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.OAK_BOAT, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CACTUS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.OAK_BOAT, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// a1.0.5 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.SNOW_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.SNOWBALL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.SNOW_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.SNOWBALL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// a1.0.4 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.ICE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.SNOW, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.ICE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.SNOW, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
// a1.0.1 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.IRON_DOOR, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.LEVER, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.REDSTONE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.REDSTONE_ORE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.REDSTONE_TORCH, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STONE_BUTTON, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.OAK_PRESSURE_PLATE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STONE_PRESSURE_PLATE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_DOOR, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.LEVER, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.REDSTONE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.REDSTONE_ORE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.REDSTONE_TORCH, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.STONE_BUTTON, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.OAK_PRESSURE_PLATE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.STONE_PRESSURE_PLATE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 20100629 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.COBBLESTONE_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.OAK_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.COBBLESTONE_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.OAK_STAIRS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 20100625-2 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.SPAWNER, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.SADDLE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.SPAWNER, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.SADDLE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 20100624 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.RAIL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.OAK_DOOR, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.MINECART, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.RAIL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.OAK_DOOR, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.MINECART, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 20100615 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.BUCKET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.WATER_BUCKET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.LAVA_BUCKET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.BUCKET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.WATER_BUCKET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.LAVA_BUCKET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 20100607 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.OAK_SIGN, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.LADDER, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.OAK_SIGN, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.LADDER, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 20100227-1 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.GOLDEN_APPLE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_APPLE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 20100219 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.FURNACE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.FLINT, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.PORKCHOP, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.COOKED_PORKCHOP, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.FURNACE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.FLINT, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.PORKCHOP, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.COOKED_PORKCHOP, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 20100212-1 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.CHAINMAIL_HELMET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CHAINMAIL_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CHAINMAIL_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CHAINMAIL_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_HELMET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_HELMET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_HELMET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CHAINMAIL_HELMET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.CHAINMAIL_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.CHAINMAIL_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.CHAINMAIL_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_HELMET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLDEN_HELMET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLDEN_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLDEN_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLDEN_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_HELMET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 20100206 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.FARMLAND, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.WHEAT_SEEDS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.BREAD, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STONE_HOE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.WOODEN_HOE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_HOE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_HOE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_HOE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.WHEAT, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.FARMLAND, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.WHEAT_SEEDS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.BREAD, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.STONE_HOE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.WOODEN_HOE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_HOE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLDEN_HOE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_HOE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.WHEAT, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 0.31 20100130 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.CRAFTING_TABLE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_SWORD, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_AXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLDEN_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.BOWL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.MUSHROOM_STEW, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GUNPOWDER, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STRING, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.FEATHER, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CRAFTING_TABLE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLDEN_SWORD, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLDEN_AXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLDEN_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLDEN_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.BOWL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.MUSHROOM_STEW, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GUNPOWDER, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.STRING, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.FEATHER, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Infdev 0.31 20100129 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.STICK, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STICK, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Indev 0.31 20100128 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.DIAMOND_ORE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.COAL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GOLD_INGOT, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_INGOT, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.WOODEN_SWORD, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.WOODEN_AXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.WOODEN_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.WOODEN_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STONE_SWORD, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STONE_AXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STONE_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STONE_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_SWORD, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_AXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.DIAMOND_ORE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.COAL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.GOLD_INGOT, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_INGOT, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.WOODEN_SWORD, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.WOODEN_AXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.WOODEN_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.WOODEN_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.STONE_SWORD, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.STONE_AXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.STONE_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.STONE_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_SWORD, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_AXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.DIAMOND_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Indev 0.31 20091231-2 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.IRON_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_SWORD, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_AXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_HELMET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.LEATHER_HELMET, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.LEATHER_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.LEATHER_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.LEATHER_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.APPLE, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.IRON_SHOVEL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_SWORD, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_AXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_PICKAXE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_HELMET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.IRON_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.LEATHER_HELMET, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.LEATHER_CHESTPLATE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.LEATHER_LEGGINGS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.LEATHER_BOOTS, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.APPLE, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Indev 0.31 20100124-1 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.CHEST, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.CHEST, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Indev 0.31 20100122 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.BOW, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.ARROW, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.BOW, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.ARROW, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Indev 0.31 20100110 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.FLINT_AND_STEEL, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.FLINT_AND_STEEL, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Indev 0.31 20091223-2 (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.TORCH, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.STONE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.TORCH, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.STONE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
// Cave game tech test? I literally have no idea
register(Items.GRASS_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.BEDROCK, ProtocolRange.andNewer(LegacyProtocolVersions.a1_0_15));
register(Items.GRASS_BLOCK, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.BEDROCK, ProtocolRange.andNewer(LegacyProtocolVersion.a1_0_15));
register(Items.TNT, ProtocolRange.andNewer(LegacyProtocolVersions.c0_28toc0_30));
register(Items.OBSIDIAN, ProtocolRange.andNewer(LegacyProtocolVersions.c0_28toc0_30));
register(Items.TNT, ProtocolRange.andNewer(LegacyProtocolVersion.c0_28toc0_30));
register(Items.OBSIDIAN, ProtocolRange.andNewer(LegacyProtocolVersion.c0_28toc0_30));
// 0.26 SURVIVAL TEST (doesn't have multiplayer, so we assign it to the next multiplayer version)
register(Items.IRON_ORE, ProtocolRange.andNewer(LegacyProtocolVersions.c0_28toc0_30));
register(Items.GOLD_ORE, ProtocolRange.andNewer(LegacyProtocolVersions.c0_28toc0_30));
register(Items.COAL_ORE, ProtocolRange.andNewer(LegacyProtocolVersions.c0_28toc0_30));
register(Items.MOSSY_COBBLESTONE, ProtocolRange.andNewer(LegacyProtocolVersions.c0_28toc0_30));
register(Items.BOOKSHELF, ProtocolRange.andNewer(LegacyProtocolVersions.c0_28toc0_30));
register(Items.BRICKS, ProtocolRange.andNewer(LegacyProtocolVersions.c0_28toc0_30));
register(Items.IRON_ORE, ProtocolRange.andNewer(LegacyProtocolVersion.c0_28toc0_30));
register(Items.GOLD_ORE, ProtocolRange.andNewer(LegacyProtocolVersion.c0_28toc0_30));
register(Items.COAL_ORE, ProtocolRange.andNewer(LegacyProtocolVersion.c0_28toc0_30));
register(Items.MOSSY_COBBLESTONE, ProtocolRange.andNewer(LegacyProtocolVersion.c0_28toc0_30));
register(Items.BOOKSHELF, ProtocolRange.andNewer(LegacyProtocolVersion.c0_28toc0_30));
register(Items.BRICKS, ProtocolRange.andNewer(LegacyProtocolVersion.c0_28toc0_30));
register(Items.WHITE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.ORANGE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.MAGENTA_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.LIGHT_BLUE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.YELLOW_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.LIME_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.PINK_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.GRAY_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.LIGHT_GRAY_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.CYAN_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.PURPLE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.BLUE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.BROWN_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.GREEN_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.RED_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.BLACK_WOOL, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.SMOOTH_STONE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.POPPY, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.DANDELION, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.RED_MUSHROOM, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27));
register(Items.BROWN_MUSHROOM, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersions.c0_30cpe));
register(Items.WHITE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.ORANGE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.MAGENTA_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.LIGHT_BLUE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.YELLOW_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.LIME_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.PINK_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.GRAY_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.LIGHT_GRAY_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.CYAN_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.PURPLE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.BLUE_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.BROWN_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.GREEN_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.RED_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.BLACK_WOOL, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.SMOOTH_STONE_SLAB, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.POPPY, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.DANDELION, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.RED_MUSHROOM, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27));
register(Items.BROWN_MUSHROOM, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_20ac0_27), ProtocolRange.singleton(LegacyProtocolVersion.c0_30cpe));
register(Items.SPONGE, ProtocolRange.andNewer(LegacyProtocolVersions.c0_0_19a_06));
register(Items.SPONGE, ProtocolRange.andNewer(LegacyProtocolVersion.c0_0_19a_06));
}
private static void register(final Item item, final ProtocolRange range) {

View File

@ -13,7 +13,7 @@ import com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag;
import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag;
import com.viaversion.viaversion.protocols.protocol1_17to1_16_4.types.Chunk1_17Type;
import de.florianmichael.vialoadingbase.ViaLoadingBase;
import net.raphimc.vialegacy.api.LegacyProtocolVersions;
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
import net.raphimc.vialegacy.protocols.classic.protocola1_0_15toc0_28_30.model.ClassicLevel;
import net.raphimc.vialegacy.protocols.classic.protocola1_0_15toc0_28_30.providers.ClassicWorldHeightProvider;
import net.raphimc.vialegacy.protocols.classic.protocola1_0_15toc0_28_30.storage.ClassicLevelStorage;
@ -33,7 +33,7 @@ public class ClassicWorldHeightInjection {
parentRemapper.handle(wrapper);
if (wrapper.isCancelled()) return;
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersions.c0_28toc0_30)) {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersion.c0_28toc0_30)) {
for (Tag dimension : wrapper.get(Type.NBT, 0).<CompoundTag>get("minecraft:dimension_type").<ListTag>get("value")) {
changeDimensionTagHeight(wrapper.user(), ((CompoundTag) dimension).get("element"));
}
@ -52,7 +52,7 @@ public class ClassicWorldHeightInjection {
parentRemapper.handle(wrapper);
if (wrapper.isCancelled()) return;
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersions.c0_28toc0_30)) {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersion.c0_28toc0_30)) {
changeDimensionTagHeight(wrapper.user(), wrapper.get(Type.NBT, 0));
}
});
@ -68,7 +68,7 @@ public class ClassicWorldHeightInjection {
parentRemapper.handle(wrapper);
if (wrapper.isCancelled()) return;
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersions.c0_28toc0_30)) {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersion.c0_28toc0_30)) {
wrapper.resetReader();
final Chunk chunk = wrapper.read(new Chunk1_17Type(16));
wrapper.write(new Chunk1_17Type(chunk.getSections().length), chunk);
@ -162,7 +162,7 @@ public class ClassicWorldHeightInjection {
@Override
public void register() {
handler(wrapper -> {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersions.c0_28toc0_30)) {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersion.c0_28toc0_30)) {
classicLightHandler.handle(wrapper);
} else {
parentRemapper.handle(wrapper);

View File

@ -29,7 +29,7 @@ import io.netty.channel.Channel;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.encryption.PacketDecryptor;
import net.minecraft.network.encryption.PacketEncryptor;
import net.raphimc.vialegacy.api.LegacyProtocolVersions;
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
@ -58,7 +58,7 @@ public class MixinClientConnection implements IClientConnection {
@Inject(method = "setupEncryption", at = @At("HEAD"), cancellable = true)
private void storeEncryptionCiphers(Cipher decryptionCipher, Cipher encryptionCipher, CallbackInfo ci) {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersions.r1_6_4)) {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersion.r1_6_4)) {
ci.cancel();
this.viafabricplus_decryptionCipher = decryptionCipher;
this.viafabricplus_encryptionCipher = encryptionCipher;

View File

@ -33,6 +33,6 @@ public class MixinMain {
@Inject(method = "main([Ljava/lang/String;Z)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/crash/CrashReport;initCrashReport()V"))
private static void loadViaLoadingBase(CallbackInfo ci) {
ViaFabricPlus.getClassWrapper().create();
ViaFabricPlus.getClassWrapper().preInit();
}
}

View File

@ -0,0 +1,24 @@
package de.florianmichael.viafabricplus.injection.mixin.base;
import de.florianmichael.viafabricplus.screen.ProtocolSelectionScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(MultiplayerScreen.class)
public class MixinMultiplayerScreen extends Screen {
public MixinMultiplayerScreen(Text title) {
super(title);
}
@Inject(method = "init", at = @At("RETURN"))
public void addProtocolSelectionButton(CallbackInfo ci) {
this.addDrawableChild(ButtonWidget.builder(Text.literal("ViaFabricPlus"), button -> client.setScreen(ProtocolSelectionScreen.INSTANCE)).position(3, 3).size(98, 20).build());
}
}

View File

@ -3,7 +3,7 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes.screen;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.vialoadingbase.ViaLoadingBase;
import net.minecraft.client.gui.screen.GameModeSelectionScreen;
import net.raphimc.vialegacy.api.LegacyProtocolVersions;
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
@ -26,7 +26,7 @@ public class MixinGameModeSelectionScreen {
public void fixUIWidth(CallbackInfo ci) {
if (ViaLoadingBase.getTargetVersion().isOlderThan(ProtocolVersion.v1_8)) {
final List<GameModeSelectionScreen.GameModeSelection> gameModeSelections = Arrays.stream(GameModeSelectionScreen.GameModeSelection.values()).toList();
if (ViaLoadingBase.getTargetVersion().isOlderThan(LegacyProtocolVersions.r1_3_1tor1_3_2)) gameModeSelections.remove(GameModeSelectionScreen.GameModeSelection.ADVENTURE);
if (ViaLoadingBase.getTargetVersion().isOlderThan(LegacyProtocolVersion.r1_3_1tor1_3_2)) gameModeSelections.remove(GameModeSelectionScreen.GameModeSelection.ADVENTURE);
if (ViaLoadingBase.getTargetVersion().isOlderThan(ProtocolVersion.v1_8)) gameModeSelections.remove(GameModeSelectionScreen.GameModeSelection.SPECTATOR);
protocolhack_unwrappedGameModes = gameModeSelections.toArray(GameModeSelectionScreen.GameModeSelection[]::new);

View File

@ -4,7 +4,7 @@ import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.vialoadingbase.ViaLoadingBase;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.GameModeSelectionScreen;
import net.raphimc.vialegacy.api.LegacyProtocolVersions;
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@ -24,7 +24,7 @@ public class MixinGameModeSelectionScreen_GameModeSelection {
@Inject(method = "getCommand", at = @At("HEAD"), cancellable = true)
private void oldCommand(CallbackInfoReturnable<String> cir) {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersions.r1_2_4tor1_2_5)) {
if (ViaLoadingBase.getTargetVersion().isOlderThanOrEqualTo(LegacyProtocolVersion.r1_2_4tor1_2_5)) {
cir.setReturnValue(
"gamemode " + MinecraftClient.getInstance().getSession().getUsername() + ' ' + switch (((Enum<?>)(Object)this).ordinal()) {
case 0, 3 -> 1;
@ -41,7 +41,7 @@ public class MixinGameModeSelectionScreen_GameModeSelection {
switch ((GameModeSelectionScreen.GameModeSelection)(Object)this) {
case CREATIVE -> cir.setReturnValue(Optional.of(SURVIVAL));
case SURVIVAL -> {
if (ViaLoadingBase.getTargetVersion().isOlderThan(LegacyProtocolVersions.r1_2_4tor1_2_5)) {
if (ViaLoadingBase.getTargetVersion().isOlderThan(LegacyProtocolVersion.r1_2_4tor1_2_5)) {
cir.setReturnValue(Optional.of(CREATIVE));
} else {
cir.setReturnValue(Optional.of(GameModeSelectionScreen.GameModeSelection.ADVENTURE));

View File

@ -23,13 +23,13 @@ package de.florianmichael.viafabricplus.platform;
import com.viaversion.viaversion.api.Via;
import de.florianmichael.vialoadingbase.util.JLoggerToLog4j;
import net.raphimc.vialegacy.platform.ViaLegacyPlatform;
import net.raphimc.viaaprilfools.platform.ViaAprilFoolsPlatform;
import org.apache.logging.log4j.LogManager;
import java.io.File;
import java.util.logging.Logger;
public class ViaAprilFoolsPlatformImpl implements ViaLegacyPlatform {
public class ViaAprilFoolsPlatformImpl implements ViaAprilFoolsPlatform {
private static final Logger LOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaAprilFools"));
public ViaAprilFoolsPlatformImpl() {

View File

@ -0,0 +1,93 @@
package de.florianmichael.viafabricplus.screen;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.vialoadingbase.ViaLoadingBase;
import de.florianmichael.vialoadingbase.api.version.InternalProtocolList;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.sound.PositionedSoundInstance;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.sound.SoundEvents;
import net.minecraft.text.Text;
import java.awt.*;
public class ProtocolSelectionScreen extends Screen {
public final static ProtocolSelectionScreen INSTANCE = new ProtocolSelectionScreen();
protected ProtocolSelectionScreen() {
super(Text.literal("Protocol selection"));
}
@Override
protected void init() {
super.init();
this.addDrawableChild(new SlotList(this.client, width, height, 30, height - 20, textRenderer.fontHeight + 2));
this.addDrawableChild(ButtonWidget.builder(Text.literal("Values"), button -> {
}).position(3, 3).size(98, 20).build());
}
@Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
super.render(matrices, mouseX, mouseY, delta);
matrices.push();
matrices.scale(2F, 2F, 2F);
drawCenteredText(matrices, textRenderer, "ViaFabricPlus", width / 4, 3, -1);
matrices.pop();
drawStringWithShadow(matrices, textRenderer, "by EnZaXD/FlorianMichael", 1, height - (textRenderer.fontHeight) * 2, -1);
drawStringWithShadow(matrices, textRenderer, "https://github.com/FlorianMichael/ViaFabricPlus", 1, height - textRenderer.fontHeight, -1);
}
public static class SlotList extends AlwaysSelectedEntryListWidget<ProtocolSlot> {
public SlotList(MinecraftClient minecraftClient, int width, int height, int top, int bottom, int entryHeight) {
super(minecraftClient, width, height, top, bottom, entryHeight);
for (ProtocolVersion protocol : InternalProtocolList.getProtocols()) {
addEntry(new ProtocolSlot(this, protocol));
}
}
}
public static class ProtocolSlot extends AlwaysSelectedEntryListWidget.Entry<ProtocolSlot> {
private final SlotList slotList;
private final ProtocolVersion protocolVersion;
public ProtocolSlot(final SlotList slotList, final ProtocolVersion protocolVersion) {
this.slotList = slotList;
this.protocolVersion = protocolVersion;
}
@Override
public Text getNarration() {
return Text.literal(this.protocolVersion.getName());
}
@Override
public boolean mouseClicked(double mouseX, double mouseY, int button) {
ViaLoadingBase.getClassWrapper().reload(this.protocolVersion);
MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F));
return super.mouseClicked(mouseX, mouseY, button);
}
@Override
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
final boolean isSelected = ViaLoadingBase.getTargetVersion().getVersion() == protocolVersion.getVersion();
matrices.push();
matrices.translate(x, y, 0);
final TextRenderer textRenderer = MinecraftClient.getInstance().textRenderer;
drawCenteredText(matrices, textRenderer, this.protocolVersion.getName(), entryWidth / 2, entryHeight / 2 - textRenderer.fontHeight / 2, isSelected ? Color.GREEN.getRGB() : Color.RED.getRGB());
matrices.pop();
if (isSelected) this.slotList.setSelected(this);
}
}
}

View File

@ -32,6 +32,8 @@ public abstract class AbstractValue<T> {
this.defaultValue = defaultValue;
this.value = defaultValue;
ValueHolder.values.add(this);
}
public String getName() {

View File

@ -25,13 +25,13 @@ import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.viafabricplus.platform.ProtocolRange;
import de.florianmichael.viafabricplus.value.impl.BooleanValue;
import de.florianmichael.viafabricplus.value.impl.ProtocolSyncBooleanValue;
import net.raphimc.vialegacy.api.LegacyProtocolVersions;
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
import java.util.ArrayList;
import java.util.List;
public class ValueHolder {
private final static List<AbstractValue<?>> values = new ArrayList<>();
public final static List<AbstractValue<?>> values = new ArrayList<>();
// General settings
public static final BooleanValue removeNotAvailableItemsFromCreativeTab = new BooleanValue("Remove not available items from creative tab", true);
@ -48,7 +48,7 @@ public class ValueHolder {
// 1.9 -> 1.8.x
public static final ProtocolSyncBooleanValue removeCooldowns = new ProtocolSyncBooleanValue("Remove cooldowns", ProtocolRange.andOlder(ProtocolVersion.v1_8));
public static final ProtocolSyncBooleanValue sendIdlePacket = new ProtocolSyncBooleanValue("Send idle packet", new ProtocolRange(ProtocolVersion.v1_8, LegacyProtocolVersions.r1_3_1tor1_3_2));
public static final ProtocolSyncBooleanValue sendIdlePacket = new ProtocolSyncBooleanValue("Send idle packet", new ProtocolRange(ProtocolVersion.v1_8, LegacyProtocolVersion.r1_3_1tor1_3_2));
// 1.8.x -> 1.7.6
public static final ProtocolSyncBooleanValue replaceSneaking = new ProtocolSyncBooleanValue("Replace sneaking", ProtocolRange.andOlder(ProtocolVersion.v1_7_6));

View File

@ -17,7 +17,11 @@
"license": "CC0-1.0",
"icon": "assets/viafabricplus/icon.png",
"entrypoints": {
"client": [
"de.florianmichael.viafabricplus.ViaFabricPlus"
]
},
"environment": "*",
"mixins": [
"viafabricplus.mixins.json"

View File

@ -99,6 +99,7 @@
},
"client": [
"base.MixinMain",
"base.MixinMultiplayerScreen",
"fixes.MixinCamera",
"fixes.MixinClientPlayerInteractionManager",
"fixes.MixinClientPlayNetworkHandler",