From 82f75b6f6a43ed0c8474073e2795b27127a83cc5 Mon Sep 17 00:00:00 2001 From: hama Date: Tue, 3 Dec 2024 13:45:04 -0800 Subject: [PATCH] persist music bus override setting --- gradle.properties | 2 +- .../glowcase/block/entity/SoundPlayerBlockEntity.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d37440a..3003424 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,7 @@ authors=HavenKing, ModFest contributors=Chai, Sisby folk, ShiroJR, Superkat32, maximumpower55, CallMeEcho, quaternary, comp500, LemmaEOF, acikek, TheEpicBlock, SkyNotTheLimit, Patbox, AmyMialee license=CC0-1.0 # Mod Version -baseVersion=1.7.5 +baseVersion=1.7.6 # Branch Metadata branch=1.21 tagBranch=1.21 diff --git a/src/main/java/dev/hephaestus/glowcase/block/entity/SoundPlayerBlockEntity.java b/src/main/java/dev/hephaestus/glowcase/block/entity/SoundPlayerBlockEntity.java index 305a76f..25a9830 100644 --- a/src/main/java/dev/hephaestus/glowcase/block/entity/SoundPlayerBlockEntity.java +++ b/src/main/java/dev/hephaestus/glowcase/block/entity/SoundPlayerBlockEntity.java @@ -78,6 +78,7 @@ protected void writeNbt(NbtCompound tag, RegistryWrapper.WrapperLookup registryL tag.putInt("repeatDelay", this.repeatDelay); tag.putFloat("distance", this.distance); tag.putBoolean("relative", this.relative); + tag.putBoolean("cancelOthers", this.cancelOthers); Vec3d.CODEC.encodeStart(ops, this.soundPosition) .resultOrPartial(LOGGER::error) .ifPresent(result -> tag.put("soundPosition", result)); @@ -98,6 +99,7 @@ protected void readNbt(NbtCompound tag, RegistryWrapper.WrapperLookup registryLo this.repeatDelay = tag.getInt("repeatDelay"); this.distance = tag.getFloat("distance"); this.relative = tag.getBoolean("relative"); + this.cancelOthers = tag.getBoolean("cancelOthers"); if (tag.contains("soundPosition")) Vec3d.CODEC.parse(ops, tag.get("soundPosition")) .resultOrPartial(LOGGER::error)