diff options
| author | anhgelus <anhgelus.morhtuuzh@proton.me> | 2024-10-27 12:12:11 +0000 |
|---|---|---|
| committer | anhgelus <anhgelus.morhtuuzh@proton.me> | 2024-10-27 12:12:11 +0000 |
| commit | af3f249345472d3379d267f8e35fd46ee88d9a13 (patch) | |
| tree | cff7a2193b10fec817a9601dad36815e17ed71fb /src/main/java/world/anhgelus | |
| parent | 91d869b1cd5a2617494743c4e2e4af3c8bb322e1 (diff) | |
fix(config): not using time before release in timers and start's effects
Diffstat (limited to 'src/main/java/world/anhgelus')
| -rw-r--r-- | src/main/java/world/anhgelus/manhunt/Manhunt.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/world/anhgelus/manhunt/Manhunt.java b/src/main/java/world/anhgelus/manhunt/Manhunt.java index 3ebc2ad..cf09dc1 100644 --- a/src/main/java/world/anhgelus/manhunt/Manhunt.java +++ b/src/main/java/world/anhgelus/manhunt/Manhunt.java @@ -56,6 +56,8 @@ public class Manhunt implements ModInitializer { public void onInitialize() {
LOGGER.info("Initializing Manhunt");
MidnightConfig.init(MOD_ID, Config.class);
+ LOGGER.info(Config.secondsBeforeRelease);
+ LOGGER.info(Config.updateCompassEach);
final LiteralArgumentBuilder<ServerCommandSource> command = literal("manhunt");
@@ -121,7 +123,7 @@ public class Manhunt implements ModInitializer { assert hunter != null;
final var isACompass = new ItemStack(Items.COMPASS);
hunter.giveItemStack(isACompass);
- hunter.addStatusEffect(new StatusEffectInstance(StatusEffects.MINING_FATIGUE, 30*20, 255, false, false));
+ hunter.addStatusEffect(new StatusEffectInstance(StatusEffects.MINING_FATIGUE, Config.secondsBeforeRelease*20, 255, false, false));
var attr = hunter.getAttributeInstance(EntityAttributes.GENERIC_MOVEMENT_SPEED);
if (attr != null) {
final var modifier = new EntityAttributeModifier(
@@ -159,7 +161,7 @@ public class Manhunt implements ModInitializer { }
}
}
- }, 30*1000);
+ }, Config.secondsBeforeRelease*1000);
setTimer(pm);
context.getSource().sendFeedback(() -> Text.literal("Game started!"), true);
return Command.SINGLE_SUCCESS;
|
