Skip to content

Commit

Permalink
Minor fixes (redundant code, old meta, Debug format bork, push math)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 14, 2020
1 parent dc575be commit 791bd8b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
Expand Up @@ -230,9 +230,6 @@ else if (type == EntityType.OCELOT && mechanism.getValue().matchesEnum(Ocelot.Ty
else if (type == EntityType.RABBIT && mechanism.getValue().matchesEnum(Rabbit.Type.values())) {
((Rabbit) colored.getBukkitEntity()).setRabbitType(Rabbit.Type.valueOf(mechanism.getValue().asString().toUpperCase()));
}
else if (type == EntityType.RABBIT && mechanism.getValue().matchesEnum(Rabbit.Type.values())) {
((Rabbit) colored.getBukkitEntity()).setRabbitType(Rabbit.Type.valueOf(mechanism.getValue().asString().toUpperCase()));
}
else if (type == EntityType.LLAMA) {
((Llama) colored.getBukkitEntity()).setColor(Llama.Color.valueOf(mechanism.getValue().asString().toUpperCase()));
}
Expand Down
Expand Up @@ -46,10 +46,6 @@ public EquipCommand() {
//
// @Tags
// <EntityTag.equipment>
// <EntityTag.equipment.helmet>
// <EntityTag.equipment.chestplate>
// <EntityTag.equipment.leggings>
// <EntityTag.equipment.boots>
// <InventoryTag.equipment>
//
// @Usage
Expand Down
Expand Up @@ -290,7 +290,7 @@ public void run() {
Vector v1 = lastEntity.getLocation().toVector();
Vector v3 = v2.clone().subtract(v1).normalize();
if (forceAlong) {
Vector newDest = v2.clone().subtract(Origin).normalize().multiply(runs / 20).add(Origin);
Vector newDest = v2.clone().subtract(Origin).normalize().multiply(runs * speed / 20).add(Origin);
lastEntity.teleport(new Location(lastEntity.getLocation().getWorld(),
newDest.getX(), newDest.getY(), newDest.getZ(),
lastEntity.getLocation().getYaw(), lastEntity.getLocation().getPitch()));
Expand Down
Expand Up @@ -169,6 +169,7 @@ public static void echoError(ScriptQueue sourceQueue, String message) {
public static boolean errorDuplicatePrevention = false;

public static void echoError(ScriptQueue sourceQueue, String message, boolean reformat) {
message = cleanTextForDebugOutput(message);
if (errorDuplicatePrevention) {
finalOutputDebugText("Error within error (??!!!! REPORT THIS, SOMETHING WENT SUPER WRONG!): " + message, sourceQueue, reformat);
return;
Expand Down

0 comments on commit 791bd8b

Please sign in to comment.