Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/generated/resources/assets/anvilcraft/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@
},
"quenched_out": {
"sounds": [
"anvilcraft:quenched_out"
{
"attenuation_distance": 64,
"name": "anvilcraft:quenched_out"
}
],
"subtitle": "subtitles.anvilcraft.quenched_out"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import net.minecraft.core.BlockPos;
import net.minecraft.core.HolderLookup;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.Connection;
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.Packet;
Expand Down Expand Up @@ -1369,6 +1370,11 @@ public Packet<ClientGamePacketListener> getUpdatePacket() {
return ClientboundBlockEntityDataPacket.create(this);
}

@Override
public void onDataPacket(Connection connection, ClientboundBlockEntityDataPacket packet, HolderLookup.Provider registries) {
this.handleUpdateTag(packet.getTag(), registries);
}

/// === 巨构建造 ===

/// 切换锁定状态。玩家点击锁定按钮时在服务器端调用。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static void onLogout(ClientPlayerNetworkEvent.LoggingOut event) {
/** 固定在锻星砧位置的单次播放实例,不跟随玩家。 */
private static final class QuenchedOutSound extends AbstractTickableSoundInstance {
private QuenchedOutSound(BlockPos pos) {
super(ModSoundEvents.QUENCHED_OUT.get(), SoundSource.MUSIC, SoundInstance.createUnseededRandom());
super(ModSoundEvents.QUENCHED_OUT.get(), SoundSource.RECORDS, SoundInstance.createUnseededRandom());
this.looping = false;
this.delay = 0;
this.volume = 1.0F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ public void registerSounds() {

add(ModSoundEvents.QUENCHED_OUT, definition()
.subtitle("subtitles.anvilcraft.quenched_out")
.with(sound(AnvilCraft.of("quenched_out"))));
.with(sound(AnvilCraft.of("quenched_out")).attenuationDistance(64)));
}
}
Binary file modified src/main/resources/assets/anvilcraft/sounds/quenched_out.ogg
Binary file not shown.
Loading