Skip to content

Feature/exprfuseticks#8499

Open
AnOwlBe wants to merge 10 commits intoSkriptLang:dev/featurefrom
AnOwlBe:feature/exprfuseticks
Open

Feature/exprfuseticks#8499
AnOwlBe wants to merge 10 commits intoSkriptLang:dev/featurefrom
AnOwlBe:feature/exprfuseticks

Conversation

@AnOwlBe
Copy link
Copy Markdown

@AnOwlBe AnOwlBe commented Mar 13, 2026

Problem

Currently Skript nore Skbee have any way to do this and its a decently useful thing

Solution

I have made a syntax for it allowing you to set/get the fuse ticks of a primed tnt/creeper/charged creeper
Also removed 'https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/expressions/ExprCreeperMaxFuseTicks.java'
(ExprCreeperMaxFuseTicks.java) as it doesn't work and isn't needed if this pr is merged

Testing Completed

Compiled jar with code it works flawlessly for a primed tnt/creeper/charged creeper no bugs that i've seen
for creepers the fuse tick duration will always be ticking down even if it isn't in an 'exploding' state but that just looks like mc behavior so

Supporting Information

Deleted ExprCreeperMaxFuseTicks.java


Completes: none
Related: none
AI assistance: Used a tad bit of Claude though 95% of it is done by me

@AnOwlBe AnOwlBe requested a review from a team as a code owner March 13, 2026 23:34
@AnOwlBe AnOwlBe requested review from Burbulinis and Efnilite and removed request for a team March 13, 2026 23:34
Copy link
Copy Markdown
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, just some cleanup
Thanks for the contribution!

Comment thread src/main/java/ch/njol/skript/expressions/ExprFuseTicks.java Outdated

@Name("Entity Fuse Ticks")
@Description("Get/Set how long until a Creeper/Primed TNT explodes. For Creepers the fuse time will be 0 seconds and if set it will be ticking down even if the entity is not currently in exploding animation.")
@Example("send \"Run! That guy is going to explode in %fuse ticks of player's target%\"")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a valid example according to the syntax pattern

Comment thread src/main/java/ch/njol/skript/expressions/ExprFuseTicks.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprFuseTicks.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprFuseTicks.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprFuseTicks.java Outdated
Comment thread src/main/java/ch/njol/skript/expressions/ExprFuseTicks.java Outdated
Comment on lines +74 to +76
creeper.setFuseTicks(creeper.getFuseTicks() + change);
} else if (entity instanceof TNTPrimed tntprimed) {
tntprimed.setFuseTicks(tntprimed.getFuseTicks() + change);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any concerns about setting to negative values or invalid values? if so, a clamp/min/max is needed.

Comment on lines +83 to +84
creeper.setMaxFuseTicks(change);
creeper.setFuseTicks(change);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we setting the max here? I thought the max couldn't be changed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may not be needed but I think it is

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well right now every time i try to set the max, it will error. Then when i set the normal fuse time, it will change both normal and max? Shouldn't which one it sets be dependent on which syntax I used?

Comment thread src/main/java/ch/njol/skript/expressions/ExprFuseTicks.java Outdated
@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Mar 13, 2026
@sovdeeth sovdeeth mentioned this pull request Apr 17, 2026
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Apr 17, 2026
AnOwlBe and others added 7 commits April 17, 2026 03:14
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature request, an issue about something that could be improved, or a PR improving something. needs reviews A PR that needs additional reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants