Skip to content

Fix null cause for resistance modifier during damage#4277

Closed
MC-Nirvana wants to merge 2 commits intoSpongePowered:api-12from
MC-Nirvana:api-12
Closed

Fix null cause for resistance modifier during damage#4277
MC-Nirvana wants to merge 2 commits intoSpongePowered:api-12from
MC-Nirvana:api-12

Conversation

@MC-Nirvana
Copy link

@MC-Nirvana MC-Nirvana commented Mar 2, 2026

Fix #4276

Signed-off-by: 涅槃 <mcnirvana@126.com>
Copy link
Member

@gabizou gabizou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the submodule update? Is it needed for the bug fix?

@MC-Nirvana
Copy link
Author

What is the submodule update? Is it needed for the bug fix?

Hmm... The submodule update has nothing to do with this bug; it just allows you to skip the tests that Gradle runs by default during the build.

@Yeregorix
Copy link
Member

Yeregorix commented Mar 2, 2026

Please provide a description of what you are trying to fix. In this case, linking the issue should be enough. I know this issue has been discussed on Discord but someone that doesn't not follow every message on our Discord will not know what you are talking about. Also we sometimes look at issues months later, anything on Discord would basically be lost.

@MC-Nirvana
Copy link
Author

Please provide a description of what you are trying to fix. In this case, linking the issue should be enough. I know this issue has been discussed on Discord but someone that doesn't not follow every message on our Discord will not know what you are talking about. Also we sometimes look at issues months later, anything on Discord would basically be lost.

#4276

}

private static DamageModifier buildDamageReductionModifier(final DefaultedRegistryReference<DamageModifierType> modifierType, Object... causes) {
// 过滤掉 null 值并确保至少有一个元素
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use English everywhere, including in the comments. These comments aren't needed anyway as they just paraphrase the code, you can delete them.

build.gradle.kts Outdated

gradle.beforeProject {
tasks.withType<Test>().configureEach {
enabled = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't disable the tests. They ensure that the changes do not introduce a regression.

@MC-Nirvana
Copy link
Author

I want to know what exactly you mean—are you not planning to fix this bug, or will you resolve it on your own in the near future?

Signed-off-by: 涅槃 <mcnirvana@126.com>
@MC-Nirvana
Copy link
Author

The code has been updated. Please check it.

@MC-Nirvana MC-Nirvana requested a review from gabizou March 2, 2026 20:31
@MC-Nirvana
Copy link
Author

MC-Nirvana commented Mar 2, 2026

I'll resubmit a PR. I seem to have messed up my local and remote repositories.

@MC-Nirvana MC-Nirvana closed this Mar 2, 2026
@Yeregorix Yeregorix changed the title Fix: Fix PhaseState Tick{Entity} exception in Sponge Fix null cause for resistance modifier during damage Mar 9, 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.

Null cause for resistance modifier during damage event when Apothic Attributes is installed

3 participants