Make MythicMobsHook.spawnMythicMob delay configurable#2929
Merged
tastybento merged 1 commit intodevelopfrom Apr 8, 2026
Merged
Make MythicMobsHook.spawnMythicMob delay configurable#2929tastybento merged 1 commit intodevelopfrom
tastybento merged 1 commit intodevelopfrom
Conversation
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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.