Commits
Parker Hawke authored and md_5 committed 19b7b7bd27b
958 958 | * Returns whether the world has an ongoing storm. |
959 959 | * |
960 960 | * @return Whether there is an ongoing storm |
961 961 | */ |
962 962 | public boolean hasStorm(); |
963 963 | |
964 964 | /** |
965 965 | * Set whether there is a storm. A duration will be set for the new |
966 966 | * current conditions. |
967 967 | * |
968 + | * This will implicitly call {@link #setClearWeatherDuration(int)} with 0 |
969 + | * ticks to reset the world's clear weather. |
970 + | * |
968 971 | * @param hasStorm Whether there is rain and snow |
969 972 | */ |
970 973 | public void setStorm(boolean hasStorm); |
971 974 | |
972 975 | /** |
973 976 | * Get the remaining time in ticks of the current conditions. |
974 977 | * |
975 978 | * @return Time in ticks |
976 979 | */ |
977 980 | public int getWeatherDuration(); |
986 989 | /** |
987 990 | * Returns whether there is thunder. |
988 991 | * |
989 992 | * @return Whether there is thunder |
990 993 | */ |
991 994 | public boolean isThundering(); |
992 995 | |
993 996 | /** |
994 997 | * Set whether it is thundering. |
995 998 | * |
999 + | * This will implicitly call {@link #setClearWeatherDuration(int)} with 0 |
1000 + | * ticks to reset the world's clear weather. |
1001 + | * |
996 1002 | * @param thundering Whether it is thundering |
997 1003 | */ |
998 1004 | public void setThundering(boolean thundering); |
999 1005 | |
1000 1006 | /** |
1001 1007 | * Get the thundering duration. |
1002 1008 | * |
1003 1009 | * @return Duration in ticks |
1004 1010 | */ |
1005 1011 | public int getThunderDuration(); |
1006 1012 | |
1007 1013 | /** |
1008 1014 | * Set the thundering duration. |
1009 1015 | * |
1010 1016 | * @param duration Duration in ticks |
1011 1017 | */ |
1012 1018 | public void setThunderDuration(int duration); |
1013 1019 | |
1020 + | /** |
1021 + | * Returns whether the world has clear weather. |
1022 + | * |
1023 + | * This will be true such that {@link #isThundering()} and |
1024 + | * {@link #hasStorm()} are both false. |
1025 + | * |
1026 + | * @return true if clear weather |
1027 + | */ |
1028 + | public boolean isClearWeather(); |
1029 + | |
1030 + | /** |
1031 + | * Set the clear weather duration. |
1032 + | * |
1033 + | * The clear weather ticks determine whether or not the world will be |
1034 + | * allowed to rain or storm. If clear weather ticks are > 0, the world will |
1035 + | * not naturally do either until the duration has elapsed. |
1036 + | * |
1037 + | * This method is equivalent to calling {@code /weather clear} with a set |
1038 + | * amount of ticks. |
1039 + | * |
1040 + | * @param duration duration in ticks |
1041 + | */ |
1042 + | public void setClearWeatherDuration(int duration); |
1043 + | |
1044 + | /** |
1045 + | * Get the clear weather duration. |
1046 + | * |
1047 + | * @return duration in ticks |
1048 + | */ |
1049 + | public int getClearWeatherDuration(); |
1050 + | |
1014 1051 | /** |
1015 1052 | * Creates explosion at given coordinates with given power |
1016 1053 | * |
1017 1054 | * @param x X coordinate |
1018 1055 | * @param y Y coordinate |
1019 1056 | * @param z Z coordinate |
1020 1057 | * @param power The power of explosion, where 4F is TNT |
1021 1058 | * @return false if explosion was canceled, otherwise true |
1022 1059 | */ |
1023 1060 | public boolean createExplosion(double x, double y, double z, float power); |