Proper toString for Simple Events#8729
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
sovdeeth
approved these changes
Jun 28, 2026
Absolutionism
approved these changes
Jun 28, 2026
1c65967 to
e36f45d
Compare
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.
Problem
Currently every simpleevent has the same toString: "simple event" unless they are merged into its own custom file seperate from SimpleEvents.java (e.g. EvtItem with its god awful
return "dispense/spawn/drop/craft/pickup/consume/break/despawn/merge/move/stonecutting") which is pretty messy + bad overhaul for errors or whatever else toString is used for. Imagine having an issue with item drop event just to get e.g. "event-example cannot be used in an on dispense/spawn/drop/craft/pickup/consume/break/despawn/merge/move/stonecutting bedrock event" its messy and not greatSolution
Adds on to SimpleEvent which allows you to create a SimpleEvent("") so the usage would go something along in an event registry:
.supplier(() -> new SimpleEvent("my super cool event")if no value is provided it will default to using 'simple event' for the toString
Testing Completed
quicktest ran fine and no errors in intellij/conflicts so i'd say works
Supporting Information
small pr '-'
also credit to smurfy/sovde for the idea n code
Completes: none
Related: none
AI assistance: none