mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-05 09:09:40 +01:00
Fix an error with disguising non-livin as livin
This commit is contained in:
parent
3d7be88524
commit
771a827e33
@ -273,11 +273,12 @@ public class FlagWatcher {
|
|||||||
|
|
||||||
// Its sending the air metadata. This is the least commonly sent metadata which all entitys still share.
|
// Its sending the air metadata. This is the least commonly sent metadata which all entitys still share.
|
||||||
// I send my custom values if I see this!
|
// I send my custom values if I see this!
|
||||||
if (id == MetaIndex.ENTITY_AIR_TICKS.getIndex()) {
|
if (index == MetaIndex.ENTITY_AIR_TICKS) {
|
||||||
sendAllCustom = true;
|
sendAllCustom = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Object value = null;
|
Object value = null;
|
||||||
|
boolean usingBackup = false;
|
||||||
|
|
||||||
if (entityValues.containsKey(id)) {
|
if (entityValues.containsKey(id)) {
|
||||||
if (entityValues.get(id) == null) {
|
if (entityValues.get(id) == null) {
|
||||||
@ -286,7 +287,7 @@ public class FlagWatcher {
|
|||||||
|
|
||||||
value = entityValues.get(id);
|
value = entityValues.get(id);
|
||||||
|
|
||||||
if (id == MetaIndex.LIVING_HEALTH.getIndex() && (float) watch.getRawValue() <= 0) {
|
if (index == MetaIndex.LIVING_HEALTH && (float) watch.getRawValue() <= 0) {
|
||||||
value = watch.getRawValue();
|
value = watch.getRawValue();
|
||||||
}
|
}
|
||||||
} else if (backupEntityValues.containsKey(id)) {
|
} else if (backupEntityValues.containsKey(id)) {
|
||||||
@ -295,10 +296,11 @@ public class FlagWatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
value = backupEntityValues.get(id);
|
value = backupEntityValues.get(id);
|
||||||
|
usingBackup = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
if (isEntityAnimationsAdded() && (index == MetaIndex.ENTITY_META || index == MetaIndex.LIVING_META)) {
|
if (isEntityAnimationsAdded() && (index == MetaIndex.ENTITY_META || (index == MetaIndex.LIVING_META && !usingBackup))) {
|
||||||
value = addEntityAnimations(index, (byte) value, (byte) watch.getRawValue());
|
value = addEntityAnimations(index, (byte) value, (byte) watch.getRawValue());
|
||||||
|
|
||||||
if (index == MetaIndex.ENTITY_META) {
|
if (index == MetaIndex.ENTITY_META) {
|
||||||
|
Loading…
Reference in New Issue
Block a user