Skip to content

Commit 42b15a8

Browse files
committed
1.21.11 part 6: minor meta updates
1 parent 22e543d commit 42b15a8

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

plugin/src/main/java/com/denizenscript/denizen/objects/WorldTag.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,6 @@ else if (time >= 12500) {
853853
// @returns ElementTag
854854
// @description
855855
// Returns the current value of the specified gamerule in the world.
856-
// Note that the name is case-sensitive... so "doFireTick" is correct, but "dofiretick" is not.
857856
// -->
858857
registerTag(ElementTag.class, "gamerule", (attribute, object) -> {
859858
if (!attribute.hasParam()) {
@@ -992,7 +991,7 @@ else if (time >= 12500) {
992991
// @description
993992
// Returns whether enough players are sleeping to prepare for the night to advance.
994993
// Typically used before checking <@link tag WorldTag.enough_deep_sleeping>
995-
// By default, automatically checks the playersSleepingPercentage gamerule,
994+
// By default, automatically checks the players_sleeping_percentage gamerule,
996995
// but this can optionally be overridden by specifying a percentage integer.
997996
// Any integer above 100 will always yield 'false'. Requires at least one player to be sleeping to return 'true'.
998997
// -->
@@ -1013,7 +1012,7 @@ else if (time >= 12500) {
10131012
// @description
10141013
// Returns whether enough players have been in bed long enough for the night to advance (generally 100 ticks).
10151014
// Loops through all online players, so is typically used after checking <@link tag WorldTag.enough_sleeping>
1016-
// By default, automatically checks the playersSleepingPercentage gamerule,
1015+
// By default, automatically checks the players_sleeping_percentage gamerule,
10171016
// but this can optionally be overridden by specifying a percentage integer.
10181017
// Any integer above 100 will always yield 'false'. Requires at least one player to be sleeping to return 'true'.
10191018
// -->
@@ -1514,7 +1513,7 @@ else if (time >= 12500) {
15141513
// @input None
15151514
// @description
15161515
// Skips to the next day as if enough players slept through the night.
1517-
// NOTE: This ignores the doDaylightCycle gamerule!
1516+
// NOTE: This ignores the advance_time gamerule!
15181517
// -->
15191518
tagProcessor.registerMechanism("skip_night", false, (object, mechanism) -> {
15201519
// general logic from NMS world tick

plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/GameRuleCommand.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,19 @@ public GameRuleCommand() {
3232
//
3333
// @Description
3434
// Sets a gamerule on the world. A list of valid gamerules can be found here: <@link url https://minecraft.wiki/w/Game_rule>
35-
// Note: Be careful, gamerules are CASE SENSITIVE.
3635
//
3736
// @Tags
3837
// <WorldTag.gamerule[<gamerule>]>
3938
//
4039
// @Usage
4140
// Use to disable fire spreading in world "Adventure".
42-
// - gamerule Adventure doFireTick false
41+
// - gamerule Adventure fire_spread_radius_around_player 0
4342
//
4443
// @Usage
4544
// Use to avoid mobs from destroying blocks (creepers, endermen...) and picking items up (zombies, skeletons...) in world "Adventure".
46-
// - gamerule Adventure mobGriefing false
45+
// - gamerule Adventure mob_griefing false
4746
// -->
4847

49-
50-
5148
@Override
5249
public void addCustomTabCompletions(TabCompletionsBuilder tab) {
5350
for (GameRule<?> gameRule : GameRuleReflect.values()) {

plugin/src/main/java/com/denizenscript/denizen/utilities/world/GameRuleReflect.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public static Class<?> getType(GameRule<?> gameRule) {
5353
}
5454
}
5555

56+
// TODO 1.21.11: certain gamemodes (e.g. max_minecart_speed) behave badly on Spigot, need to test with Paper
5657
public static <T> T getValue(World world, GameRule<T> gameRule) {
5758
try {
5859
return world.getGameRuleValue(gameRule);

0 commit comments

Comments
 (0)