-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Explosion: implemented underwater explosion #6456
base: minor-next
Are you sure you want to change the base?
Explosion: implemented underwater explosion #6456
Conversation
A better approach might be to allow the constructor to accept a list of BlockTypeTags (or type IDs) that it skips over, and then check those tags (or IDs) when looking at blocks to destroy. That would make it more flexible and enable custom use cases. |
…Explosion constructor
Is this the correct approach? I have several options for the variable that stores the list of
However, I think the name |
Should |
Well if people wanted to change the blocks affected by the explosion they can always cancel the EntityPreExplodeEvent and make their own explosion |
@@ -118,6 +130,9 @@ public function explodeA() : bool{ | |||
} | |||
|
|||
$state = $subChunk->getBlockStateId($vBlockX & SubChunk::COORD_MASK, $vBlockY & SubChunk::COORD_MASK, $vBlockZ & SubChunk::COORD_MASK); | |||
if(count($this->excludedBlockTypeIds) > 0 && isset($this->excludedBlockTypeIds[$blockFactory->fromStateId($state)->getTypeId()])){ | |||
continue; | |||
} |
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.
I don't think this is right. It might end up making explosions more powerful in water since the blast force isn't being decreased. I think the previous check by overriding the blast resistance was more correct.
This PR has been marked as "Waiting on Author", but we haven't seen any activity in 7 days. If there is no further activity, it will be closed in 28 days. Note for maintainers: Adding an assignee to the PR will prevent it from being marked as stale. |
Introduction
This PR implements underwater explosion for Underwater TNT
Minecraft.2024-09-21.10-12-07.mp4
Relevant issues
Changes
API changes
Behavioural changes
Backwards compatibility
Follow-up
Tests
I tested this PR by doing the following (tick all that apply):
tests/phpunit
folder)