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 | |
| parent | 91d869b1cd5a2617494743c4e2e4af3c8bb322e1 (diff) | |
fix(config): not using time before release in timers and start's effects
| -rw-r--r-- | gradle.properties | 2 | ||||
| -rw-r--r-- | src/main/java/world/anhgelus/manhunt/Manhunt.java | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gradle.properties b/gradle.properties index 5d36a40..bfebea2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,6 +15,6 @@ fabric_version=0.100.7+1.21 midnightlib_version=1.5.7-fabric
# Mod Properties
-mod_version=1.1.0
+mod_version=1.1.1
maven_group=world.anhgelus.manhunt
archives_base_name=manhunt
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;
|
