Update the dual version

This commit is contained in:
libraryaddict 2015-12-30 21:12:11 +13:00
parent 2d974a781f
commit 92c4450eea
15 changed files with 1643 additions and 111 deletions

View File

@ -0,0 +1,21 @@
From 32269ec951791791fe8553f0939c6eaa2b6b472b Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 30 Dec 2015 19:57:10 +1300
Subject: [PATCH] Add Elytra
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 0fb2605..bc930d1 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -443,6 +443,7 @@ public enum Material {
JUNGLE_DOOR_ITEM(429),
ACACIA_DOOR_ITEM(430),
DARK_OAK_DOOR_ITEM(431),
+ ELYTRA(443),
GOLD_RECORD(2256, 1),
GREEN_RECORD(2257, 1),
RECORD_3(2258, 1),
--
1.9.5.msysgit.0

View File

@ -0,0 +1,46 @@
From 24a5d0cfe1d62e2ff6a3a0a279c63b038a134629 Mon Sep 17 00:00:00 2001
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Wed, 30 Dec 2015 21:05:47 +1300
Subject: [PATCH] Levitation potion effect
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
index 4919d59..e75aa18 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
@@ -126,6 +126,11 @@ public abstract class PotionEffectType {
*/
public static final PotionEffectType SATURATION = new PotionEffectTypeWrapper(23);
+ /**
+ * Slows the fall rate down
+ */
+ public static final PotionEffectType LEVITATION = new PotionEffectTypeWrapper(25);
+
private final int id;
protected PotionEffectType(int id) {
@@ -202,7 +207,7 @@ public abstract class PotionEffectType {
return "PotionEffectType[" + id + ", " + getName() + "]";
}
- private static final PotionEffectType[] byId = new PotionEffectType[24];
+ private static final PotionEffectType[] byId = new PotionEffectType[26];
private static final Map<String, PotionEffectType> byName = new HashMap<String, PotionEffectType>();
// will break on updates.
private static boolean acceptingNew = true;
diff --git a/src/main/java/org/bukkit/potion/PotionType.java b/src/main/java/org/bukkit/potion/PotionType.java
index 6ad9a91..a3dc228 100644
--- a/src/main/java/org/bukkit/potion/PotionType.java
+++ b/src/main/java/org/bukkit/potion/PotionType.java
@@ -15,6 +15,7 @@ public enum PotionType {
INSTANT_DAMAGE(12, PotionEffectType.HARM, 2),
WATER_BREATHING(13, PotionEffectType.WATER_BREATHING, 1),
INVISIBILITY(14, PotionEffectType.INVISIBILITY, 1),
+ LEVITATION(15, PotionEffectType.LEVITATION, 1),
;
private final int damageValue, maxLevel;
--
1.9.5.msysgit.0

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,5 +1,6 @@
package mineplex.core.common.util;
import java.util.HashMap;
import java.util.UUID;
import mineplex.core.common.DummyEntity;
@ -8,6 +9,7 @@ import net.minecraft.server.v1_8_R3.Entity;
import net.minecraft.server.v1_8_R3.EntityLiving;
import net.minecraft.server.v1_8_R3.EntityWither;
import net.minecraft.server.v1_8_R3.MathHelper;
import net.minecraft.server.v1_8_R3.PacketPlayOutBossBar;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
@ -15,133 +17,198 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
public class UtilTextTop
public class UtilTextTop
{
//Base Commands
// Base Commands
public static void display(String text, Player... players)
{
displayProgress(text, 1, players);
}
public static void displayProgress(String text, double progress, Player... players)
{
for (Player player : players)
displayTextBar(player, progress, text);
}
//Logic
// Logic
public static final int EntityDragonId = 777777;
public static final int EntityWitherId = 777778;
//Display
public static final UUID BossUUID = UUID.randomUUID();
private static HashMap<String, BukkitRunnable> _lastUpdated = new HashMap<String, BukkitRunnable>();
// Display
public static void displayTextBar(final Player player, double healthPercent, String text)
{
deleteOld(player);
healthPercent = Math.min(1, healthPercent);
//Display Dragon
if (_lastUpdated.containsKey(player.getName()))
{
Location loc = player.getLocation().subtract(0, 200, 0);
UtilPlayer.sendPacket(player, getDragonPacket(text, healthPercent, loc));
_lastUpdated.get(player.getName()).cancel();
}
//Display Wither (as well as Dragon)
Location loc = player.getEyeLocation().add(player.getLocation().getDirection().multiply(24));
UtilPlayer.sendPacket(player, getWitherPacket(text, healthPercent, loc));
//Remove
Bukkit.getServer().getScheduler().runTaskLater(Bukkit.getPluginManager().getPlugins()[0], new Runnable()
healthPercent = Math.max(0, Math.min(1, healthPercent));
// Remove
final BukkitRunnable runnable = new BukkitRunnable()
{
public void run()
{
if (_lastUpdated.containsKey(player.getName()) && _lastUpdated.get(player.getName()) != this)
return;
deleteOld(player);
_lastUpdated.remove(player.getName());
}
}, 20);
};
runnable.runTaskLater(Bukkit.getPluginManager().getPlugins()[0], 20);
if (UtilPlayer.is1_9(player))
{
sendBossBar(player, healthPercent, text);
_lastUpdated.put(player.getName(), runnable);
return;
}
_lastUpdated.put(player.getName(), runnable);
deleteOld(player);
// Display Dragon
{
Location loc = player.getLocation().subtract(0, 200, 0);
UtilPlayer.sendPacket(player, getDragonPacket(text, healthPercent, loc));
}
// Display Wither (as well as Dragon)
Location loc = player.getEyeLocation().add(player.getLocation().getDirection().multiply(24));
UtilPlayer.sendPacket(player, getWitherPacket(text, healthPercent, loc));
}
private static void sendBossBar(Player player, double health, String text)
{
if (_lastUpdated.containsKey(player.getName()))
{
PacketPlayOutBossBar bossBar1 = new PacketPlayOutBossBar();
bossBar1.uuid = BossUUID;
bossBar1.action = 2;
bossBar1.health = (float) health;
PacketPlayOutBossBar bossBar2 = new PacketPlayOutBossBar();
bossBar2.uuid = BossUUID;
bossBar2.action = 3;
bossBar2.title = text;
UtilPlayer.sendPacket(player, bossBar1, bossBar2);
}
else
{
PacketPlayOutBossBar bossBar = new PacketPlayOutBossBar();
bossBar.uuid = BossUUID;
bossBar.title = text;
bossBar.health = (float) health;
bossBar.color = 2;
UtilPlayer.sendPacket(player, bossBar);
}
}
private static void deleteOld(Player player)
{
if (UtilPlayer.is1_9(player))
{
PacketPlayOutBossBar bossBar = new PacketPlayOutBossBar();
bossBar.uuid = BossUUID;
bossBar.action = 1;
UtilPlayer.sendPacket(player, bossBar);
return;
}
// Delete Dragon (All Clients)
PacketPlayOutEntityDestroy destroyDragonPacket = new PacketPlayOutEntityDestroy(new int[]
{
EntityDragonId
EntityDragonId
});
UtilPlayer.sendPacket(player, destroyDragonPacket);
// Delete Wither (1.8+ Only)
PacketPlayOutEntityDestroy destroyWitherPacket = new PacketPlayOutEntityDestroy(new int[]
{
EntityWitherId
EntityWitherId
});
UtilPlayer.sendPacket(player, destroyWitherPacket);
}
public static PacketPlayOutSpawnEntityLiving getDragonPacket(String text, double healthPercent, Location loc)
{
PacketPlayOutSpawnEntityLiving mobPacket = new PacketPlayOutSpawnEntityLiving();
mobPacket.a = (int) EntityDragonId; //Entity ID
mobPacket.b = (byte) EntityType.ENDER_DRAGON.getTypeId(); //Mob type
mobPacket.c = (int) Math.floor(loc.getBlockX() * 32.0D); //X position
mobPacket.d = (int) MathHelper.floor(loc.getBlockY() * 32.0D); //Y position
mobPacket.e = (int) Math.floor(loc.getBlockZ() * 32.0D); //Z position
mobPacket.f = (byte) 0; //Pitch
mobPacket.g = (byte) 0; //Head Pitch
mobPacket.h = (byte) 0; //Yaw
mobPacket.i = (short) 0; //X velocity
mobPacket.j = (short) 0; //Y velocity
mobPacket.k = (short) 0; //Z velocity
mobPacket.a = (int) EntityDragonId; // Entity ID
mobPacket.b = (byte) EntityType.ENDER_DRAGON.getTypeId(); // Mob type
mobPacket.c = (int) Math.floor(loc.getBlockX() * 32.0D); // X position
mobPacket.d = (int) MathHelper.floor(loc.getBlockY() * 32.0D); // Y position
mobPacket.e = (int) Math.floor(loc.getBlockZ() * 32.0D); // Z position
mobPacket.f = (byte) 0; // Pitch
mobPacket.g = (byte) 0; // Head Pitch
mobPacket.h = (byte) 0; // Yaw
mobPacket.i = (short) 0; // X velocity
mobPacket.j = (short) 0; // Y velocity
mobPacket.k = (short) 0; // Z velocity
mobPacket.uuid = UUID.randomUUID();
//Health
// Health
double health = healthPercent * 199.9 + 0.1;
//if (halfHealth)
// health = healthPercent * 99 + 101;
//Watcher
// if (halfHealth)
// health = healthPercent * 99 + 101;
// Watcher
DataWatcher watcher = getWatcher(text, health, loc.getWorld());
mobPacket.l = watcher;
return mobPacket;
}
public static PacketPlayOutSpawnEntityLiving getWitherPacket(String text, double healthPercent, Location loc)
{
PacketPlayOutSpawnEntityLiving mobPacket = new PacketPlayOutSpawnEntityLiving();
mobPacket.a = (int) EntityWitherId; //Entity ID
mobPacket.b = (byte) EntityType.WITHER.getTypeId(); //Mob type
mobPacket.c = (int) Math.floor(loc.getBlockX() * 32.0D); //X position
mobPacket.d = (int) MathHelper.floor(loc.getBlockY() * 32.0D); //Y position
mobPacket.e = (int) Math.floor(loc.getBlockZ() * 32.0D); //Z position
mobPacket.f = (byte) 0; //Pitch
mobPacket.g = (byte) 0; //Head Pitch
mobPacket.h = (byte) 0; //Yaw
mobPacket.i = (short) 0; //X velocity
mobPacket.j = (short) 0; //Y velocity
mobPacket.k = (short) 0; //Z velocity
mobPacket.a = (int) EntityWitherId; // Entity ID
mobPacket.b = (byte) EntityType.WITHER.getTypeId(); // Mob type
mobPacket.c = (int) Math.floor(loc.getBlockX() * 32.0D); // X position
mobPacket.d = (int) MathHelper.floor(loc.getBlockY() * 32.0D); // Y position
mobPacket.e = (int) Math.floor(loc.getBlockZ() * 32.0D); // Z position
mobPacket.f = (byte) 0; // Pitch
mobPacket.g = (byte) 0; // Head Pitch
mobPacket.h = (byte) 0; // Yaw
mobPacket.i = (short) 0; // X velocity
mobPacket.j = (short) 0; // Y velocity
mobPacket.k = (short) 0; // Z velocity
mobPacket.uuid = UUID.randomUUID();
//Health
// Health
double health = healthPercent * 299.9 + 0.1;
//if (halfHealth)
// health = healthPercent * 149 + 151;
//Watcher
// if (halfHealth)
// health = healthPercent * 149 + 151;
// Watcher
DataWatcher watcher = getWatcher(text, health, loc.getWorld());
mobPacket.l = watcher;
return mobPacket;
}
public static DataWatcher getWatcher(String text, double health, World world)
{
DataWatcher watcher = new DataWatcher(new DummyEntity(((CraftWorld) world).getHandle()));

View File

@ -19,6 +19,8 @@ import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import net.minecraft.server.v1_8_R3.DataWatcher;
import net.minecraft.server.v1_8_R3.DataWatcher.WatchableObject;
import net.minecraft.server.v1_8_R3.Entity;
import net.minecraft.server.v1_8_R3.EntityArmorStand;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketPlayInUseEntity;
import net.minecraft.server.v1_8_R3.PacketPlayInUseEntity.EnumEntityUseAction;
@ -519,25 +521,20 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler, NCPHook
{
DataWatcher watcher = new DataWatcher(new DummyEntity(((CraftWorld) owner.getWorld()).getHandle()));
watcher.a(0, (byte) (0 | 1 << 5)); // Invisible
watcher.a(1, Short.valueOf((short) 300));
watcher.a(2, finalEntityName);
watcher.a(3, (byte) 1);
watcher.a(4, Byte.valueOf((byte) 0));
watcher.a(7, Integer.valueOf(0));
watcher.a(8, Byte.valueOf((byte) 0));
watcher.a(9, Byte.valueOf((byte) 0));
watcher.a(6, Float.valueOf(1.0F));
watcher.a(10, (byte) (0 | 0x1)); // Small
watcher.a(0, (byte) (0 | 1 << 5), Entity.META_ENTITYDATA, (byte) (0 | 1 << 5)); // Invisible
watcher.a(1, Short.valueOf((short) 300), Entity.META_AIR, 0);
watcher.a(2, finalEntityName, Entity.META_CUSTOMNAME, finalEntityName);
watcher.a(3, (byte) 1, Entity.META_CUSTOMNAME_VISIBLE, true);
watcher.a(10, (byte) (0 | 0x1), EntityArmorStand.META_ARMOR_OPTION, (byte) (0 | 0x1)); // Small
if (newPacket)
{
if (squidId >= 0)
{
watcher.watch(10, (byte) 16);
watcher.watch(10, (byte) 16, EntityArmorStand.META_ARMOR_OPTION, (byte) 16);
DataWatcher squidWatcher = new DataWatcher(new DummyEntity(((CraftWorld) owner.getWorld()).getHandle()));
squidWatcher.a(0, (byte) (0 | 1 << 5));
squidWatcher.a(0, (byte) (0 | 1 << 5), Entity.META_ENTITYDATA, (byte) (0 | 1 << 5));
PacketPlayOutSpawnEntityLiving spawnPacket = new PacketPlayOutSpawnEntityLiving();
spawnPacket.a = squidId;
@ -545,6 +542,7 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler, NCPHook
spawnPacket.c = 1000000;
spawnPacket.l = squidWatcher;
spawnPacket.uuid = UUID.randomUUID();
UtilPlayer.sendPacket(owner, spawnPacket);
@ -562,6 +560,7 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler, NCPHook
spawnPacket.c = 1000000;
spawnPacket.l = watcher;
spawnPacket.uuid = UUID.randomUUID();
UtilPlayer.sendPacket(owner, spawnPacket);

View File

@ -11,6 +11,7 @@ import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerMoveEvent;
@ -30,6 +31,7 @@ import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
@ -202,7 +204,12 @@ public class AntiHack extends MiniPlugin
return true;
}
if (player.isFlying() || player.isInsideVehicle() || player.getGameMode() != GameMode.SURVIVAL || UtilPlayer.isSpectator(player))
if (player.isFlying() || ((CraftPlayer) player).getHandle().isGliding() || player.isInsideVehicle() || player.getGameMode() != GameMode.SURVIVAL || UtilPlayer.isSpectator(player))
{
return true;
}
if (UtilInv.IsItem(player.getInventory().getArmorContents()[2], Material.ELYTRA, (byte) 0))
{
return true;
}

View File

@ -401,17 +401,17 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
disguise(disguise, true, players);
}
public Packet[] getBedChunkLoadPackets(Player player, Location newLoc)
public PacketPlayOutMapChunk[] getBedChunkLoadPackets(Player player, Location newLoc)
{
prepareChunk(newLoc);
Packet[] packets = new Packet[2];
PacketPlayOutMapChunk[] packets = new PacketPlayOutMapChunk[2];
// Make unload
packets[0] = new PacketPlayOutMapChunk(_bedChunk, true, 0);
// Make load
packets[1] = new PacketPlayOutMapChunkBulk(Arrays.asList(_bedChunk));
packets[1] = new PacketPlayOutMapChunk(_bedChunk, true, '\uffff');
return packets;
}

View File

@ -2,6 +2,8 @@ package mineplex.core.disguise.disguises;
import org.bukkit.entity.EntityType;
import net.minecraft.server.v1_8_R3.EntitySpider;
public class DisguiseCaveSpider extends DisguiseMonster
{
@ -9,7 +11,7 @@ public class DisguiseCaveSpider extends DisguiseMonster
{
super(EntityType.CAVE_SPIDER, entity);
DataWatcher.a(16, new Byte((byte) 0));
DataWatcher.a(16, new Byte((byte) 0), EntitySpider.META_CLIMBING, (byte) 0);
}
public boolean bT()
@ -26,7 +28,7 @@ public class DisguiseCaveSpider extends DisguiseMonster
else
b0 = (byte) (b0 & 0xFFFFFFFE);
DataWatcher.watch(16, Byte.valueOf(b0));
DataWatcher.watch(16, Byte.valueOf(b0), EntitySpider.META_CLIMBING, b0);
}
protected String getHurtSound()

View File

@ -2,23 +2,25 @@ package mineplex.core.disguise.disguises;
import org.bukkit.entity.*;
import net.minecraft.server.v1_8_R3.EntityGuardian;
public class DisguiseGuardian extends DisguiseCreature
{
public DisguiseGuardian(org.bukkit.entity.Entity entity)
{
super(EntityType.GUARDIAN, entity);
DataWatcher.a(16, 0);
DataWatcher.a(17, 0);
DataWatcher.a(16, 0, EntityGuardian.META_ELDER, (byte) 0);
DataWatcher.a(17, 0, EntityGuardian.META_TARGET, 0);
}
public void setTarget(int target)
{
DataWatcher.watch(17, target);
DataWatcher.watch(17, target, EntityGuardian.META_TARGET, target);
}
public void setElder(boolean elder)
{
DataWatcher.watch(16, Integer.valueOf(DataWatcher.getInt(16) | 4));
DataWatcher.watch(16, Integer.valueOf(DataWatcher.getInt(16) | 4), EntityGuardian.META_ELDER, (byte) (DataWatcher.getInt(16) | 4));
}
public boolean isElder()

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.UUID;
import org.bukkit.Location;
import org.bukkit.entity.Entity;

View File

@ -2,6 +2,7 @@ package mineplex.minecraft.game.core.boss.ironwizard.abilities;
import mineplex.core.common.util.UtilEnt;
import net.minecraft.server.v1_8_R3.DataWatcher;
import net.minecraft.server.v1_8_R3.Entity;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketPlayOutAttachEntity;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
@ -52,8 +53,8 @@ public class BlockHailBlock
PacketPlayOutSpawnEntityLiving packet1 = new PacketPlayOutSpawnEntityLiving();
DataWatcher watcher = new DataWatcher(null);
watcher.a(0, (byte) 32);
watcher.a(1, 0);
watcher.a(0, (byte) 32, Entity.META_ENTITYDATA, (byte) 0);
watcher.a(1, 0, Entity.META_AIR, 0);
packet1.a = _silverfish;
packet1.b = EntityType.SILVERFISH.getTypeId();

View File

@ -172,8 +172,8 @@ public class GolemExplodingAura extends BossAbility<GolemCreature, IronGolem>
PacketPlayOutSpawnEntityLiving packet1 = new PacketPlayOutSpawnEntityLiving();
DataWatcher watcher = new DataWatcher(null);
watcher.a(0, (byte) 32);
watcher.a(1, 0);
watcher.a(0, (byte) 32, net.minecraft.server.v1_8_R3.Entity.META_ENTITYDATA, (byte) 0);
watcher.a(1, 0, net.minecraft.server.v1_8_R3.Entity.META_AIR, 0);
packet1.a = key;
packet1.b = EntityType.SILVERFISH.getTypeId();

View File

@ -395,8 +395,8 @@ public class GolemExplosiveBlock extends BossAbility<GolemCreature, IronGolem>
PacketPlayOutSpawnEntityLiving packet1 = new PacketPlayOutSpawnEntityLiving();
DataWatcher watcher = new DataWatcher(null);
watcher.a(0, (byte) 32);
watcher.a(1, 0);
watcher.a(0, (byte) 32, net.minecraft.server.v1_8_R3.Entity.META_ENTITYDATA, (byte) 0);
watcher.a(1, 0, net.minecraft.server.v1_8_R3.Entity.META_AIR, 0);
packet1.a = id;
packet1.b = EntityType.SILVERFISH.getTypeId();

View File

@ -1,5 +1,7 @@
package mineplex.minecraft.game.core.boss.snake;
import java.util.UUID;
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
@ -8,12 +10,14 @@ import org.bukkit.util.Vector;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
import net.minecraft.server.v1_8_R3.DataWatcher;
import net.minecraft.server.v1_8_R3.EntityArmorStand;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntity;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_8_R3.Vector3f;
public class SnakeSegment
{
@ -92,16 +96,16 @@ public class SnakeSegment
_prevDir = vec;
DataWatcher watcher = new DataWatcher(null);
watcher.a(0, (byte) 32);
watcher.a(1, 0);
watcher.a(10, (byte) 0);
watcher.a(11, vec);
for (int i = 12; i < 17; i++)
{
watcher.a(i, new Vector(0, 0, 0));
}
watcher.a(0, (byte) 32, net.minecraft.server.v1_8_R3.Entity.META_ENTITYDATA, (byte) 0);
watcher.a(1, 0, net.minecraft.server.v1_8_R3.Entity.META_AIR, 0);
watcher.a(10, (byte) 0, EntityArmorStand.META_ARMOR_OPTION, (byte) 0);
watcher.a(11, new Vector3f(0, 0, 0), EntityArmorStand.META_HEAD_POSE,
new Vector3f((float) vec.getX(), (float) vec.getY(), (float) vec.getZ()));
watcher.a(12, new Vector3f(0, 0, 0), EntityArmorStand.META_BODY_POSE, new Vector3f(0, 0, 0));
watcher.a(13, new Vector3f(0, 0, 0), EntityArmorStand.META_LEFT_ARM_POSE, new Vector3f(0, 0, 0));
watcher.a(14, new Vector3f(0, 0, 0), EntityArmorStand.META_RIGHT_ARM_POSE, new Vector3f(0, 0, 0));
watcher.a(15, new Vector3f(0, 0, 0), EntityArmorStand.META_LEFT_LEG_POSE, new Vector3f(0, 0, 0));
watcher.a(16, new Vector3f(0, 0, 0), EntityArmorStand.META_RIGHT_LEG_POSE, new Vector3f(0, 0, 0));
PacketPlayOutEntityMetadata meta = new PacketPlayOutEntityMetadata();
@ -129,23 +133,25 @@ public class SnakeSegment
PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving();
DataWatcher watcher = new DataWatcher(null);
watcher.a(1, 0);
watcher.a(1, 0, net.minecraft.server.v1_8_R3.Entity.META_AIR, 0);
packet.a = getId();
packet.c = (int) Math.floor(_entityLocation.getX() * 32);
packet.d = (int) Math.floor(_entityLocation.getY() * 32);
packet.e = (int) Math.floor(_entityLocation.getZ() * 32);
packet.l = watcher;
packet.uuid = UUID.randomUUID();
if (_item != null)
{
watcher.a(0, (byte) 32);
watcher.a(10, (byte) 0);
for (int i = 11; i < 17; i++)
{
watcher.a(i, new Vector(0, 0, 0));
}
watcher.a(0, (byte) 32, net.minecraft.server.v1_8_R3.Entity.META_ENTITYDATA, (byte) 32);
watcher.a(10, (byte) 0, EntityArmorStand.META_ARMOR_OPTION, (byte) 0);
watcher.a(11, new Vector3f(0, 0, 0), EntityArmorStand.META_HEAD_POSE, new Vector3f(0, 0, 0));
watcher.a(12, new Vector3f(0, 0, 0), EntityArmorStand.META_BODY_POSE, new Vector3f(0, 0, 0));
watcher.a(13, new Vector3f(0, 0, 0), EntityArmorStand.META_LEFT_ARM_POSE, new Vector3f(0, 0, 0));
watcher.a(14, new Vector3f(0, 0, 0), EntityArmorStand.META_RIGHT_ARM_POSE, new Vector3f(0, 0, 0));
watcher.a(15, new Vector3f(0, 0, 0), EntityArmorStand.META_LEFT_LEG_POSE, new Vector3f(0, 0, 0));
watcher.a(16, new Vector3f(0, 0, 0), EntityArmorStand.META_RIGHT_LEG_POSE, new Vector3f(0, 0, 0));
packet.b = 30;
@ -162,7 +168,7 @@ public class SnakeSegment
}
else
{
watcher.a(0, (byte) 0);
watcher.a(0, (byte) 0, net.minecraft.server.v1_8_R3.Entity.META_ENTITYDATA, (byte) 0);
packet.b = EntityType.MAGMA_CUBE.getTypeId();
return new Packet[]