Skip to content

Commit

Permalink
Fix jukebox songs being played at wrong coords with mono enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
AliahX committed Apr 11, 2023
1 parent 7f18b6a commit 5efbe6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.18
# Mod Properties
mod_version=1.3.3
mod_version=1.3.4
maven_group=com.aliahx
archives_base_name=Mixtape
# Dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/aliahx/mixtape/Mixtape.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
public class Mixtape implements ClientModInitializer {
public static final Logger LOGGER = LogManager.getLogger();

public static final String MOD_VERSION = "1.3.3";
public static final String MOD_VERSION = "1.3.4";
private static KeyBinding skipKey;
private static KeyBinding pauseKey;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ private static void recordMixin(SoundEvent sound, Vec3d pos, CallbackInfoReturna
} else if(config.jukeboxConfig.elevenReplaces11 && sound.getId().toString().equals("minecraft:music_disc.11")) {
sound = SoundEvent.of(new Identifier("mixtape:music.eleven"));
}
cir.setReturnValue(new PositionedSoundInstance(sound.getId(), SoundCategory.RECORDS, config.jukeboxConfig.volume / 100, 1.0F, SoundInstance.createRandom(), false, 0, SoundInstance.AttenuationType.LINEAR, pos.x, pos.y, pos.z, config.jukeboxConfig.mono));
if(config.jukeboxConfig.mono) {
cir.setReturnValue(new PositionedSoundInstance(sound.getId(), SoundCategory.RECORDS, config.jukeboxConfig.volume / 100, 1.0F, SoundInstance.createRandom(), false, 0, SoundInstance.AttenuationType.LINEAR, 0, 0, 0, true));
} else {
cir.setReturnValue(new PositionedSoundInstance(sound.getId(), SoundCategory.RECORDS, config.jukeboxConfig.volume / 100, 1.0F, SoundInstance.createRandom(), false, 0, SoundInstance.AttenuationType.LINEAR, pos.x, pos.y, pos.z, false));
}
}
}
}

0 comments on commit 5efbe6d

Please sign in to comment.