Conversation
feature: added a first version for the convex rail generator
- Added a railway generator entry to the generator menu - Made railway documentation links clickable in chat - Added RailSelectionPointReader for cuboid, polygonal, and convex selections - Validated supported rail selections before generation - Added RailPath and RailPathBuilder for center path generation - Moved center path generation out of RailScripts - Kept RailScripts focused on generation flow and placement
- Improved path handling for curves, diagonals, gaps, and direction changes - Added side block builder for railway side/anvil placement - Added orientation resolver for side block facing - Added RailBlockPlacement and RailBlockRole placement model - Added RailType interface and SampleRailType implementation - Moved block data creation into the rail type system - Added WorldEdit/Bukkit placement handler for rail generation - Refactored RailScripts into an orchestration flow
Qodana for JVM6 new problems were found
💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at [email protected]
|
Comment on lines
+309
to
+311
| return a.getBlockX() == b.getBlockX() | ||
| && a.getBlockY() == b.getBlockY() | ||
| && a.getBlockZ() == b.getBlockZ(); |
Contributor
There was a problem hiding this comment.
Have you tried Vector#equals()? This would clear up the code a bit. But i am not sure if it will work due to it comparing the floats and not the blocks.
Comment on lines
+302
to
+304
| Math.round(vector.getX()), | ||
| Math.round(vector.getY()), | ||
| Math.round(vector.getZ()) |
Contributor
There was a problem hiding this comment.
Why not Vector#getBlockX() etc. like below?
| @Override | ||
| public boolean checkForPlayer(Player p) { | ||
| return !GeneratorUtils.checkForNoWorldEditSelection(p); | ||
| public boolean checkForPlayer(Player player) { |
Contributor
There was a problem hiding this comment.
Method name doesnt really correspond to what is checked inside
- Normalised vectors before comparing block positions - Used Vector#getBlockX/Y/Z instead of manual rounding - Moved rail validation logic into hasValidRailSelection - Kept checkForPlayer aligned with the generator component contract - Improved readability of rail path and selection validation code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.