Add y modifier to disguises

This commit is contained in:
libraryaddict
2020-10-09 10:55:38 +13:00
parent 1795e03e31
commit 6505d7530f
7 changed files with 79 additions and 21 deletions

View File

@@ -2311,8 +2311,6 @@ public class DisguiseUtilities {
}
}
Location loc = player.getLocation();
// Resend any active potion effects
for (PotionEffect potionEffect : player.getActivePotionEffects()) {
Object mobEffect = ReflectionManager.createMobEffect(potionEffect);
@@ -2939,7 +2937,7 @@ public class DisguiseUtilities {
Location loc = disguise.getEntity().getLocation();
packet.getDoubles().write(0, loc.getX());
packet.getDoubles().write(1, loc.getY() + height + (0.28 * i));
packet.getDoubles().write(1, loc.getY() + height + disguise.getWatcher().getYModifier() + (0.28 * i));
packet.getDoubles().write(2, loc.getZ());
packets.add(packet);