Skip to content

Fix #25 - #27

Closed
MulverineX wants to merge 1 commit into
misode:mainfrom
sandstone-mc:fix/25
Closed

MulverineX wants to merge 1 commit into
misode:mainfrom
sandstone-mc:fix/25

Conversation

@MulverineX

@MulverineX MulverineX commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Using PreparableReloadListener is definitely the right way to do this.

I intend on attempting this soon, but here's what I've got so far just using fabric API lifecycle events.

LOADED and getLoaded() is for a future PR that will add test descriptions to test failure/pass logging. I can take it out of this PR if preferred.

Comment on lines -25 to +21
public class PackTestLibrary implements PreparableReloadListener {
public class PackTestLibrary {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

[PreparableReloadListener] I intend on attempting this soon

Do you realize that it was already using this, and your PR would switch away from using that?

.withLevel(helper.getLevel())
.withPosition(helper.absoluteVec(Vec3.ZERO))
.withSuppressedOutput();
.withSource(SILENT_SOURCE);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What issue is this intended to solve? Why did withSuppressedOutput not work?

public class PackTestLibrary {
private static final FileToIdConverter LISTER = new FileToIdConverter("test", ".mcfunction");

private static final Map<Identifier, PackTestFunction> LOADED = new HashMap<>();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

A static map of loaded functions is a really bad idea. Tests are already stored in the registry.

@MulverineX

Copy link
Copy Markdown
Contributor Author

Turns out this is an upstream bug, I was working on addressing your concerns on this PR soon but ran into it. https://mojira.dev/MC-279191

@MulverineX MulverineX closed this Oct 8, 2026
@MulverineX
MulverineX deleted the fix/25 branch October 11, 2026 17:55
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.

2 participants