mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 13:09:59 +00:00
Convert Forge to use Official mappings. Mojang released their obfuscation mappings but we have not used them up until now due to wanting to get their license to be more explicitly permissive. It is clear that their intent is to allow us to use their names for developing mods like this. See the full wording, and our interpretation here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
51 lines
2.6 KiB
Diff
51 lines
2.6 KiB
Diff
--- a/net/minecraft/client/audio/SoundEngine.java
|
|
+++ b/net/minecraft/client/audio/SoundEngine.java
|
|
@@ -56,6 +_,7 @@
|
|
this.field_148622_c = p_i50892_1_;
|
|
this.field_148619_d = p_i50892_2_;
|
|
this.field_217939_i = new AudioStreamManager(p_i50892_3_);
|
|
+ net.minecraftforge.fml.ModLoader.get().postEvent(new net.minecraftforge.client.event.sound.SoundLoadEvent(this));
|
|
}
|
|
|
|
public void func_148596_a() {
|
|
@@ -71,6 +_,7 @@
|
|
|
|
this.func_148613_b();
|
|
this.func_148608_i();
|
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.SoundLoadEvent(this));
|
|
}
|
|
|
|
private synchronized void func_148608_i() {
|
|
@@ -266,7 +_,8 @@
|
|
|
|
public void func_148611_c(ISound p_148611_1_) {
|
|
if (this.field_148617_f) {
|
|
- if (p_148611_1_.func_230510_t_()) {
|
|
+ p_148611_1_ = net.minecraftforge.client.ForgeHooksClient.playSound(this, p_148611_1_);
|
|
+ if (p_148611_1_ != null && p_148611_1_.func_230510_t_()) {
|
|
SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c);
|
|
ResourceLocation resourcelocation = p_148611_1_.func_147650_b();
|
|
if (soundeventaccessor == null) {
|
|
@@ -331,11 +_,13 @@
|
|
p_239543_8_.func_216420_a(vector3d);
|
|
p_239543_8_.func_216432_b(flag);
|
|
});
|
|
+ final ISound isound = p_148611_1_;
|
|
if (!flag3) {
|
|
this.field_217939_i.func_217909_a(sound.func_188721_b()).thenAccept((p_217934_1_) -> {
|
|
channelmanager$entry.func_217888_a((p_217925_1_) -> {
|
|
p_217925_1_.func_216429_a(p_217934_1_);
|
|
p_217925_1_.func_216438_c();
|
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlaySoundSourceEvent(this, isound, p_217925_1_));
|
|
});
|
|
});
|
|
} else {
|
|
@@ -343,6 +_,7 @@
|
|
channelmanager$entry.func_217888_a((p_217935_1_) -> {
|
|
p_217935_1_.func_216433_a(p_217928_1_);
|
|
p_217935_1_.func_216438_c();
|
|
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlayStreamingSourceEvent(this, isound, p_217935_1_));
|
|
});
|
|
});
|
|
}
|