Archiviert
13
0

Update to 1.9.4

Dieser Commit ist enthalten in:
0x277F 2016-05-12 16:30:49 -06:00
Ursprung 90f36198d2
Commit d876580ddf
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7FBDA6B1090AE825
14 geänderte Dateien mit 61 neuen und 59 gelöschten Zeilen

4
.gitignore vendored
Datei anzeigen

@ -7,6 +7,10 @@
.classpath .classpath
.settings/ .settings/
bin/ bin/
.idea/
.iml
.ipr
.iws
*.pydevproject *.pydevproject
.metadata .metadata

Datei anzeigen

@ -196,13 +196,13 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.9.2-R0.1-SNAPSHOT</version> <version>1.9.4-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId> <artifactId>spigot</artifactId>
<version>1.9.2-R0.1-SNAPSHOT</version> <version>1.9.4-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

Datei anzeigen

@ -175,7 +175,6 @@ public class PacketType implements Serializable, Comparable<PacketType> {
public static final PacketType SPAWN_POSITION = new PacketType(PROTOCOL, SENDER, 0x43, 0x05, "SpawnPosition"); public static final PacketType SPAWN_POSITION = new PacketType(PROTOCOL, SENDER, 0x43, 0x05, "SpawnPosition");
public static final PacketType UPDATE_TIME = new PacketType(PROTOCOL, SENDER, 0x44, 0x03, "UpdateTime"); public static final PacketType UPDATE_TIME = new PacketType(PROTOCOL, SENDER, 0x44, 0x03, "UpdateTime");
public static final PacketType TITLE = new PacketType(PROTOCOL, SENDER, 0x45, 0x45, "Title"); public static final PacketType TITLE = new PacketType(PROTOCOL, SENDER, 0x45, 0x45, "Title");
public static final PacketType UPDATE_SIGN = new PacketType(PROTOCOL, SENDER, 0x46, 0x33, "UpdateSign");
public static final PacketType NAMED_SOUND_EFFECT = new PacketType(PROTOCOL, SENDER, 0x47, 0x29, "NamedSoundEffect"); public static final PacketType NAMED_SOUND_EFFECT = new PacketType(PROTOCOL, SENDER, 0x47, 0x29, "NamedSoundEffect");
public static final PacketType PLAYER_LIST_HEADER_FOOTER = new PacketType(PROTOCOL, SENDER, 0x48, 0x47, "PlayerListHeaderFooter"); public static final PacketType PLAYER_LIST_HEADER_FOOTER = new PacketType(PROTOCOL, SENDER, 0x48, 0x47, "PlayerListHeaderFooter");
public static final PacketType COLLECT = new PacketType(PROTOCOL, SENDER, 0x49, 0x0D, "Collect"); public static final PacketType COLLECT = new PacketType(PROTOCOL, SENDER, 0x49, 0x0D, "Collect");
@ -201,6 +200,12 @@ public class PacketType implements Serializable, Comparable<PacketType> {
@Deprecated @Deprecated
public static final PacketType STATISTICS = STATISTIC; public static final PacketType STATISTICS = STATISTIC;
/**
* @deprecated Replaced by {@link TILE_ENTITY_DATA}
*/
@Deprecated
public static final PacketType UPDATE_SIGN = TILE_ENTITY_DATA;
// The instance must // The instance must
private final static Server INSTANCE = new Server(); private final static Server INSTANCE = new Server();

Datei anzeigen

@ -21,7 +21,7 @@ package com.comphenix.protocol.utility;
*/ */
public final class Constants { public final class Constants {
public static final String PACKAGE_VERSION = "v1_9_R1"; public static final String PACKAGE_VERSION = "v1_9_R2";
public static final String NMS = "net.minecraft.server." + PACKAGE_VERSION; public static final String NMS = "net.minecraft.server." + PACKAGE_VERSION;
public static final String OBC = "org.bukkit.craftbukkit." + PACKAGE_VERSION; public static final String OBC = "org.bukkit.craftbukkit." + PACKAGE_VERSION;
} }

Datei anzeigen

@ -234,13 +234,13 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.9.2-R0.1-SNAPSHOT</version> <version>1.9.4-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId> <artifactId>spigot</artifactId>
<version>1.9.2-R0.1-SNAPSHOT</version> <version>1.9.4-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

Datei anzeigen

@ -5,13 +5,13 @@ import static org.mockito.Mockito.when;
import java.util.logging.Logger; import java.util.logging.Logger;
import net.minecraft.server.v1_9_R1.DispenserRegistry; import net.minecraft.server.v1_9_R2.DispenserRegistry;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Server; import org.bukkit.Server;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer; import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.inventory.CraftItemFactory; import org.bukkit.craftbukkit.v1_9_R2.inventory.CraftItemFactory;
import org.bukkit.craftbukkit.v1_9_R1.util.Versioning; import org.bukkit.craftbukkit.v1_9_R2.util.Versioning;
import com.comphenix.protocol.utility.Constants; import com.comphenix.protocol.utility.Constants;
import com.comphenix.protocol.utility.MinecraftReflection; import com.comphenix.protocol.utility.MinecraftReflection;

Datei anzeigen

@ -28,15 +28,15 @@ import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.UUID; import java.util.UUID;
import net.minecraft.server.v1_9_R1.AttributeModifier; import net.minecraft.server.v1_9_R2.AttributeModifier;
import net.minecraft.server.v1_9_R1.DataWatcher; import net.minecraft.server.v1_9_R2.DataWatcher;
import net.minecraft.server.v1_9_R1.Entity; import net.minecraft.server.v1_9_R2.Entity;
import net.minecraft.server.v1_9_R1.EntityLightning; import net.minecraft.server.v1_9_R2.EntityLightning;
import net.minecraft.server.v1_9_R1.MobEffect; import net.minecraft.server.v1_9_R2.MobEffect;
import net.minecraft.server.v1_9_R1.MobEffectList; import net.minecraft.server.v1_9_R2.MobEffectList;
import net.minecraft.server.v1_9_R1.PacketPlayOutBoss; import net.minecraft.server.v1_9_R2.PacketPlayOutBoss;
import net.minecraft.server.v1_9_R1.PacketPlayOutUpdateAttributes; import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes;
import net.minecraft.server.v1_9_R1.PacketPlayOutUpdateAttributes.AttributeSnapshot; import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes.AttributeSnapshot;
import org.apache.commons.lang.SerializationUtils; import org.apache.commons.lang.SerializationUtils;
import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.EqualsBuilder;
@ -180,13 +180,6 @@ public class PacketContainerTest {
testObjectArray(tabComplete.getStringArrays(), 0, new String[0], new String[] { "hello", "world" }); testObjectArray(tabComplete.getStringArrays(), 0, new String[0], new String[] { "hello", "world" });
} }
@Test
public void testGetChatComponentArrays() {
PacketContainer signChange = new PacketContainer(PacketType.Play.Server.UPDATE_SIGN);
testObjectArray(signChange.getChatComponentArrays(), 0, new WrappedChatComponent[0],
WrappedChatComponent.fromChatMessage("hello world"));
}
@Test @Test
public void testGetIntegerArrays() { public void testGetIntegerArrays() {
// Contains a byte array we will test // Contains a byte array we will test

Datei anzeigen

@ -4,18 +4,18 @@ import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times; import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import net.minecraft.server.v1_9_R1.ChatComponentText; import net.minecraft.server.v1_9_R2.ChatComponentText;
import net.minecraft.server.v1_9_R1.ChunkCoordIntPair; import net.minecraft.server.v1_9_R2.ChunkCoordIntPair;
import net.minecraft.server.v1_9_R1.DataWatcher; import net.minecraft.server.v1_9_R2.DataWatcher;
import net.minecraft.server.v1_9_R1.IBlockData; import net.minecraft.server.v1_9_R2.IBlockData;
import net.minecraft.server.v1_9_R1.IChatBaseComponent; import net.minecraft.server.v1_9_R2.IChatBaseComponent;
import net.minecraft.server.v1_9_R1.IChatBaseComponent.ChatSerializer; import net.minecraft.server.v1_9_R2.IChatBaseComponent.ChatSerializer;
import net.minecraft.server.v1_9_R1.NBTCompressedStreamTools; import net.minecraft.server.v1_9_R2.NBTCompressedStreamTools;
import net.minecraft.server.v1_9_R1.PacketPlayOutUpdateAttributes.AttributeSnapshot; import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes.AttributeSnapshot;
import net.minecraft.server.v1_9_R1.PlayerConnection; import net.minecraft.server.v1_9_R2.PlayerConnection;
import net.minecraft.server.v1_9_R1.ServerPing; import net.minecraft.server.v1_9_R2.ServerPing;
import net.minecraft.server.v1_9_R1.ServerPing.ServerData; import net.minecraft.server.v1_9_R2.ServerPing.ServerData;
import net.minecraft.server.v1_9_R1.ServerPing.ServerPingPlayerSample; import net.minecraft.server.v1_9_R2.ServerPing.ServerPingPlayerSample;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;

Datei anzeigen

@ -8,7 +8,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import net.minecraft.server.v1_9_R1.IntHashMap; import net.minecraft.server.v1_9_R2.IntHashMap;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.DyeColor; import org.bukkit.DyeColor;

Datei anzeigen

@ -16,15 +16,15 @@ public class ChunkCoordIntPairTest {
@Test @Test
public void test() { public void test() {
net.minecraft.server.v1_9_R1.ChunkCoordIntPair pair = new net.minecraft.server.v1_9_R1.ChunkCoordIntPair(1, 2); net.minecraft.server.v1_9_R2.ChunkCoordIntPair pair = new net.minecraft.server.v1_9_R2.ChunkCoordIntPair(1, 2);
ChunkCoordIntPair specific = ChunkCoordIntPair.getConverter().getSpecific(pair); ChunkCoordIntPair specific = ChunkCoordIntPair.getConverter().getSpecific(pair);
assertEquals(1, specific.getChunkX()); assertEquals(1, specific.getChunkX());
assertEquals(2, specific.getChunkZ()); assertEquals(2, specific.getChunkZ());
net.minecraft.server.v1_9_R1.ChunkCoordIntPair roundtrip = net.minecraft.server.v1_9_R2.ChunkCoordIntPair roundtrip =
(net.minecraft.server.v1_9_R1.ChunkCoordIntPair) ChunkCoordIntPair.getConverter(). (net.minecraft.server.v1_9_R2.ChunkCoordIntPair) ChunkCoordIntPair.getConverter().
getGeneric(net.minecraft.server.v1_9_R1.ChunkCoordIntPair.class, specific); getGeneric(net.minecraft.server.v1_9_R2.ChunkCoordIntPair.class, specific);
assertEquals(1, roundtrip.x); assertEquals(1, roundtrip.x);
assertEquals(2, roundtrip.z); assertEquals(2, roundtrip.z);

Datei anzeigen

@ -1,12 +1,12 @@
package com.comphenix.protocol.wrappers; package com.comphenix.protocol.wrappers;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import net.minecraft.server.v1_9_R1.EntityHuman.EnumChatVisibility; import net.minecraft.server.v1_9_R2.EntityHuman.EnumChatVisibility;
import net.minecraft.server.v1_9_R1.EnumDifficulty; import net.minecraft.server.v1_9_R2.EnumDifficulty;
import net.minecraft.server.v1_9_R1.EnumProtocol; import net.minecraft.server.v1_9_R2.EnumProtocol;
import net.minecraft.server.v1_9_R1.PacketPlayInClientCommand.EnumClientCommand; import net.minecraft.server.v1_9_R2.PacketPlayInClientCommand.EnumClientCommand;
import net.minecraft.server.v1_9_R1.PacketPlayInUseEntity.EnumEntityUseAction; import net.minecraft.server.v1_9_R2.PacketPlayInUseEntity.EnumEntityUseAction;
import net.minecraft.server.v1_9_R1.WorldSettings.EnumGamemode; import net.minecraft.server.v1_9_R2.WorldSettings.EnumGamemode;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;

Datei anzeigen

@ -6,9 +6,9 @@ import static org.junit.Assert.assertTrue;
import java.util.List; import java.util.List;
import net.minecraft.server.v1_9_R1.AttributeModifier; import net.minecraft.server.v1_9_R2.AttributeModifier;
import net.minecraft.server.v1_9_R1.PacketPlayOutUpdateAttributes; import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes;
import net.minecraft.server.v1_9_R1.PacketPlayOutUpdateAttributes.AttributeSnapshot; import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes.AttributeSnapshot;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;

Datei anzeigen

@ -24,10 +24,10 @@ import static org.junit.Assert.assertTrue;
import java.util.UUID; import java.util.UUID;
import net.minecraft.server.v1_9_R1.EntityLightning; import net.minecraft.server.v1_9_R2.EntityLightning;
import net.minecraft.server.v1_9_R1.ItemStack; import net.minecraft.server.v1_9_R2.ItemStack;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftLightningStrike; import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLightningStrike;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
@ -92,8 +92,8 @@ public class WrappedDataWatcherTest {
@Test @Test
public void testSerializers() { public void testSerializers() {
Serializer blockPos = Registry.get(net.minecraft.server.v1_9_R1.BlockPosition.class, false); Serializer blockPos = Registry.get(net.minecraft.server.v1_9_R2.BlockPosition.class, false);
Serializer optionalBlockPos = Registry.get(net.minecraft.server.v1_9_R1.BlockPosition.class, true); Serializer optionalBlockPos = Registry.get(net.minecraft.server.v1_9_R2.BlockPosition.class, true);
assertNotSame(blockPos, optionalBlockPos); assertNotSame(blockPos, optionalBlockPos);
assertNull(Registry.get(ItemStack.class, false)); assertNull(Registry.get(ItemStack.class, false));

Datei anzeigen

@ -26,8 +26,8 @@ import java.io.DataInputStream;
import java.io.DataOutput; import java.io.DataOutput;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import net.minecraft.server.v1_9_R1.ItemStack; import net.minecraft.server.v1_9_R2.ItemStack;
import net.minecraft.server.v1_9_R1.Items; import net.minecraft.server.v1_9_R2.Items;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;