Fixed isInvulnerable for real this time

This commit is contained in:
NavidK0
2015-03-30 23:07:47 -04:00
parent 15c0141c3d
commit 1ea2a3f94f
8 changed files with 25 additions and 5 deletions

View File

@@ -583,7 +583,7 @@ public class PacketsManager {
nmsEntity) == ReflectionManager.getNmsField("EntityLiving",
"maxNoDamageTicks").getInt(nmsEntity);
} else {
hasInvun = (Boolean) ReflectionManager.getNmsMethod("Entity", "isInvulnerable")
hasInvun = (Boolean) ReflectionManager.getNmsMethod("Entity", "isInvulnerable", DamageSource.class)
.invoke(nmsEntity, DamageSource.GENERIC);
}
} catch (Exception ex) {
@@ -819,7 +819,7 @@ public class PacketsManager {
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);
StructureModifier<Object> mods = packet.getModifier();
mods.write(0, observer.getEntityId());
List<WrappedWatchableObject> watchableList = new ArrayList<WrappedWatchableObject>();
List<WrappedWatchableObject> watchableList = new ArrayList<>();
byte b = (byte) 1 << 5;
if (observer.isSprinting())
b = (byte) (b | 1 << 3);