-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Feature: Secret Chime #2453
Feature: Secret Chime #2453
Conversation
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.
Just a few suggestions
Also you did not follow the pull request template which means your pr will not be added to the changelogs. It will not be merged until this is fixed
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.
This should link to the list of sounds like other features in the mod that allow you to select a sound do
else -> false | ||
} | ||
|
||
if (event.position.getBlockAt() == Blocks.skull) { |
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.
why doesnt this use the position variable you created above
} | ||
|
||
if (event.position.getBlockAt() == Blocks.skull) { | ||
val text = BlockUtils.getTextureFromSkull(position.toBlockPos()) |
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.
probably rename the variable to texture so that its more descriptive
val blockType = when (position.getBlockAt()) { | ||
Blocks.chest, Blocks.trapped_chest, Blocks.lever, Blocks.skull -> true | ||
else -> false | ||
} |
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.
instead of setting a boolean variable here, just return where you are currently setting it to false. If you want to make this code better you would also do the wither essence texture check in this when statement if the block is of skull type
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.
Code looks overall fine. I have not yet tested it in game.
One big problem though: this is code duplication to DungeonHighlightClickedBlocks.
You can avoid this by moving the enum ClickedBlockType into a own class, and create a "dungeon clicked block event" with contains one of those enums as well. move that check into dungeon api. then you can listen to that new event inside the clicked blocks and secret chime feature at the same time.
What
This Pull Request introduces a Secret Chime feature for dungeons.
I'm still new to contributing. So I'm still learning. How things work.
Changelog New Features