mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 09:46:53 -04:00
Less ambiguous?
This commit is contained in:
parent
e58136ed55
commit
e574ee9b84
@ -14,6 +14,7 @@ import li.cil.oc.Settings
|
|||||||
import net.minecraft.client.Minecraft
|
import net.minecraft.client.Minecraft
|
||||||
import net.minecraft.client.audio.SoundCategory
|
import net.minecraft.client.audio.SoundCategory
|
||||||
import net.minecraft.client.audio.SoundManager
|
import net.minecraft.client.audio.SoundManager
|
||||||
|
import net.minecraft.client.audio.SoundPoolEntry
|
||||||
import net.minecraft.tileentity.TileEntity
|
import net.minecraft.tileentity.TileEntity
|
||||||
import net.minecraft.util.ResourceLocation
|
import net.minecraft.util.ResourceLocation
|
||||||
import net.minecraftforge.client.event.sound.SoundLoadEvent
|
import net.minecraftforge.client.event.sound.SoundLoadEvent
|
||||||
@ -194,7 +195,7 @@ object Sound {
|
|||||||
def play(name: String) {
|
def play(name: String) {
|
||||||
val resourceName = s"${Settings.resourceDomain}:$name"
|
val resourceName = s"${Settings.resourceDomain}:$name"
|
||||||
val sound = Minecraft.getMinecraft.getSoundHandler.getSound(new ResourceLocation(resourceName))
|
val sound = Minecraft.getMinecraft.getSoundHandler.getSound(new ResourceLocation(resourceName))
|
||||||
val resource = sound.cloneEntry.getSoundPoolEntryLocation
|
val resource = (sound.cloneEntry(): SoundPoolEntry).getSoundPoolEntryLocation
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
initialized = true
|
initialized = true
|
||||||
soundSystem.newSource(false, source, toUrl(resource), resource.toString, true, tileEntity.getPos.getX, tileEntity.getPos.getY, tileEntity.getPos.getZ, SoundSystemConfig.ATTENUATION_LINEAR, 16)
|
soundSystem.newSource(false, source, toUrl(resource), resource.toString, true, tileEntity.getPos.getX, tileEntity.getPos.getY, tileEntity.getPos.getZ, SoundSystemConfig.ATTENUATION_LINEAR, 16)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user