Revert "Update for 1.7 spigot hack"

This reverts commit 962bbece37.
This commit is contained in:
Andrew 2013-11-18 16:06:58 +13:00
parent 1a4507893f
commit c1a878a7d9
2 changed files with 9 additions and 8 deletions

View File

@ -11,6 +11,8 @@ import me.libraryaddict.disguise.disguisetypes.DisguiseType;
import me.libraryaddict.disguise.disguisetypes.MiscDisguise;
import me.libraryaddict.disguise.disguisetypes.MobDisguise;
import me.libraryaddict.disguise.disguisetypes.PlayerDisguise;
import me.libraryaddict.disguise.disguisetypes.watchers.DroppedItemWatcher;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

View File

@ -220,20 +220,19 @@ public class PacketsManager {
StructureModifier<Object> mods = spawnPackets[0].getModifier();
mods.write(0, disguisedEntity.getEntityId());
mods.write(1, ((PlayerDisguise) disguise).getName());
mods.write(2, ((PlayerDisguise) disguise).getName());
mods.write(3, (int) Math.floor(loc.getX() * 32));
mods.write(4, (int) Math.floor(loc.getY() * 32));
mods.write(5, (int) Math.floor(loc.getZ() * 32));
mods.write(6, yaw);
mods.write(7, (byte) (int) (loc.getPitch() * 256F / 360F));
mods.write(2, (int) Math.floor(loc.getX() * 32));
mods.write(3, (int) Math.floor(loc.getY() * 32));
mods.write(4, (int) Math.floor(loc.getZ() * 32));
mods.write(5, yaw);
mods.write(6, (byte) (int) (loc.getPitch() * 256F / 360F));
ItemStack item = null;
if (disguisedEntity instanceof Player && ((Player) disguisedEntity).getItemInHand() != null) {
item = CraftItemStack.asNMSCopy(((Player) disguisedEntity).getItemInHand());
} else if (disguisedEntity instanceof LivingEntity) {
item = CraftItemStack.asNMSCopy(((CraftLivingEntity) disguisedEntity).getEquipment().getItemInHand());
}
mods.write(8, (item == null ? 0 : item.id));
mods.write(9, createDataWatcher(nmsEntity.getDataWatcher(), disguise.getWatcher()));
mods.write(7, (item == null ? 0 : item.id));
mods.write(8, createDataWatcher(nmsEntity.getDataWatcher(), disguise.getWatcher()));
} else if (disguise.getType().isMob()) {