Skip to content

Make MythicMobsHook.spawnMythicMob delay configurable#2929

Merged
tastybento merged 1 commit intodevelopfrom
feature/mythicmob-configurable-delay
Apr 8, 2026
Merged

Make MythicMobsHook.spawnMythicMob delay configurable#2929
tastybento merged 1 commit intodevelopfrom
feature/mythicmob-configurable-delay

Conversation

@tastybento
Copy link
Copy Markdown
Member

The existing spawnMythicMob overloads hard-coded a 40-tick (2-second) delay before the actual spawn — added for blueprint-paste callers so NMS-pasted blocks settle before mobs land on them. Synchronous callers (e.g. AOneBlock's MythicMobCustomBlock) that replace a single block via the Bukkit API have nothing to wait for, so that delay is pure dead time in their path.

Add a 4-arg spawnMythicMob(record, location, Consumer, long) overload that takes an explicit delayTicks parameter. delayTicks <= 0 runs the spawn inline on the current tick; positive values still go through runTaskLater. The existing 3-arg overload now delegates with 40L so blueprint-paste behaviour is unchanged, and the 2-arg overload keeps its existing chain.

This lets AOneBlock bosses appear on the same tick as the magic-block break without affecting any other caller.

The existing spawnMythicMob overloads hard-coded a 40-tick
(2-second) delay before the actual spawn — added for blueprint-paste
callers so NMS-pasted blocks settle before mobs land on them.
Synchronous callers (e.g. AOneBlock's MythicMobCustomBlock) that
replace a single block via the Bukkit API have nothing to wait for,
so that delay is pure dead time in their path.

Add a 4-arg spawnMythicMob(record, location, Consumer, long) overload
that takes an explicit delayTicks parameter. delayTicks <= 0 runs the
spawn inline on the current tick; positive values still go through
runTaskLater. The existing 3-arg overload now delegates with 40L so
blueprint-paste behaviour is unchanged, and the 2-arg overload keeps
its existing chain.

This lets AOneBlock bosses appear on the same tick as the magic-block
break without affecting any other caller.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tastybento tastybento merged commit 5e19194 into develop Apr 8, 2026
1 check passed
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant