PaperMC / PaperMC/Paper

World Clock API

Open
#14,007 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: api status: accepted
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Is your feature request related to a problem?

It is currently impossible to update a specific world clock using it's key (ex: "minecraft:overworld")

Describe the solution you'd like.

An api to update world clocks, maybe
In Player:
void setPlayerTime(Key clock, long time, boolean tickTime)
long getPlayerTime(Key clock)
in World:
void setTime(Key clock, long time)
long getTime(Key clock)
void setFullTime(Key clock, long time)
long getFullTime(Key clock)

Describe alternatives you've considered.

1/ Sending ClientboundSetTimePacket using the protocolib plugin, however the clockUpdates field of this packet does not yet have an api for it.
2/ Sending ClientboundSetTimePacket using NMS. haven't tried yet, but i should work.

Other

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Player and World API entry points and the ClientboundSetTimePacket, especially its clockUpdates field, as described in the issue. Determine how keyed world clocks should behave for player and world time methods. Done means a coherent API for updating and reading a selected clock, with the relevant behavior covered by the project's tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.