Skip to content

Remove remapping of Entity.hurt#1064

Closed
lonevox wants to merge 1 commit intoKubeJS-Mods:2101from
lonevox:remove-remapping-of-entity-hurt
Closed

Remove remapping of Entity.hurt#1064
lonevox wants to merge 1 commit intoKubeJS-Mods:2101from
lonevox:remove-remapping-of-entity-hurt

Conversation

@lonevox
Copy link
Copy Markdown
Contributor

@lonevox lonevox commented Oct 27, 2025

Entity already has a method called attack, which is used when the entity attacks something. hurt is used to damage the entity it is called on, so they have different usages, which makes it confusing that they have the same name in kjs.

`Entity` already has a method called `attack`, which is used when the entity attacks something. `hurt` is used to damage the entity it is called on, so they have different usages, which makes it confusing that they have the same name in kjs.
@KonSola5
Copy link
Copy Markdown

KonSola5 commented Jan 26, 2026

From what I see in a clean NeoForge 1.21.1 devenv, attack is only a method of Player.
LivingEntity nor Entity do not have the attack method, neither by themselves nor in any interface those classes implement.

But attack method on Player is not remapped - will it shadow the attack method on Entity?

@KonSola5
Copy link
Copy Markdown

I'd suggest remapping the method on Entity to damage instead.

@LatvianModder LatvianModder changed the base branch from main to 2101 January 29, 2026 10:27
@KonSola5 KonSola5 mentioned this pull request Jan 30, 2026
@MaxNeedsSnacks
Copy link
Copy Markdown
Member

I think I'll let this be superceded by #1094, thank you for the PR tho!

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.

3 participants