Skip to content

Commit

Permalink
cleanup odd property things
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 28, 2019
1 parent 4610e88 commit 511ee3f
Show file tree
Hide file tree
Showing 63 changed files with 4 additions and 780 deletions.
Expand Up @@ -26,21 +26,12 @@ public static EntityCanTick getFrom(ObjectTag entity) {
"can_tick"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityCanTick(EntityTag entity) {
this.entity = entity;
}

EntityTag entity;

/////////
// Property Methods
///////

@Override
public String getPropertyString() {
return String.valueOf(((ArmorStand) entity.getBukkitEntity()).canTick());
Expand All @@ -51,10 +42,6 @@ public String getPropertyId() {
return "can_tick";
}

///////////
// ObjectTag Attributes
////////

public static void registerTags() {

// <--[tag]
Expand Down
Expand Up @@ -32,21 +32,12 @@ public static EntityAI getFrom(ObjectTag entity) {
"has_ai", "toggle_ai"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityAI(EntityTag ent) {
entity = ent;
}

EntityTag entity;

/////////
// Property Methods
///////

@Override
public String getPropertyString() {
return String.valueOf(!NMSHandler.getEntityHelper().isAIDisabled(entity.getBukkitEntity()));
Expand All @@ -57,11 +48,6 @@ public String getPropertyId() {
return "has_ai";
}


///////////
// ObjectTag Attributes
////////

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {

Expand Down
Expand Up @@ -41,11 +41,6 @@ public static EntityAge getFrom(ObjectTag entity) {
"age_lock", "age"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityAge(EntityTag entity) {
ageable = entity;
}
Expand Down Expand Up @@ -117,11 +112,6 @@ public boolean getLock() {
return (ageable.getBukkitEntity() instanceof Zombie) || ((Ageable) ageable.getBukkitEntity()).getAgeLock();
}


/////////
// Property Methods
///////

@Override
public String getPropertyString() {
return getAge() + (getLock() ? "|locked" : "");
Expand All @@ -132,11 +122,6 @@ public String getPropertyId() {
return "age";
}


///////////
// ObjectTag Attributes
////////

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {

Expand Down
Expand Up @@ -40,21 +40,12 @@ public static EntityAnger getFrom(ObjectTag entity) {
"anger"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityAnger(EntityTag entity) {
this.entity = entity;
}

EntityTag entity;

/////////
// Property Methods
///////

@Override
public String getPropertyString() {
return String.valueOf(getAnger());
Expand All @@ -65,10 +56,6 @@ public String getPropertyId() {
return "anger";
}

///////////
// ObjectTag Attributes
////////

public int getAnger() {
if (entity.getBukkitEntity() instanceof PigZombie) {
return ((PigZombie) entity.getBukkitEntity()).getAnger();
Expand Down
Expand Up @@ -34,21 +34,12 @@ public static EntityAngry getFrom(ObjectTag entity) {
"angry"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityAngry(EntityTag entity) {
this.entity = entity;
}

EntityTag entity;

/////////
// Property Methods
///////

@Override
public String getPropertyString() {
if (entity.getBukkitEntityType() == EntityType.WOLF) {
Expand All @@ -75,10 +66,6 @@ public String getPropertyId() {
return "angry";
}

///////////
// ObjectTag Attributes
////////

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {

Expand Down
Expand Up @@ -47,21 +47,12 @@ public static EntityAreaEffectCloud getFrom(ObjectTag entity) {
"radius_per_tick", "reapplication_delay", "source", "wait_time"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityAreaEffectCloud(EntityTag ent) {
entity = ent;
}

EntityTag entity;

/////////
// Property Methods
///////

@Override
public String getPropertyString() {
return null;
Expand All @@ -72,11 +63,6 @@ public String getPropertyId() {
return "area_effect_cloud";
}


///////////
// ObjectTag Attributes
////////

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {

Expand Down
Expand Up @@ -31,21 +31,12 @@ public static EntityArmorBonus getFrom(ObjectTag entity) {
"armor_bonus"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityArmorBonus(EntityTag ent) {
entity = ent;
}

EntityTag entity;

/////////
// Property Methods
///////

@Override
public String getPropertyString() {
if (entity.getLivingEntity().getAttribute(org.bukkit.attribute.Attribute.GENERIC_ARMOR).getValue() > 0.0) {
Expand All @@ -63,11 +54,6 @@ public ElementTag getArmorBonus() {
return new ElementTag(entity.getLivingEntity().getAttribute(org.bukkit.attribute.Attribute.GENERIC_ARMOR).getValue());
}


///////////
// ObjectTag Attributes
////////

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {

Expand Down
Expand Up @@ -39,21 +39,12 @@ public static EntityArmorPose getFrom(ObjectTag entity) {
"armor_pose"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityArmorPose(EntityTag ent) {
entity = ent;
}

EntityTag entity;

/////////
// Property Methods
///////

@Override
public String getPropertyString() {
return getPoseList().identify();
Expand All @@ -74,10 +65,6 @@ private ListTag getPoseList() {
return list;
}

///////////
// ObjectTag Attributes
////////

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {

Expand Down
Expand Up @@ -32,21 +32,12 @@ public static EntityArms getFrom(ObjectTag entity) {
"arms"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityArms(EntityTag entity) {
dentity = entity;
}

EntityTag dentity;

/////////
// Property Methods
///////

@Override
public String getPropertyString() {
if (!((ArmorStand) dentity.getBukkitEntity()).hasArms()) {
Expand All @@ -62,10 +53,6 @@ public String getPropertyId() {
return "arms";
}

///////////
// ObjectTag Attributes
////////

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {

Expand Down
Expand Up @@ -30,21 +30,12 @@ public static EntityArrowDamage getFrom(ObjectTag entity) {
"damage"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityArrowDamage(EntityTag entity) {
dentity = entity;
}

EntityTag dentity;

/////////
// Property Methods
///////

@Override
public String getPropertyString() {
return String.valueOf(NMSHandler.getEntityHelper().getArrowDamage(dentity.getBukkitEntity()));
Expand All @@ -55,10 +46,6 @@ public String getPropertyId() {
return "damage";
}

///////////
// ObjectTag Attributes
////////

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {

Expand Down
Expand Up @@ -41,21 +41,12 @@ public static EntityAttributes getFrom(ObjectTag entity) {
"attributes"
};


///////////////////
// Instance Fields and Methods
/////////////

private EntityAttributes(EntityTag entity) {
this.entity = entity;
}

EntityTag entity;

/////////
// Property Methods
///////

public static String stringify(AttributeModifier modifier) {
return EscapeTagBase.escape(modifier.getName()) + "/" + modifier.getAmount() + "/" + modifier.getOperation().name()
+ "/" + (modifier.getSlot() == null ? "any" : modifier.getSlot().name());
Expand Down Expand Up @@ -91,10 +82,6 @@ public String getPropertyId() {
return "attributes";
}

///////////
// ObjectTag Attributes
////////

@Override
public ObjectTag getObjectAttribute(Attribute attribute) {

Expand Down

0 comments on commit 511ee3f

Please sign in to comment.