Add foundations for hostile mobs - #611
Open
starwarslevi wants to merge 6 commits into
Open
starwarslevi wants to merge 6 commits into
starwarslevi wants to merge 6 commits into
Conversation
Contributor
|
this one doesnt check peaceful mode? |
Contributor
|
uhhm and do conversion failure path preserve passager, vehicle and leashable of the old mob? |
|
This pull request has conflicts with the base branch "master". Please resolve those so we can test out your changes. |
coco875
requested changes
Sep 11, 2026
coco875
left a comment
Contributor
There was a problem hiding this comment.
overall I think that there is a lot of useless or comment that are uselessly long
Comment on lines
+231
to
+235
| /// Vanilla parity: `BlockState.isValidSpawn(BlockGetter, BlockPos, EntityType)`, whose | ||
| /// default requires a full UP support face and light emission below | ||
| /// [`MAX_MOB_SPAWN_LIGHT_EMISSION`]. Blocks override it for special spawn surfaces | ||
| /// (soul sand accepts everything, magma only fire-immune mobs, ...). Consulted by | ||
| /// `Mob.checkMobSpawnRules`. |
Comment on lines
+50
to
+52
| /// Maximum light emission a block may emit while still allowing mobs to spawn | ||
| /// on it, mirroring vanilla `BlockBehaviour`'s default `isValidSpawn` predicate | ||
| /// (`state.getLightEmission() < 14`). |
Comment on lines
+28
to
+34
| /// Vanilla `Attributes.STEP_HEIGHT` default, used when the attribute is absent. | ||
| const DEFAULT_STEP_HEIGHT: f32 = 0.6; | ||
| /// Vanilla `Endermite.MAX_LIFE`: ticks until the mob discards itself when not | ||
| /// persistence-required. | ||
| const MAX_LIFETIME: i32 = 2400; | ||
| /// Vanilla `Endermite` constructor: `this.xpReward = 3`. | ||
| const XP_REWARD: i32 = 3; |
Contributor
There was a problem hiding this comment.
does comment it are necessary ?
Comment on lines
+87
to
+101
| /// Vanilla `Mob.convertTo`: creates a fresh `entity_type` mob, transfers the | ||
| /// shared conversion state, runs `after_conversion`, adds the new mob to the | ||
| /// world, and discards `from` for single-mob conversions. | ||
| /// | ||
| /// Steel registers the new entity *before* transferring state. Vanilla runs | ||
| /// `ConversionType.convert` and `AfterConversion` first and then discards the | ||
| /// source unconditionally after `addFreshEntity`, with no failure path; Steel | ||
| /// instead keeps `from` alive when the world rejects the new entity, which only | ||
| /// holds if nothing on `from` (its passengers, vehicle, and leash) has been | ||
| /// moved onto `to` yet (documented divergence). | ||
| /// | ||
| /// Returns `None` when `from` is removed, the world is gone, `entity_type` is | ||
| /// not allowed on the current difficulty (vanilla `EntityType.canSpawn`), has no | ||
| /// registered factory, the created entity is not a mob, or the world rejects the | ||
| /// new entity; `from` is left untouched in all of those cases. |
14 tasks
Contributor
Author
|
if anyone wants to resolve the conflicts and comments for me they can--i've been extremely demotivated recently and just feeling pretty overwhelmed with this project, so i don't really feel like i can deal with them right now |
This branch has not been deployed
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.
Type of change
Description
shared foundation for hostile mobs: goals/targeting, pathfinding, attributes, combat, equipment, spawning, persistence, daylight burning, leash gating, entity conversion
left out on purpose: brain (PR #249), ranged combat (PR #423)
How this was tested
cargo test -p steel-core (2598 passing), clippy clean, fmt + workspace green
Screenshots / logs
Checklist
Classes / commands modified:
Additional notes
ur da goat