diff --git a/modules/API/pom.xml b/modules/API/pom.xml index d00b4114..f0f17c75 100644 --- a/modules/API/pom.xml +++ b/modules/API/pom.xml @@ -196,13 +196,13 @@ org.spigotmc spigot-api - 1.9.4-R0.1-SNAPSHOT + 1.10-R0.1-SNAPSHOT provided org.spigotmc spigot - 1.9.4-R0.1-SNAPSHOT + 1.10-R0.1-SNAPSHOT provided diff --git a/modules/API/src/main/java/com/comphenix/protocol/ProtocolLibrary.java b/modules/API/src/main/java/com/comphenix/protocol/ProtocolLibrary.java index 8ddce6a2..33f49ad0 100644 --- a/modules/API/src/main/java/com/comphenix/protocol/ProtocolLibrary.java +++ b/modules/API/src/main/java/com/comphenix/protocol/ProtocolLibrary.java @@ -39,12 +39,12 @@ public class ProtocolLibrary { /** * The maximum version ProtocolLib has been tested with. */ - public static final String MAXIMUM_MINECRAFT_VERSION = "1.9.4"; + public static final String MAXIMUM_MINECRAFT_VERSION = "1.10"; /** * The date (with ISO 8601 or YYYY-MM-DD) when the most recent version (1.9.4) was released. */ - public static final String MINECRAFT_LAST_RELEASE_DATE = "2016-05-10"; + public static final String MINECRAFT_LAST_RELEASE_DATE = "2016-06-08"; /** * Plugins that are currently incompatible with ProtocolLib. diff --git a/modules/API/src/main/java/com/comphenix/protocol/utility/Constants.java b/modules/API/src/main/java/com/comphenix/protocol/utility/Constants.java index 0120719e..f25c9dbd 100644 --- a/modules/API/src/main/java/com/comphenix/protocol/utility/Constants.java +++ b/modules/API/src/main/java/com/comphenix/protocol/utility/Constants.java @@ -21,7 +21,7 @@ package com.comphenix.protocol.utility; */ public final class Constants { - public static final String PACKAGE_VERSION = "v1_9_R2"; + public static final String PACKAGE_VERSION = "v1_10_R1"; public static final String NMS = "net.minecraft.server." + PACKAGE_VERSION; public static final String OBC = "org.bukkit.craftbukkit." + PACKAGE_VERSION; } diff --git a/modules/API/src/main/java/com/comphenix/protocol/utility/MinecraftProtocolVersion.java b/modules/API/src/main/java/com/comphenix/protocol/utility/MinecraftProtocolVersion.java index 5120b1df..67977196 100644 --- a/modules/API/src/main/java/com/comphenix/protocol/utility/MinecraftProtocolVersion.java +++ b/modules/API/src/main/java/com/comphenix/protocol/utility/MinecraftProtocolVersion.java @@ -4,7 +4,6 @@ import java.util.Map.Entry; import java.util.NavigableMap; import java.util.TreeMap; -import com.comphenix.protocol.ProtocolLibrary; import com.google.common.collect.Maps; /** @@ -42,6 +41,7 @@ public class MinecraftProtocolVersion { map.put(new MinecraftVersion(1, 9, 0), 107); map.put(new MinecraftVersion(1, 9, 2), 109); map.put(new MinecraftVersion(1, 9, 4), 110); + map.put(new MinecraftVersion(1, 10, 0), 210); return map; } @@ -50,7 +50,7 @@ public class MinecraftProtocolVersion { * @return The version number. */ public static int getCurrentVersion() { - return getVersion(ProtocolLibrary.getProtocolManager().getMinecraftVersion()); + return getVersion(MinecraftVersion.getCurrentVersion()); } /** diff --git a/modules/API/src/main/java/com/comphenix/protocol/utility/MinecraftVersion.java b/modules/API/src/main/java/com/comphenix/protocol/utility/MinecraftVersion.java index d2b9e5a0..6f8ab194 100644 --- a/modules/API/src/main/java/com/comphenix/protocol/utility/MinecraftVersion.java +++ b/modules/API/src/main/java/com/comphenix/protocol/utility/MinecraftVersion.java @@ -44,6 +44,11 @@ public class MinecraftVersion implements Comparable, Serializa */ private static final Pattern VERSION_PATTERN = Pattern.compile(".*\\(.*MC.\\s*([a-zA-z0-9\\-\\.]+)\\s*\\)"); + /** + * Version 1.10 - the frostburn update. + */ + public static final MinecraftVersion FROSTBURN_UPDATE = new MinecraftVersion("1.10"); + /** * Version 1.9 - the combat update. */ diff --git a/modules/API/src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java b/modules/API/src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java index db36662d..5eef2c3a 100644 --- a/modules/API/src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java +++ b/modules/API/src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java @@ -1,9 +1,5 @@ package com.comphenix.protocol.wrappers; -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; -import io.netty.handler.codec.base64.Base64; - import java.awt.image.BufferedImage; import java.awt.image.RenderedImage; import java.io.ByteArrayInputStream; @@ -19,14 +15,13 @@ import org.bukkit.Server; import org.bukkit.entity.Player; import com.comphenix.protocol.PacketType; -import com.comphenix.protocol.ProtocolLibrary; -import com.comphenix.protocol.ProtocolManager; import com.comphenix.protocol.injector.BukkitUnwrapper; import com.comphenix.protocol.reflect.EquivalentConverter; import com.comphenix.protocol.reflect.accessors.Accessors; import com.comphenix.protocol.reflect.accessors.ConstructorAccessor; import com.comphenix.protocol.reflect.accessors.FieldAccessor; import com.comphenix.protocol.reflect.accessors.MethodAccessor; +import com.comphenix.protocol.utility.MinecraftProtocolVersion; import com.comphenix.protocol.utility.MinecraftReflection; import com.comphenix.protocol.utility.MinecraftVersion; import com.comphenix.protocol.utility.Util; @@ -34,25 +29,18 @@ import com.google.common.base.Charsets; import com.google.common.base.Preconditions; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.io.ByteStreams; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.handler.codec.base64.Base64; + /** * Represents a server ping packet data. * @author Kristian */ public class WrappedServerPing extends AbstractWrapper { - /** - * Lookup of Minecraft versions and ping version numbers. - */ - private static ImmutableMap VERSION_NUMBERS = ImmutableMap.builder() - .put(MinecraftVersion.WORLD_UPDATE, 4) - .put(MinecraftVersion.SKIN_UPDATE, 5) - .put(MinecraftVersion.BOUNTIFUL_UPDATE, 47) - .build(); - private static MinecraftVersion LAST_VERSION = MinecraftVersion.BOUNTIFUL_UPDATE; - private static Class GAME_PROFILE = MinecraftReflection.getGameProfileClass(); private static Class GAME_PROFILE_ARRAY = MinecraftReflection.getArrayClass(GAME_PROFILE); @@ -101,7 +89,7 @@ public class WrappedServerPing extends AbstractWrapper { /** * Construct a new server ping initialized with a zero player count, and zero maximum. *

- * Note that the version string is set to 1.8. + * Note that the version string is set to 1.9.4. */ public WrappedServerPing() { super(MinecraftReflection.getServerPingClass()); @@ -129,14 +117,8 @@ public class WrappedServerPing extends AbstractWrapper { * Reset the version string to the default state. */ protected void resetVersion() { - ProtocolManager manager = ProtocolLibrary.getProtocolManager(); - MinecraftVersion minecraftVersion = LAST_VERSION; - - // Fetch the latest known version - if (manager != null) { - minecraftVersion = manager.getMinecraftVersion(); - } - version = VERSION_CONSTRUCTOR.invoke(minecraftVersion.toString(), VERSION_NUMBERS.get(minecraftVersion)); + MinecraftVersion minecraftVersion = MinecraftVersion.getCurrentVersion(); + version = VERSION_CONSTRUCTOR.invoke(minecraftVersion.toString(), MinecraftProtocolVersion.getCurrentVersion()); VERSION.set(handle, version); } diff --git a/modules/ProtocolLib/pom.xml b/modules/ProtocolLib/pom.xml index ac058fe4..2e63687b 100644 --- a/modules/ProtocolLib/pom.xml +++ b/modules/ProtocolLib/pom.xml @@ -234,13 +234,13 @@ org.spigotmc spigot-api - 1.9.4-R0.1-SNAPSHOT + 1.10-R0.1-SNAPSHOT provided org.spigotmc spigot - 1.9.4-R0.1-SNAPSHOT + 1.10-R0.1-SNAPSHOT provided diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java index e69d7a1b..3ccc9ac7 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java @@ -5,18 +5,18 @@ import static org.mockito.Mockito.when; import java.util.logging.Logger; -import net.minecraft.server.v1_9_R2.DispenserRegistry; - import org.bukkit.Bukkit; import org.bukkit.Server; -import org.bukkit.craftbukkit.v1_9_R2.CraftServer; -import org.bukkit.craftbukkit.v1_9_R2.inventory.CraftItemFactory; -import org.bukkit.craftbukkit.v1_9_R2.util.Versioning; +import org.bukkit.craftbukkit.v1_10_R1.CraftServer; +import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftItemFactory; +import org.bukkit.craftbukkit.v1_10_R1.util.Versioning; import com.comphenix.protocol.utility.Constants; import com.comphenix.protocol.utility.MinecraftReflection; import com.comphenix.protocol.utility.MinecraftVersion; +import net.minecraft.server.v1_10_R1.DispenserRegistry; + /** * Used to ensure that ProtocolLib and Bukkit is prepared to be tested. * diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/PacketTypeTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/PacketTypeTest.java index d70a4c0d..bb947c3a 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/PacketTypeTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/PacketTypeTest.java @@ -14,7 +14,7 @@ import com.comphenix.protocol.PacketType.Sender; import com.comphenix.protocol.injector.netty.NettyProtocolRegistry; import com.comphenix.protocol.injector.netty.ProtocolRegistry; -import net.minecraft.server.v1_9_R2.PacketLoginInStart; +import net.minecraft.server.v1_10_R1.PacketLoginInStart; public class PacketTypeTest { diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java index abc964be..075ba5d9 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java @@ -28,16 +28,6 @@ import java.util.List; import java.util.Objects; import java.util.UUID; -import net.minecraft.server.v1_9_R2.AttributeModifier; -import net.minecraft.server.v1_9_R2.DataWatcher; -import net.minecraft.server.v1_9_R2.Entity; -import net.minecraft.server.v1_9_R2.EntityLightning; -import net.minecraft.server.v1_9_R2.MobEffect; -import net.minecraft.server.v1_9_R2.MobEffectList; -import net.minecraft.server.v1_9_R2.PacketPlayOutBoss; -import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes; -import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes.AttributeSnapshot; - import org.apache.commons.lang.SerializationUtils; import org.apache.commons.lang3.builder.EqualsBuilder; import org.bukkit.ChatColor; @@ -76,6 +66,16 @@ import com.comphenix.protocol.wrappers.nbt.NbtCompound; import com.comphenix.protocol.wrappers.nbt.NbtFactory; import com.google.common.collect.Lists; +import net.minecraft.server.v1_10_R1.AttributeModifier; +import net.minecraft.server.v1_10_R1.DataWatcher; +import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityLightning; +import net.minecraft.server.v1_10_R1.MobEffect; +import net.minecraft.server.v1_10_R1.MobEffectList; +import net.minecraft.server.v1_10_R1.PacketPlayOutBoss; +import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes; +import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes.AttributeSnapshot; + // Ensure that the CraftItemFactory is mockable @RunWith(org.powermock.modules.junit4.PowerMockRunner.class) @PowerMockIgnore({ "org.apache.log4j.*", "org.apache.logging.*", "org.bukkit.craftbukkit.libs.jline.*" }) diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/MinecraftReflectionTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/MinecraftReflectionTest.java index c739c018..cf2236d5 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/MinecraftReflectionTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/MinecraftReflectionTest.java @@ -18,18 +18,18 @@ import org.powermock.core.classloader.annotations.PowerMockIgnore; import com.comphenix.protocol.BukkitInitialization; import com.mojang.authlib.GameProfile; -import net.minecraft.server.v1_9_R2.ChatComponentText; -import net.minecraft.server.v1_9_R2.ChunkCoordIntPair; -import net.minecraft.server.v1_9_R2.DataWatcher; -import net.minecraft.server.v1_9_R2.IBlockData; -import net.minecraft.server.v1_9_R2.IChatBaseComponent; -import net.minecraft.server.v1_9_R2.IChatBaseComponent.ChatSerializer; -import net.minecraft.server.v1_9_R2.NBTCompressedStreamTools; -import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes.AttributeSnapshot; -import net.minecraft.server.v1_9_R2.PlayerConnection; -import net.minecraft.server.v1_9_R2.ServerPing; -import net.minecraft.server.v1_9_R2.ServerPing.ServerData; -import net.minecraft.server.v1_9_R2.ServerPing.ServerPingPlayerSample; +import net.minecraft.server.v1_10_R1.ChatComponentText; +import net.minecraft.server.v1_10_R1.ChunkCoordIntPair; +import net.minecraft.server.v1_10_R1.DataWatcher; +import net.minecraft.server.v1_10_R1.IBlockData; +import net.minecraft.server.v1_10_R1.IChatBaseComponent; +import net.minecraft.server.v1_10_R1.IChatBaseComponent.ChatSerializer; +import net.minecraft.server.v1_10_R1.NBTCompressedStreamTools; +import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes.AttributeSnapshot; +import net.minecraft.server.v1_10_R1.PlayerConnection; +import net.minecraft.server.v1_10_R1.ServerPing; +import net.minecraft.server.v1_10_R1.ServerPing.ServerData; +import net.minecraft.server.v1_10_R1.ServerPing.ServerPingPlayerSample; @RunWith(org.powermock.modules.junit4.PowerMockRunner.class) @PowerMockIgnore({ "org.apache.log4j.*", "org.apache.logging.*", "org.bukkit.craftbukkit.libs.jline.*" }) diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/StreamSerializerTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/StreamSerializerTest.java index a746b48e..22f55134 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/StreamSerializerTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/StreamSerializerTest.java @@ -8,8 +8,6 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import net.minecraft.server.v1_9_R2.IntHashMap; - import org.bukkit.ChatColor; import org.bukkit.DyeColor; import org.bukkit.Material; @@ -24,6 +22,8 @@ import com.comphenix.protocol.BukkitInitialization; import com.comphenix.protocol.wrappers.nbt.NbtCompound; import com.comphenix.protocol.wrappers.nbt.NbtFactory; +import net.minecraft.server.v1_10_R1.IntHashMap; + @RunWith(org.powermock.modules.junit4.PowerMockRunner.class) @PowerMockIgnore({ "org.apache.log4j.*", "org.apache.logging.*", "org.bukkit.craftbukkit.libs.jline.*" }) //@PrepareForTest(CraftItemFactory.class) diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/ChunkCoordIntPairTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/ChunkCoordIntPairTest.java index c9d759bb..60f245a2 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/ChunkCoordIntPairTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/ChunkCoordIntPairTest.java @@ -16,15 +16,15 @@ public class ChunkCoordIntPairTest { @Test public void test() { - net.minecraft.server.v1_9_R2.ChunkCoordIntPair pair = new net.minecraft.server.v1_9_R2.ChunkCoordIntPair(1, 2); + net.minecraft.server.v1_10_R1.ChunkCoordIntPair pair = new net.minecraft.server.v1_10_R1.ChunkCoordIntPair(1, 2); ChunkCoordIntPair specific = ChunkCoordIntPair.getConverter().getSpecific(pair); assertEquals(1, specific.getChunkX()); assertEquals(2, specific.getChunkZ()); - net.minecraft.server.v1_9_R2.ChunkCoordIntPair roundtrip = - (net.minecraft.server.v1_9_R2.ChunkCoordIntPair) ChunkCoordIntPair.getConverter(). - getGeneric(net.minecraft.server.v1_9_R2.ChunkCoordIntPair.class, specific); + net.minecraft.server.v1_10_R1.ChunkCoordIntPair roundtrip = + (net.minecraft.server.v1_10_R1.ChunkCoordIntPair) ChunkCoordIntPair.getConverter(). + getGeneric(net.minecraft.server.v1_10_R1.ChunkCoordIntPair.class, specific); assertEquals(1, roundtrip.x); assertEquals(2, roundtrip.z); diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/EnumWrappersTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/EnumWrappersTest.java index ea6f5fac..adb9d409 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/EnumWrappersTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/EnumWrappersTest.java @@ -1,12 +1,6 @@ package com.comphenix.protocol.wrappers; import static org.junit.Assert.assertEquals; -import net.minecraft.server.v1_9_R2.EntityHuman.EnumChatVisibility; -import net.minecraft.server.v1_9_R2.EnumDifficulty; -import net.minecraft.server.v1_9_R2.EnumProtocol; -import net.minecraft.server.v1_9_R2.PacketPlayInClientCommand.EnumClientCommand; -import net.minecraft.server.v1_9_R2.PacketPlayInUseEntity.EnumEntityUseAction; -import net.minecraft.server.v1_9_R2.WorldSettings.EnumGamemode; import org.junit.BeforeClass; import org.junit.Test; @@ -16,6 +10,13 @@ import com.comphenix.protocol.reflect.EquivalentConverter; import com.comphenix.protocol.reflect.accessors.Accessors; import com.comphenix.protocol.reflect.accessors.FieldAccessor; +import net.minecraft.server.v1_10_R1.EntityHuman.EnumChatVisibility; +import net.minecraft.server.v1_10_R1.EnumDifficulty; +import net.minecraft.server.v1_10_R1.EnumGamemode; +import net.minecraft.server.v1_10_R1.EnumProtocol; +import net.minecraft.server.v1_10_R1.PacketPlayInClientCommand.EnumClientCommand; +import net.minecraft.server.v1_10_R1.PacketPlayInUseEntity.EnumEntityUseAction; + public class EnumWrappersTest { private static class EnumClass { public EnumProtocol protocol; diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedAttributeTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedAttributeTest.java index a193ce75..9d1f1a8c 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedAttributeTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedAttributeTest.java @@ -6,10 +6,6 @@ import static org.junit.Assert.assertTrue; import java.util.List; -import net.minecraft.server.v1_9_R2.AttributeModifier; -import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes; -import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes.AttributeSnapshot; - import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -20,6 +16,10 @@ import com.comphenix.protocol.events.PacketContainer; import com.comphenix.protocol.wrappers.WrappedAttributeModifier.Operation; import com.google.common.collect.Lists; +import net.minecraft.server.v1_10_R1.AttributeModifier; +import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes; +import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes.AttributeSnapshot; + public class WrappedAttributeTest { private WrappedAttributeModifier doubleModifier; private WrappedAttributeModifier constantModifier; diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedDataWatcherTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedDataWatcherTest.java index 0ba729d1..f56d53ff 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedDataWatcherTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedDataWatcherTest.java @@ -24,10 +24,7 @@ import static org.junit.Assert.assertTrue; import java.util.UUID; -import net.minecraft.server.v1_9_R2.EntityLightning; -import net.minecraft.server.v1_9_R2.ItemStack; - -import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLightningStrike; +import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLightningStrike; import org.bukkit.entity.Entity; import org.junit.BeforeClass; import org.junit.Test; @@ -37,6 +34,9 @@ import com.comphenix.protocol.wrappers.WrappedDataWatcher.Registry; import com.comphenix.protocol.wrappers.WrappedDataWatcher.Serializer; import com.comphenix.protocol.wrappers.WrappedDataWatcher.WrappedDataWatcherObject; +import net.minecraft.server.v1_10_R1.EntityLightning; +import net.minecraft.server.v1_10_R1.ItemStack; + /** * @author dmulloy2 */ @@ -92,8 +92,8 @@ public class WrappedDataWatcherTest { @Test public void testSerializers() { - Serializer blockPos = Registry.get(net.minecraft.server.v1_9_R2.BlockPosition.class, false); - Serializer optionalBlockPos = Registry.get(net.minecraft.server.v1_9_R2.BlockPosition.class, true); + Serializer blockPos = Registry.get(net.minecraft.server.v1_10_R1.BlockPosition.class, false); + Serializer optionalBlockPos = Registry.get(net.minecraft.server.v1_10_R1.BlockPosition.class, true); assertNotSame(blockPos, optionalBlockPos); assertNull(Registry.get(ItemStack.class, false)); diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java index a4ba8019..8de3840d 100644 --- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java +++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java @@ -26,9 +26,6 @@ import java.io.DataInputStream; import java.io.DataOutput; import java.io.DataOutputStream; -import net.minecraft.server.v1_9_R2.ItemStack; -import net.minecraft.server.v1_9_R2.Items; - import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -38,6 +35,9 @@ import com.comphenix.protocol.BukkitInitialization; import com.comphenix.protocol.utility.MinecraftReflection; import com.comphenix.protocol.wrappers.nbt.io.NbtBinarySerializer; +import net.minecraft.server.v1_10_R1.ItemStack; +import net.minecraft.server.v1_10_R1.Items; + @RunWith(org.powermock.modules.junit4.PowerMockRunner.class) @PowerMockIgnore({ "org.apache.log4j.*", "org.apache.logging.*", "org.bukkit.craftbukkit.libs.jline.*" }) //@PrepareForTest(CraftItemFactory.class)