Skip to content

Allows servers to prevent chickens from laying eggs by setting EggLayTime to -1#12247

Closed
brickmonster wants to merge 1 commit into
PaperMC:mainfrom
brickmonster:feat/egg-lay-time
Closed

Allows servers to prevent chickens from laying eggs by setting EggLayTime to -1#12247
brickmonster wants to merge 1 commit into
PaperMC:mainfrom
brickmonster:feat/egg-lay-time

Conversation

@brickmonster
Copy link
Copy Markdown
Contributor

@brickmonster brickmonster commented Mar 8, 2025

I was surprised that NoAI:1 still causes eggs to be laid, but is a more flexible solution for servers that want both as -1 is never normally reached.

-1 prevents ticking.
0 works as before for instant egg lay.

Try with /data merge entity @n[type=chicken] {EggLayTime:-1}

@brickmonster brickmonster requested a review from a team as a code owner March 8, 2025 18:53
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Mar 8, 2025
@Machine-Maker
Copy link
Copy Markdown
Member

I'm not sure I like changing the vanilla behavior of that value. Server's can just set it to max int, which is like 3.5 years of uptime or whatever, of if we really want a thing to prevent it, I'd rather it be a separate field that we add.

@Owen1212055
Copy link
Copy Markdown
Member

Agreed with above, just honestly set it to a big number.

@brickmonster
Copy link
Copy Markdown
Contributor Author

It could pause at max int instead, making the setter's intent match the behaviour. Otherwise that's fine by me, feel free to close.

@Owen1212055
Copy link
Copy Markdown
Member

Owen1212055 commented Mar 8, 2025

Yeah, gonna close this. Just in general with alot of MC related fields like this, setting it to a big number is just fine.

Ty for ur contribution, however.

@Owen1212055 Owen1212055 closed this Mar 8, 2025
@github-project-automation github-project-automation Bot moved this from Awaiting review to Closed in Paper PR Queue Mar 8, 2025
@brickmonster brickmonster deleted the feat/egg-lay-time branch March 8, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

3 participants