Skip to content

Commit

Permalink
Add sleeping
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rkm0nkey committed Apr 25, 2021
1 parent 336feb2 commit c041d7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.11.3

# Mod Properties
mod_version = 1.1.1
mod_version = 1.1.2
maven_group = me.teajay
archives_base_name = talking-villagers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ private void init(CallbackInfo info) {

@Inject(at = @At("TAIL"), method = "tick()V")
public void tick(CallbackInfo info) {
heroCoolDown--;
nextRandomTalking--;
greetingCoolDown--;
boolean newVoiceEvent = false;
if(isSleeping()) return;
if(heroCoolDown > 0) {
eatCooldown--;
}
Expand Down Expand Up @@ -104,9 +108,6 @@ public void tick(CallbackInfo info) {
nextRandomTalking = MIN_RANDOM_COOLDOWN + random.nextInt(MAX_RANDOM_COOLDOWN - MIN_RANDOM_COOLDOWN);
}
}
heroCoolDown--;
nextRandomTalking--;
greetingCoolDown--;
}

@Inject(at = @At("TAIL"), method = "getAmbientSound()Lnet/minecraft/sound/SoundEvent;", cancellable = true)
Expand Down

0 comments on commit c041d7f

Please sign in to comment.