Skip to content

Commit

Permalink
add tag chunk.force_loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 5, 2020
1 parent 5888a0c commit 3b39f18
Showing 1 changed file with 13 additions and 1 deletion.
Expand Up @@ -299,6 +299,18 @@ public static void registerTags() {
return new ElementTag(object.isLoadedSafe());
});

// <--[tag]
// @attribute <ChunkTag.force_loaded>
// @returns ElementTag(Boolean)
// @description
// Returns whether the chunk is forced to stay loaded at all times.
// This is related to the <@link command chunkload> command.
// -->
registerTag("force_loaded", (attribute, object) -> {
Chunk chunk = object.getChunkForTag(attribute);
return new ElementTag(chunk != null && chunk.isForceLoaded());
});

// <--[tag]
// @attribute <ChunkTag.x>
// @returns ElementTag(Number)
Expand Down Expand Up @@ -551,7 +563,7 @@ public static void registerTags() {

// <--[tag]
// @attribute <ChunkTag.inhabited_time>
// @returns Duration
// @returns DurationTag
// @Mechanism ChunkTag.inhabited_time
// @description
// Returns the total time the chunk has been inhabited for.
Expand Down

0 comments on commit 3b39f18

Please sign in to comment.