Fix addFutureDisguise
This commit is contained in:
		| @@ -715,24 +715,26 @@ public class DisguiseUtilities { | |||||||
|         if (!getDisguises().containsKey(entityId)) { |         if (!getDisguises().containsKey(entityId)) { | ||||||
|             getDisguises().put(entityId, new HashSet<>()); |             getDisguises().put(entityId, new HashSet<>()); | ||||||
|  |  | ||||||
|             synchronized (isNoInteract) { |             if (disguise.getEntity() != null) { | ||||||
|                 Entity entity = disguise.getEntity(); |                 synchronized (isNoInteract) { | ||||||
|  |                     Entity entity = disguise.getEntity(); | ||||||
|  |  | ||||||
|                 switch (entity.getType()) { |                     switch (entity.getType()) { | ||||||
|                     case EXPERIENCE_ORB: |                         case EXPERIENCE_ORB: | ||||||
|                     case DROPPED_ITEM: |                         case DROPPED_ITEM: | ||||||
|                     case ARROW: |                         case ARROW: | ||||||
|                     case SPECTRAL_ARROW: |                         case SPECTRAL_ARROW: | ||||||
|                         isNoInteract.add(entity.getEntityId()); |                             isNoInteract.add(entity.getEntityId()); | ||||||
|                         break; |                             break; | ||||||
|                     default: |                         default: | ||||||
|                         break; |                             break; | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
|             } |  | ||||||
|  |  | ||||||
|             synchronized (isSpecialInteract) { |                 synchronized (isSpecialInteract) { | ||||||
|                 if (disguise.getEntity() instanceof Wolf && disguise.getType() != DisguiseType.WOLF) { |                     if (disguise.getEntity() instanceof Wolf && disguise.getType() != DisguiseType.WOLF) { | ||||||
|                     isSpecialInteract.add(entityId); |                         isSpecialInteract.add(entityId); | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| @@ -771,6 +773,7 @@ public class DisguiseUtilities { | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         for (TargetedDisguise disguise : getFutureDisguises().remove(entity.getEntityId())) { |         for (TargetedDisguise disguise : getFutureDisguises().remove(entity.getEntityId())) { | ||||||
|  |             disguise.setEntity(entity); | ||||||
|             addDisguise(entity.getEntityId(), disguise); |             addDisguise(entity.getEntityId(), disguise); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user