9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-30 20:39:19 +00:00

fix loaded seconds

This commit is contained in:
XiaoMoMi
2024-12-30 22:35:50 +08:00
parent e181249e38
commit 0693988d34
3 changed files with 2 additions and 4 deletions

View File

@@ -139,6 +139,7 @@ public class CustomCropsChunkImpl implements CustomCropsChunk {
public void timer() {
WorldSetting setting = world.setting();
int interval = setting.minTickUnit();
if (this.loadedSeconds < 0) this.loadedSeconds = 0;
this.loadedSeconds++;
// if loadedSeconds reach another recycle, rearrange the tasks
if (this.loadedSeconds >= interval) {

View File

@@ -8,7 +8,7 @@ dependencies {
compileOnly(project(":api"))
compileOnly(project(":common"))
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
compileOnly("com.nexomc:nexo:0.5.0-dev.8")
compileOnly("com.nexomc:nexo:0.8.0-dev.5")
}
tasks.withType<JavaCompile> {

View File

@@ -54,9 +54,7 @@ public class ConfigType {
public static final ConfigType WATERING_CAN = of(
"watering-cans",
(manager, id, section) -> {
ActionManager<Player> pam = BukkitCustomCropsPlugin.getInstance().getActionManager(Player.class);
WateringCanConfig config = WateringCanConfig.builder()
.id(id)
.itemID(section.getString("item"))
@@ -85,7 +83,6 @@ public class ConfigType {
section.getString("water-bar.right", "")
) : null)
.build();
manager.registerWateringCanConfig(config);
return false;
}