Update for 1.7 spigot hack
This commit is contained in:
parent
e537fb8923
commit
962bbece37
@ -10,8 +10,6 @@ import me.libraryaddict.disguise.disguisetypes.DisguiseType;
|
|||||||
import me.libraryaddict.disguise.disguisetypes.MiscDisguise;
|
import me.libraryaddict.disguise.disguisetypes.MiscDisguise;
|
||||||
import me.libraryaddict.disguise.disguisetypes.MobDisguise;
|
import me.libraryaddict.disguise.disguisetypes.MobDisguise;
|
||||||
import me.libraryaddict.disguise.disguisetypes.PlayerDisguise;
|
import me.libraryaddict.disguise.disguisetypes.PlayerDisguise;
|
||||||
import me.libraryaddict.disguise.disguisetypes.watchers.DroppedItemWatcher;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -220,19 +220,20 @@ public class PacketsManager {
|
|||||||
StructureModifier<Object> mods = spawnPackets[0].getModifier();
|
StructureModifier<Object> mods = spawnPackets[0].getModifier();
|
||||||
mods.write(0, disguisedEntity.getEntityId());
|
mods.write(0, disguisedEntity.getEntityId());
|
||||||
mods.write(1, ((PlayerDisguise) disguise).getName());
|
mods.write(1, ((PlayerDisguise) disguise).getName());
|
||||||
mods.write(2, (int) Math.floor(loc.getX() * 32));
|
mods.write(2, ((PlayerDisguise) disguise).getName());
|
||||||
mods.write(3, (int) Math.floor(loc.getY() * 32));
|
mods.write(3, (int) Math.floor(loc.getX() * 32));
|
||||||
mods.write(4, (int) Math.floor(loc.getZ() * 32));
|
mods.write(4, (int) Math.floor(loc.getY() * 32));
|
||||||
mods.write(5, yaw);
|
mods.write(5, (int) Math.floor(loc.getZ() * 32));
|
||||||
mods.write(6, (byte) (int) (loc.getPitch() * 256F / 360F));
|
mods.write(6, yaw);
|
||||||
|
mods.write(7, (byte) (int) (loc.getPitch() * 256F / 360F));
|
||||||
ItemStack item = null;
|
ItemStack item = null;
|
||||||
if (disguisedEntity instanceof Player && ((Player) disguisedEntity).getItemInHand() != null) {
|
if (disguisedEntity instanceof Player && ((Player) disguisedEntity).getItemInHand() != null) {
|
||||||
item = CraftItemStack.asNMSCopy(((Player) disguisedEntity).getItemInHand());
|
item = CraftItemStack.asNMSCopy(((Player) disguisedEntity).getItemInHand());
|
||||||
} else if (disguisedEntity instanceof LivingEntity) {
|
} else if (disguisedEntity instanceof LivingEntity) {
|
||||||
item = CraftItemStack.asNMSCopy(((CraftLivingEntity) disguisedEntity).getEquipment().getItemInHand());
|
item = CraftItemStack.asNMSCopy(((CraftLivingEntity) disguisedEntity).getEquipment().getItemInHand());
|
||||||
}
|
}
|
||||||
mods.write(7, (item == null ? 0 : item.id));
|
mods.write(8, (item == null ? 0 : item.id));
|
||||||
mods.write(8, createDataWatcher(nmsEntity.getDataWatcher(), disguise.getWatcher()));
|
mods.write(9, createDataWatcher(nmsEntity.getDataWatcher(), disguise.getWatcher()));
|
||||||
|
|
||||||
} else if (disguise.getType().isMob()) {
|
} else if (disguise.getType().isMob()) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user