-
-
Notifications
You must be signed in to change notification settings - Fork 95
[Entity] Add new entities to the EntityExtension #368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds multiple new Minecraft-like entity definition and instance entries (Camel, Donkey, Pig, Goat, Panda, Polar Bear, Sniffer), panda-specific entity data (genes and poses), and documentation/chatmode instructions for adding entities. Wrapper runtime classes apply ageable, generic, living, and entity-specific properties. Changes
Sequence Diagram(s)sequenceDiagram
participant Player
participant EntityDefinition
participant WrapperFakeEntity
participant EntityDataAppliers
Player->>EntityDefinition: create(player)
EntityDefinition->>WrapperFakeEntity: instantiate wrapper for player
WrapperFakeEntity->>WrapperFakeEntity: spawn / hold viewers / metadata
WrapperFakeEntity->>EntityDataAppliers: applyProperty(property)
EntityDataAppliers->>WrapperFakeEntity: apply ageable / generic / living / entity-specific metadata
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/CamelEntity.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/DonkeyEntity.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PigEntity.kt
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: build
🔇 Additional comments (6)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/DonkeyEntity.kt (2)
31-40
: LGTM! Well-structured entity definition.The
DonkeyDefinition
class follows the established pattern with proper annotations, type restrictions, and default values.
42-51
: LGTM! Consistent entity instance implementation.The
DonkeyInstance
class properly implementsSimpleEntityInstance
with appropriate property defaults and tag restrictions.extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/CamelEntity.kt (2)
31-51
: LGTM! Consistent entity definition and instance implementation.Both
CamelDefinition
andCamelInstance
classes follow the established patterns with proper annotations, type restrictions, and default values.
56-63
: LGTM! Proper entity property handling implementation.The
applyProperty
method correctly handlesAgeableProperty
explicitly before applying generic and living entity data. This is the proper pattern for ageable entities.extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PigEntity.kt (2)
31-51
: LGTM! Consistent entity definition and instance implementation.Both
PigDefinition
andPigInstance
classes follow the established patterns with proper annotations, type restrictions, and default values.
56-63
: LGTM! Consistent entity property handling implementation.The
applyProperty
method correctly handlesAgeableProperty
explicitly before applying generic and living entity data, maintaining consistency with theCamelEntity
implementation.
...tyExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/DonkeyEntity.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds three new animal entities (camel, donkey, and pig) to the EntityExtension, expanding the available Minecraft entities that can be created and managed within the game environment.
- Introduces three new entity types with corresponding definition and instance classes
- Each entity follows the same pattern with ageable properties and standard entity data support
- Provides consistent API for creating and managing camel, donkey, and pig entities
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
CamelEntity.kt | Adds camel entity with ageable properties and camel-specific data tags |
DonkeyEntity.kt | Adds donkey entity with basic living entity properties and donkey-specific data tags |
PigEntity.kt | Adds pig entity with ageable properties and pig-specific data tags |
...tyExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/DonkeyEntity.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (15)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaGeneData.kt (2)
29-34
: Provide a default to SinglePropertyCollectorSupplier for consistencyMany data entries supply a default property via the supplier. Consider adding one for predictable aggregation.
Apply this diff:
data class PandaGeneProperty( val mainGene: PandaMeta.Gene, val hiddenGene: PandaMeta.Gene, ) : EntityProperty { - companion object : SinglePropertyCollectorSupplier<PandaGeneProperty>(PandaGeneProperty::class) + companion object : SinglePropertyCollectorSupplier<PandaGeneProperty>( + PandaGeneProperty::class, + PandaGeneProperty(PandaMeta.Gene.NORMAL, PandaMeta.Gene.NORMAL) + ) }
13-13
: Avoid star import from java.utilPrefer explicitly importing Optional for clarity and to prevent namespace pollution.
-import java.util.* +import java.util.Optional.github/chatmodes/NewEntity.chatmode.md (3)
44-46
: Fix bare URL formatting (MD034)Wrap the URL to satisfy markdownlint.
- - Search https://github.com/Tofaa2/EntityLib/tree/master/api/src/main/java/me/tofaa/entitylib/meta + - Search <https://github.com/Tofaa2/EntityLib/tree/master/api/src/main/java/me/tofaa/entitylib/meta>
73-77
: Include mob_data in OnlyTags guidanceEntity files in this PR (e.g., Sniffer/Panda) include
mob_data
. Reflect that here.- - Ensure `@OnlyTags` includes: `generic_entity_data`, optionally `living_entity_data`, plus `<entity>_data`. + - Ensure `@OnlyTags` includes: `generic_entity_data`, `mob_data` (for mobs), optionally `living_entity_data`, plus `<entity>_data`.
96-101
: Clarify “no new data files” constraint scopeMake it explicit this constraint is specific to this guided mode (not a repo-wide rule), to avoid confusion since the PR adds Panda-specific data.
- - Prefer reusing existing data entries before adding new ones. + - Prefer reusing existing data entries before adding new ones. + - Note: “No new data files” is a constraint of this guided mode to reduce churn. Maintainers may still add new data entries outside this mode when necessary.extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/SnifferEntity.kt (1)
59-66
: Short-circuit after handling AgeablePropertyMinor perf/readability: return immediately after applying a matched property to avoid extra checks.
override fun applyProperty(property: EntityProperty) { - when (property) { - is AgeableProperty -> applyAgeableData(entity, property) - else -> {} - } - if (applyGenericEntityData(entity, property)) return - if (applyLivingEntityData(entity, property)) return + when (property) { + is AgeableProperty -> { applyAgeableData(entity, property); return } + } + if (applyGenericEntityData(entity, property)) return + if (applyLivingEntityData(entity, property)) return }.github/instructions/entity-extension.add-entity.instructions.md (3)
14-15
: Wrap bare URL to satisfy MD034Use angle brackets or link syntax.
-Upstream library: https://github.com/Tofaa2/EntityLib/tree/master/api/src/main/java/me/tofaa/entitylib/meta +Upstream library: <https://github.com/Tofaa2/EntityLib/tree/master/api/src/main/java/me/tofaa/entitylib/meta>
50-51
: Include mob_data in OnlyTags exampleEntities in this PR use
mob_data
. Reflect this in the instruction.-- Constrain `data` with `@OnlyTags("generic_entity_data", "living_entity_data", "<entity>_data")` where applicable. +- Constrain `data` with `@OnlyTags("generic_entity_data", "mob_data", "living_entity_data", "<entity>_data")` where applicable.
21-22
: Optional wording tweak“Brief description” reads cleaner than “short description.”
-- A short description, an icon id, and a color from `Colors`. +- A brief description, an icon id, and a color from `Colors`.extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PandaEntity.kt (2)
48-56
: Short-circuit after applying specific propertiesAfter handling
PandaGeneProperty
orAgeableProperty
, return to avoid unnecessary route checks.private class PandaEntity(player: Player) : WrapperFakeEntity(EntityTypes.PANDA, player) { override fun applyProperty(property: EntityProperty) { when (property) { - is PandaGeneProperty -> applyPandaGeneData(entity, property) - is AgeableProperty -> applyAgeableData(entity, property) + is PandaGeneProperty -> { applyPandaGeneData(entity, property); return } + is AgeableProperty -> { applyAgeableData(entity, property); return } } if (applyGenericEntityData(entity, property)) return if (applyLivingEntityData(entity, property)) return } }
48-56
: Optional: Document skipped panda fields for parityAdd a short “Skipped data” block (like Sniffer) if any PandaMeta fields aren’t exposed due to missing data entries.
Example to append at end of file:
// Skipped data (no existing data entry available): // - Panda: isSneezing / isSitting / isOnBack (if applicable in PandaMeta)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/GoatEntity.kt (2)
28-36
: Doc says generic/living/ageable, but OnlyTags also includes mob_dataThe KDoc states support for generic, living, and ageable data, but Line 35 also allows "mob_data". Either update the KDoc to reflect mob support (if implemented), or drop "mob_data" from OnlyTags as in the previous comment.
59-66
: Micro-optimization: return early after handling AgeablePropertyAfter applying
AgeableProperty
, you can return immediately to avoid the subsequent checks.override fun applyProperty(property: EntityProperty) { - when (property) { - is AgeableProperty -> applyAgeableData(entity, property) - else -> {} - } + when (property) { + is AgeableProperty -> { + applyAgeableData(entity, property) + return + } + } if (applyGenericEntityData(entity, property)) return if (applyLivingEntityData(entity, property)) return }extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PolarBearEntity.kt (2)
28-36
: KDoc vs OnlyTags: document mob support or remove the tagKDoc lists generic/living/ageable only, but OnlyTags includes "mob_data". Align either the documentation or the allowed tags.
59-66
: Return early after AgeableProperty for efficiency and claritySame micro-optimization as Goat entity.
override fun applyProperty(property: EntityProperty) { - when (property) { - is AgeableProperty -> applyAgeableData(entity, property) - else -> {} - } + when (property) { + is AgeableProperty -> { + applyAgeableData(entity, property) + return + } + } if (applyGenericEntityData(entity, property)) return if (applyLivingEntityData(entity, property)) return }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
.github/chatmodes/NewEntity.chatmode.md
(1 hunks).github/instructions/entity-extension.add-entity.instructions.md
(1 hunks).github/instructions/entity-extension.instructions.md
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaGeneData.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/CamelEntity.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/DonkeyEntity.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/GoatEntity.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PandaEntity.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PigEntity.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PolarBearEntity.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/SnifferEntity.kt
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- .github/instructions/entity-extension.instructions.md
🚧 Files skipped from review as they are similar to previous changes (3)
- extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/DonkeyEntity.kt
- extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/CamelEntity.kt
- extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PigEntity.kt
🧰 Additional context used
🧬 Code Graph Analysis (5)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/GoatEntity.kt (4)
engine/engine-core/src/main/kotlin/com/typewritermc/core/entries/EntryReference.kt (1)
emptyRef
(6-6)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/AgeableData.kt (1)
applyAgeableData
(38-46)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/GenericData.kt (1)
applyGenericEntityData
(9-20)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/LivingData.kt (1)
applyLivingEntityData
(7-20)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/SnifferEntity.kt (4)
engine/engine-core/src/main/kotlin/com/typewritermc/core/entries/EntryReference.kt (1)
emptyRef
(6-6)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/AgeableData.kt (1)
applyAgeableData
(38-46)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/GenericData.kt (1)
applyGenericEntityData
(9-20)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/LivingData.kt (1)
applyLivingEntityData
(7-20)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaGeneData.kt (1)
engine/engine-paper/src/main/kotlin/com/typewritermc/engine/paper/command/dsl/TypewriterDsl.kt (1)
error
(21-23)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PandaEntity.kt (5)
engine/engine-core/src/main/kotlin/com/typewritermc/core/entries/EntryReference.kt (1)
emptyRef
(6-6)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaGeneData.kt (1)
applyPandaGeneData
(36-44)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/AgeableData.kt (1)
applyAgeableData
(38-46)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/GenericData.kt (1)
applyGenericEntityData
(9-20)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/LivingData.kt (1)
applyLivingEntityData
(7-20)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PolarBearEntity.kt (4)
engine/engine-core/src/main/kotlin/com/typewritermc/core/entries/EntryReference.kt (1)
emptyRef
(6-6)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/AgeableData.kt (1)
applyAgeableData
(38-46)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/GenericData.kt (1)
applyGenericEntityData
(9-20)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/LivingData.kt (1)
applyLivingEntityData
(7-20)
🪛 markdownlint-cli2 (0.17.2)
.github/chatmodes/NewEntity.chatmode.md
44-44: Bare URL used
(MD034, no-bare-urls)
🪛 LanguageTool
.github/instructions/entity-extension.add-entity.instructions.md
[style] ~21-~21: Consider using the synonym “brief” (= concise, using a few words, not lasting long) to strengthen your wording.
Context: ...instance, tag
armor_stand_data`). - A short description, an icon id, and a color fr...
(QUICK_BRIEF)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: build
🔇 Additional comments (7)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaGeneData.kt (2)
16-27
: Solid data entry and property build patternEntry/Tags, defaults, and build/type functions are consistent with existing patterns. The metas-DSL usage matches AgeableData’s approach.
36-44
: Confirm metas-DSL error behavior matches intentPlacing
error("Could not apply...")
at the end of the metas block relies on the DSL suppressing it when a priormeta<...>
matched. This mirrors AgeableData; just flagging to ensure the DSL’s contract is consistent here.extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/SnifferEntity.kt (3)
23-39
: Definition entry looks correctIDs, colors, tags, OnlyTags, and create() returning the wrapper align with peers.
41-53
: Instance entry matches project conventionsFields, defaults, and OnlyTags are consistent with similar entities.
69-71
: Good call documenting skipped Sniffer fieldsThis aligns with the docs/chatmode guidance for reuse-only mode.
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PandaEntity.kt (2)
24-35
: Definition entry is consistent and completeTags, OnlyTags (including mob/ageable/panda_data), and create() are aligned with established patterns.
37-46
: Instance entry matches established structureFields, defaults, and OnlyTags are appropriate.
...tityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/GoatEntity.kt
Show resolved
Hide resolved
...xtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PolarBearEntity.kt
Show resolved
Hide resolved
@Marten-Mrfc Is this finished? Wanting to add this to my server as soon as possible |
Yeah I think it will be in the next beta (: |
will this beta be soon? Also does this support having pandas sitting whilst eating bambboo constantly? |
Not yet sadly if you could make add that data and add it to the pr Otherwise i'll need to add it myself. There is no ETA on the next beta |
so get a dev to make an addon for me or wym? Im not a dev |
Oow if you're not an dev than i'll need to add it. I'll add it when I have time (: |
Thanks! I can offer money btw to get it added sooner |
I need this so I can finish my server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaPoseData.kt (3)
31-32
: Surface default tick values in the editor via @default annotations.You're already providing sensible tick defaults in the ctor; mirroring them with @default helps UX in form-based editors.
- /** Timers (in ticks) used when a pose requires an active timer */ - val sneezeTicks: Int = 20, - val eatTicks: Int = 40, + /** Timers (in ticks; 20 ticks = ~1s) used when a pose requires an active timer */ + @Default("20") + val sneezeTicks: Int = 20, + @Default("40") + val eatTicks: Int = 40,
55-56
: Align collector default with documented defaults to reduce surprises.Functionally harmless today (STANDING ignores timers), but aligning these defaults with the entry’s 20/40 avoids confusion if the fallback ever renders in UI or logging.
- companion object : SinglePropertyCollectorSupplier<PandaPoseProperty>(PandaPoseProperty::class, PandaPoseProperty(PandaPose.STANDING, 0, 0)) + companion object : SinglePropertyCollectorSupplier<PandaPoseProperty>( + PandaPoseProperty::class, + PandaPoseProperty(PandaPose.STANDING, 20, 40) + )
68-79
: Increase minimum animation timer ticks for better visibility1 tick is technically valid but too short to be noticeable in-game. To ensure players see the sneeze/eat animations, bumping the minimum to around 5 ticks is recommended—this aligns with the typical “visible” threshold.
• File extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaPoseData.kt
– Lines 73, 74, 77 (currentcoerceAtLeast(1)
usage)Suggested diff:
- PandaPose.SNEEZING -> setSneezeTimer(property.sneezeTicks.coerceAtLeast(1)) - PandaPose.EATING -> setEatTimer(property.eatTicks.coerceAtLeast(1)) - PandaPose.SITTING_EATING -> { - setSitting(true) - setEatTimer(property.eatTicks.coerceAtLeast(1)) + PandaPose.SNEEZING -> setSneezeTimer(property.sneezeTicks.coerceAtLeast(5)) + PandaPose.EATING -> setEatTimer(property.eatTicks.coerceAtLeast(5)) + PandaPose.SITTING_EATING -> { + setSitting(true) + setEatTimer(property.eatTicks.coerceAtLeast(5))Optionally, you could extract
5
into a named constant (e.g.MIN_VISIBLE_TICKS
) if you foresee reusing it for other entity timers.extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PandaEntity.kt (1)
49-57
: Early-return after panda-specific handlers to avoid redundant checks.Not a bug, just avoids unnecessary generic/living checks on already-handled properties and mirrors the common wrapper pattern.
override fun applyProperty(property: EntityProperty) { - when (property) { - is PandaGeneProperty -> applyPandaGeneData(entity, property) - is PandaPoseProperty -> applyPandaPoseData(entity, property) - is AgeableProperty -> applyAgeableData(entity, property) - } + when (property) { + is PandaGeneProperty -> { applyPandaGeneData(entity, property); return } + is PandaPoseProperty -> { applyPandaPoseData(entity, property); return } + is AgeableProperty -> { applyAgeableData(entity, property); return } + } if (applyGenericEntityData(entity, property)) return if (applyLivingEntityData(entity, property)) return }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaPoseData.kt
(1 hunks)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PandaEntity.kt
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PandaEntity.kt (6)
engine/engine-core/src/main/kotlin/com/typewritermc/core/entries/EntryReference.kt (1)
emptyRef
(6-6)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaGeneData.kt (1)
applyPandaGeneData
(36-44)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaPoseData.kt (1)
applyPandaPoseData
(58-83)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/AgeableData.kt (1)
applyAgeableData
(38-46)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/GenericData.kt (1)
applyGenericEntityData
(9-20)extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/LivingData.kt (1)
applyLivingEntityData
(7-20)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: build
🔇 Additional comments (4)
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/data/minecraft/living/panda/PandaPoseData.kt (2)
22-38
: Well-shaped data entry with a clean reset/apply flow.The entry, property, and enum model the pose state cleanly, and the reset-first approach avoids state leakage between applications. The tags align with PandaDefinition/Instance OnlyTags. Nice.
60-67
: Minor note: full reset is correct here given SinglePropertyCollector semantics.Given SinglePropertyCollectorSupplier enforces a single PandaPoseProperty, the pre-reset won’t fight other pose entries. Keep as-is.
extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/minecraft/PandaEntity.kt (2)
48-57
: Good integration: dedicated panda-specific handlers plus generic/living fallbacks.Property routing covers genes, pose, and ageable, then delegates to generic/living handlers. Consistent with other data applicators shown in the module.
55-56
: Verify WrapperFakeEntity’s inheritance for living data applicationI checked the inheritance in extensions/EntityExtension/src/main/kotlin/com/typewritermc/entity/entries/entity/WrapperFakeEntity.kt and found:
- WrapperFakeEntity (line 20) extends
FakeEntity(player)
and does not subclassme.tofaa.entitylib.wrapper.WrapperLivingEntity
.applyLivingEntityData
only applies to instances ofWrapperLivingEntity
, so it will always skip when called on a WrapperFakeEntity.Please confirm whether this is intentional. If you need living-entity properties applied to fake entities, consider having WrapperFakeEntity inherit from
WrapperLivingEntity
or otherwise adjust the data-application logic.
For now please keep this PR open so I can later add more (:
If someone has more entity ideas please say so.
Summary by CodeRabbit
New Features
Documentation