-
Notifications
You must be signed in to change notification settings - Fork 1
Add support folia #2
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
base: master
Are you sure you want to change the base?
Conversation
Thorinwasher
left a comment
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.
I get the feeling that more things might break, but I'm honestly not sure
| private void checkAlive(GardenPlant gardenPlant) { | ||
| Bukkit.getScheduler().runTask(Garden.getInstance(), () -> { | ||
| Bukkit.getGlobalRegionScheduler().run(Garden.getInstance(), task -> { | ||
| if (gardenPlant.isAlive()) { |
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 check should be done in the local thread
| this.registerPlantRecipes(); | ||
| this.getLifecycleManager().registerEventHandler(LifecycleEvents.COMMANDS, GardenCommand::register); | ||
| Bukkit.getScheduler().runTaskTimer(this, new GrowthManager(gardenRegistry, gardenPlantDataType)::tick, 0, 200); | ||
| Bukkit.getAsyncScheduler().runAtFixedRate(this, task -> new GrowthManager(gardenRegistry, gardenPlantDataType).tick(), 1L, 200L, TimeUnit.MILLISECONDS); |
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.
You changed the unit of time here, from ticks to milliseconds
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.
You changed the unit of time here, from ticks to milliseconds
idk why changed this to async scheduler, if i don't change in past
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.
You changed the unit of time here, from ticks to milliseconds
oh, this is a garden, I'm sorry
First support for folia in this plugin. There may still be areas that require revision.