Jump to content

Recommended Posts

Posted

Okay, I know it sounds weird ( LOL ) but the playsound code line seems to ignore it's basic call sometimes.

Like I know it has been called, I know sometimes it works, but for some unforseen mystery reason it doesn't play the sound sometimes.
The code works fine, I even used message in the chat to confirm that the sound is supposed to play. But it just doesn't sometimes.
(What I mean is the chat tells me when the sound should play at the exact same time the message appear. BUT sometime the message goes but the sound does not.)
This bugs me, I though it would be a client or server problem... But I have absolutelly no Idea what's causing the playsound to just ignore it's function.

I suspect it's because there somewhat of a limit of sounds that can be emitted from one single entity ?
Because my goal was to make a custom damage sound based on how much damage a player takes. (it never plays) [I used the onEntityHurtEvent everything work except the playsound]
And a low health beeping noise... (in a loop, yet... sometimes it plays, sometimes it does not.) [But it seems like it cannot plays the sound if it is already playing. However, I've tried using a duplicaded sound track but NOPE it just won't let the sound play one right after another.]

I've tried putting the stream to false :
-No progress so far.
-No crashes either.
-All sounds are also correctly registererd.
-Using /Playsound commands works perfectly. (The sound works fine. The playsound in the mods code is inconsistent)

Please,
I really need the help from ya'll.

Posted
6 hours ago, Tenshi_Akuma said:

Please,
I really need the help from ya'll.

You might have already done so, but if you haven't, then I recommend taking a look at the Forge Sounds Documentation. Among other things, it details which method to call based on if the code is run on the client/server/both sides.

Posted
21 hours ago, vemerion said:

You might have already done so, but if you haven't, then I recommend taking a look at the Forge Sounds Documentation. Among other things, it details which method to call based on if the code is run on the client/server/both sides.

Thank you for your awnser.
And yes I have...
I was very desperate so I tried for an entire day to see the problem.
But I couldnt... I even read about thread talking about beeing able to replace the damage sound... And apperently the playsound worked for them as they even tried to erase the classic hurt sound without soundpacks. I suspect it's because they were using an older version... I 'm on 1.12.2 Forge.
I wanna make sure that thoses sounds are client side only. (because they are like an optionnal GUI soundtrack)

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I also just tried with iron's spellbooks removed, since that seemed related, but i am still having the same problem, even in newly created worlds. https://mclo.gs/AtrAfaj 
    • My Gradle Project for my Minecraft mod isn't building. Terminal: * Where: Settings file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\settings.gradle' line: 2 * What went wrong: Could not compile settings file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\settings.gradle'. > startup failed:   settings file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\settings.gradle': 2: The pluginManagement {} block must appear before any other statements in the script.   For more information on the pluginManagement {} block, please refer to https://docs.gradle.org/9.0.0/userguide/plugins.html#sec:plugin_management in the Gradle documentation.    @ line 2, column 1.      pluginManagement {      ^   1 error * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to generate a Build Scan (Powered by Develocity). > Get more help at https://help.gradle.org.   Setting.Gradle File:   rootProject.name = 'fusion-lucky-block' pluginManagement {     repositories {         gradlePluginPortal()         maven { url "https://maven.minecraftforge.net/" }         mavenCentral()     } }
    • no change still. here's a new log  https://mclo.gs/RXwiZmn 
    • Whenever I go to build my it says "Build failed in " how many seconds   Here is what is said in my terminal * Where: Build file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\build.gradle' line: 3 * What went wrong: Plugin [id: 'net.minecraftforge.gradle', version: '6.1.51'] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Included Builds (No included builds contain this plugin) - Plugin Repositories (could not resolve plugin artifact 'net.minecraftforge.gradle:net.minecraftforge.gradle.gradle.plugin:6.1.51')   Searched in the following repositories:     Gradle Central Plugin Repository     MinecraftForge(https://maven.minecraftforge.net/) * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Get more help at https://help.gradle.org.   Here is what is in my build.gradle file plugins {     id 'java'     id 'net.minecraftforge.gradle' version '6.1+' }   group = 'io.github.csonnic03.fusionlucky' version = '1.0.0' archivesBaseName = 'fusionlucky'   java {     toolchain {         languageVersion = JavaLanguageVersion.of(17)     } }   repositories {     mavenCentral()     maven {         name "forgeMaven"         url "https://maven.minecraftforge.net/<repository>" } }   dependencies {     minecraft 'net.minecraftforge:forge:1.20.1-47.1.0' }   minecraft {     mappings channel: 'official', version: '1.20.1'     runs {         client {             workingDirectory project.file('run')         }         server {             workingDirectory project.file('run')         }     } }   tasks.withType(JavaCompile) {     options.encoding = 'UTF-8' }   jar {     manifest {         attributes(             "Specification-Title": "Fusion Lucky Block",             "Specification-Vendor": "example",             "Implementation-Title": project.name,             "Implementation-Version": project.version,             "Implementation-Vendor": "example",             "ModLauncher-TargetFMLVersion": "[47,)"         )     } }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.