Skip to content

Commit

Permalink
Add 'pitch' and 'moonphase' tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunatrius committed Apr 21, 2016
1 parent 1c5b705 commit 1696e2c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Expand Up @@ -145,6 +145,13 @@ public String getValue() {
}
}

public static class Pitch extends TagPlayerPosition {
@Override
public String getValue() {
return String.format(Locale.ENGLISH, "%.2f", player.rotationPitch);
}
}

public static class Direction extends TagPlayerPosition {
@Override
public String getValue() {
Expand Down Expand Up @@ -218,6 +225,7 @@ public static void register() {
TagRegistry.INSTANCE.register(new SpeedY().setName("speedy"));
TagRegistry.INSTANCE.register(new SpeedZ().setName("speedz"));
TagRegistry.INSTANCE.register(new SpeedXZ().setName("speedxz"));
TagRegistry.INSTANCE.register(new Pitch().setName("pitch"));
TagRegistry.INSTANCE.register(new Direction().setName("direction"));
TagRegistry.INSTANCE.register(new RoughDirection().setName("roughdirection"));
TagRegistry.INSTANCE.register(new FineDirection().setName("finedirection"));
Expand Down
Expand Up @@ -143,6 +143,13 @@ public String getValue() {
}
}

public static class MoonPhase extends TagWorld {
@Override
public String getValue() {
return String.valueOf(world.getMoonPhase());
}
}

public static class Raining extends TagWorld {
@Override
public String getValue() {
Expand Down Expand Up @@ -231,6 +238,7 @@ public static void register() {
TagRegistry.INSTANCE.register(new Biome().setName("biome"));
TagRegistry.INSTANCE.register(new BiomeId().setName("biomeid"));
TagRegistry.INSTANCE.register(new Daytime().setName("daytime"));
TagRegistry.INSTANCE.register(new MoonPhase().setName("moonphase"));
TagRegistry.INSTANCE.register(new Raining().setName("raining"));
TagRegistry.INSTANCE.register(new Thundering().setName("thundering"));
TagRegistry.INSTANCE.register(new Snowing().setName("snowing"));
Expand Down

0 comments on commit 1696e2c

Please sign in to comment.