diff --git a/src/MiNET/MiNET/ItemStackInventoryManager.cs b/src/MiNET/MiNET/ItemStackInventoryManager.cs index 8ddafa068..b10b77693 100644 --- a/src/MiNET/MiNET/ItemStackInventoryManager.cs +++ b/src/MiNET/MiNET/ItemStackInventoryManager.cs @@ -188,7 +188,7 @@ protected virtual void ProcessDropAction(DropAction action, List records) dropItem = (Item) sourceItem.Clone(); sourceItem.Count -= count; dropItem.Count = count; - dropItem.UniqueId = Environment.TickCount; + dropItem.UniqueId = Environment.TickCount & Int32.MaxValue; } DropItem(dropItem); diff --git a/src/MiNET/TestPlugin/CoreCommands.cs b/src/MiNET/TestPlugin/CoreCommands.cs index 904837152..77414dec1 100644 --- a/src/MiNET/TestPlugin/CoreCommands.cs +++ b/src/MiNET/TestPlugin/CoreCommands.cs @@ -1270,7 +1270,7 @@ public void Kit(Player player, int kitId) inventory.Slots[c++] = new ItemGoldenSword(); // Golden Sword inventory.Slots[c++] = new ItemIronSword(); // Iron Sword inventory.Slots[c++] = new ItemDiamondSword(); // Diamond Sword - inventory.Slots[c++] = new ItemArrow {Count = 64, UniqueId = Environment.TickCount}; // Arrows + inventory.Slots[c++] = new ItemArrow {Count = 64, UniqueId = Environment.TickCount & Int32.MaxValue}; // Arrows inventory.Slots[c++] = new ItemEgg {Count = 64}; // Eggs inventory.Slots[c++] = new ItemSnowball {Count = 64}; // Snowballs inventory.Slots[c++] = new ItemIronSword diff --git a/src/MiNET/TestPlugin/NiceLobby/NiceLobbyPlugin.cs b/src/MiNET/TestPlugin/NiceLobby/NiceLobbyPlugin.cs index e80f2f624..146839c36 100644 --- a/src/MiNET/TestPlugin/NiceLobby/NiceLobbyPlugin.cs +++ b/src/MiNET/TestPlugin/NiceLobby/NiceLobbyPlugin.cs @@ -512,31 +512,31 @@ private void OnPlayerJoin(object o, PlayerEventArgs eventArgs) { Count = 1, Metadata = 0, - UniqueId = Environment.TickCount + UniqueId = Environment.TickCount & Int32.MaxValue }; player.Inventory.Slots[idx++] = new ItemIronSword() { Count = 1, Metadata = 0, - UniqueId = Environment.TickCount + UniqueId = Environment.TickCount & Int32.MaxValue }; player.Inventory.Slots[idx++] = new ItemIronSword() { Count = 1, Metadata = 0, - UniqueId = Environment.TickCount + UniqueId = Environment.TickCount & Int32.MaxValue }; player.Inventory.Slots[idx++] = new ItemIronSword() { Count = 1, Metadata = 0, - UniqueId = Environment.TickCount + UniqueId = Environment.TickCount & Int32.MaxValue }; - player.Inventory.Helmet = new ItemDiamondHelmet() {UniqueId = Environment.TickCount}; - player.Inventory.Chest = new ItemElytra() {UniqueId = Environment.TickCount}; - player.Inventory.Leggings = new ItemDiamondLeggings() {UniqueId = Environment.TickCount}; - player.Inventory.Boots = new ItemDiamondBoots() {UniqueId = Environment.TickCount}; + player.Inventory.Helmet = new ItemDiamondHelmet() {UniqueId = Environment.TickCount & Int32.MaxValue}; + player.Inventory.Chest = new ItemElytra() {UniqueId = Environment.TickCount & Int32.MaxValue}; + player.Inventory.Leggings = new ItemDiamondLeggings() {UniqueId = Environment.TickCount & Int32.MaxValue}; + player.Inventory.Boots = new ItemDiamondBoots() {UniqueId = Environment.TickCount & Int32.MaxValue}; //while (player.Inventory.SetFirstEmptySlot(new ItemIronAxe(), false)) { } player.SendPlayerInventory();