Add more commenting, add addEntityAnimations to flagwatcher clone
This commit is contained in:
parent
063b916c25
commit
c6ff4dafe7
@ -10,6 +10,9 @@ public enum AnimalColor {
|
||||
value = newValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* The color ID as defined by nms internals.
|
||||
*/
|
||||
public int getId() {
|
||||
return value;
|
||||
}
|
||||
|
@ -48,12 +48,15 @@ public abstract class Disguise {
|
||||
@Override
|
||||
public abstract Disguise clone();
|
||||
|
||||
/**
|
||||
* Seems I do this method so I can make cleaner constructors on disguises..
|
||||
*/
|
||||
protected void createDisguise(DisguiseType newType, boolean doSounds) {
|
||||
if (getWatcher() != null)
|
||||
return;
|
||||
if (newType.getEntityType() == null) {
|
||||
throw new RuntimeException("DisguiseType " + newType
|
||||
+ " was used to attempt to construct a disguise, but this version of craftbukkit does not have that entity");
|
||||
+ " was used in a futile attempt to construct a disguise, but this version of craftbukkit does not have that entity");
|
||||
}
|
||||
// Set the disguise type
|
||||
disguiseType = newType;
|
||||
|
@ -67,6 +67,7 @@ public class FlagWatcher {
|
||||
cloned.entityValues = (HashMap<Integer, Object>) entityValues.clone();
|
||||
cloned.items = items.clone();
|
||||
cloned.modifiedEntityAnimations = (HashSet) modifiedEntityAnimations.clone();
|
||||
cloned.addEntityAnimations = addEntityAnimations;
|
||||
return cloned;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user