Add comparator output, tab-completion, soundlist/soundstopall, and OpenAL low-pass occlusion/underwater filter
This commit is contained in:
@@ -292,6 +292,7 @@ ITickableTileEntity {
|
||||
SoundDebug.log(SoundDebug.Level.L2, "TRIGGER", this.debugPosId(), "stop requested sourceId=sound_player:{}", this.worldPosition.asLong());
|
||||
NetworkHandler.CHANNEL.send(PacketDistributor.TRACKING_CHUNK.with(() -> this.level.getChunkAt(this.worldPosition)), (Object)new S2CBlockStateSyncPacket(this.worldPosition, this.save(new CompoundNBT()), false));
|
||||
this.setChanged();
|
||||
this.notifyNeighbors();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,6 +544,7 @@ ITickableTileEntity {
|
||||
this.playing = true;
|
||||
SoundDebug.log(SoundDebug.Level.L1, "TRIGGER", this.debugPosId(), "play requested sourceId=sound_player:{} soundId={}", this.worldPosition.asLong(), this.settings.soundId);
|
||||
NetworkHandler.CHANNEL.send(PacketDistributor.TRACKING_CHUNK.with(() -> this.level.getChunkAt(this.worldPosition)), (Object)new S2CBlockStateSyncPacket(this.worldPosition, this.save(new CompoundNBT()), true));
|
||||
this.notifyNeighbors();
|
||||
}
|
||||
|
||||
private void emitScenarioStepPlay(String soundId) {
|
||||
@@ -551,6 +553,17 @@ ITickableTileEntity {
|
||||
this.playing = true;
|
||||
SoundDebug.log(SoundDebug.Level.L1, "TRIGGER", this.debugPosId(), "scenario step play sourceId=sound_player:{} stepSoundId={} nextDelay={}", this.worldPosition.asLong(), soundId, this.scenarioWaitTicks);
|
||||
NetworkHandler.CHANNEL.send(PacketDistributor.TRACKING_CHUNK.with(() -> this.level.getChunkAt(this.worldPosition)), (Object)new S2CPlaySoundPacket("sound_player:" + this.worldPosition.asLong(), this.worldPosition, stepSettings));
|
||||
this.notifyNeighbors();
|
||||
}
|
||||
|
||||
public int getScenarioStepIndex() {
|
||||
return this.scenarioStepIndex;
|
||||
}
|
||||
|
||||
private void notifyNeighbors() {
|
||||
if (this.level != null && !this.level.isClientSide) {
|
||||
this.level.updateNeighborsAt(this.worldPosition, this.getBlockState().getBlock());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isSourceRuntimeActive() {
|
||||
|
||||
Reference in New Issue
Block a user