Skip to content

Add initial rail generator implementation#86

Merged
Jasupa merged 5 commits into
mainfrom
rail-generator
Jun 24, 2026
Merged

Add initial rail generator implementation#86
Jasupa merged 5 commits into
mainfrom
rail-generator

Conversation

@Jasupa

@Jasupa Jasupa commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an initial implementation of the rail generator and re-enables /gen rail.

Changes

  • Enables the rail generator command again.
  • Builds a rail path from WorldEdit selection points.
  • Places center and side blocks for generated rail tracks.
  • Adds rail generator help handling.
  • Adds support for direct block placement operations.
  • Extends generator history so rail generation can be undone/redone.

Milanote

https://app.milanote.com/1WgUAs1mA492a6?p=9H9SRXRJA3f

@Jasupa Jasupa requested review from MineFact, Zoriot and kyanvde April 30, 2026 19:53

@MineFact MineFact left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Your current RailScript does not use the already existing Generator Library at all. AI basically tried to reinvent everything from scratch adding boilerplate code for every action that its currently trying to achieve. For this simple rail track this might work ok but as soon as it will get more complex this will create lots of issues and duplicated code. Please implement the rail generator the same way the road or house generator is implemented. If you can't do this yourself tell AI to first explore the repository and understand how the other generators are working. I can't accept this PR in this current state.

@Jasupa Jasupa changed the title Rail generator v1 Add initial rail generator implementation May 27, 2026
Zoriot

This comment was marked as outdated.

@Zoriot Zoriot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

User feedback is still horrible. The Message you now get is nice to have.
Maybe it's useful to move some part's of the preparing stage into actual execution phase.
Currently it's very easy to crash the server, i think we should have additional safeguards for that (can be reproduced on dev server).
Also another issue you can currently start it multiple times and/or you get a faulty error message that you have no valid selection.
Seems to be relative resource heavy

Comment thread gradle/libs.versions.toml Outdated
Comment thread settings.gradle.kts Outdated
@Jasupa Jasupa force-pushed the rail-generator branch 2 times, most recently from cbf658e to 918d88e Compare June 14, 2026 11:44
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@BuildTheEarth BuildTheEarth deleted a comment from github-actions Bot Jun 18, 2026
@BuildTheEarth BuildTheEarth deleted a comment from github-actions Bot Jun 18, 2026
@Zoriot Zoriot added ⏰ medium priority This currently has medium priority. 🐘 large size This is a large issue. labels Jun 18, 2026

@Zoriot Zoriot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We are coming near the finish line. Most things are fine, some things should be cleaned up.
Please also update your branch

Comment thread src/main/resources/config.yml Outdated
Comment thread src/main/java/net/buildtheearth/buildteamtools/utils/io/ConfigPaths.java Outdated
Comment thread src/main/resources/config.yml Outdated
Comment thread src/main/resources/modules/generator/config.yml Outdated
@Jasupa Jasupa changed the title Add initial rail generator implementation [ARCHIVE] Add initial rail generator implementation Jun 22, 2026
@Jasupa Jasupa closed this Jun 22, 2026
@Jasupa Jasupa reopened this Jun 22, 2026
@Jasupa Jasupa changed the title [ARCHIVE] Add initial rail generator implementation Add initial rail generator implementation Jun 22, 2026

@Zoriot Zoriot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Formatting 🗡️

Comment thread src/main/resources/modules/generator/config.yml Outdated
@Jasupa Jasupa force-pushed the rail-generator branch 2 times, most recently from accf928 to 02957b8 Compare June 22, 2026 14:07
- collapse generator help output into one component message
- move generator documentation link formatting into GeneratorComponent
- reuse shared documentation messaging from the generator menu
- use ChatHelper success components for generator success feedback
- combine undo and redo feedback into single prefixed messages
- keep secondary undo and redo action lines unprefixed
- simplify rail selection validation by calling checkForPlayer directly
- format rail generator limit messages through ChatHelper placeholders
- combine generator command failure logs into single exception logs
- use ChatHelper for generator failure action bar text
- restore the main config version to 1.4
- set the generator module config version to 0.1
- use appendNewline for multi-line generator feedback
Zoriot
Zoriot previously approved these changes Jun 22, 2026

@Zoriot Zoriot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Have not verified the core logic again & after the latest changes no way to test it ingame. Generally looks good trough

MineFact
MineFact previously approved these changes Jun 22, 2026

@MineFact MineFact left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I didn't test it yet but looked through the code and it looks fine to me.

@Jasupa Jasupa dismissed stale reviews from MineFact and Zoriot via 17cbe60 June 22, 2026 18:09
@kyanvde kyanvde self-requested a review June 22, 2026 18:42

@kyanvde kyanvde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM as long as the logic still works

- derive generator subcommands, help output and tab completion from GeneratorType
- resolve generator command execution through GeneratorType components
- document rail generation default limits and hard caps
- clarify PositionKey block-coordinate conversion for Bukkit vectors
@Jasupa Jasupa merged commit e1b0b4d into main Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐘 large size This is a large issue. ⏰ medium priority This currently has medium priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants