Skip to content

Conversation

@RitaSister
Copy link

First support for folia in this plugin. There may still be areas that require revision.

Copy link
Collaborator

@Thorinwasher Thorinwasher left a 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()) {
Copy link
Collaborator

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);
Copy link
Collaborator

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

Copy link
Author

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

Copy link
Author

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

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