Skip to content
This repository has been archived by the owner on Feb 12, 2018. It is now read-only.

Sound issue with 1.2.7 #671

Closed
JasonMcRay opened this issue Jul 5, 2015 · 29 comments
Closed

Sound issue with 1.2.7 #671

JasonMcRay opened this issue Jul 5, 2015 · 29 comments

Comments

@JasonMcRay
Copy link

This one is bit wierd but I pinpointed it at Extra Utilities after some testing. The issue is, whenever I open my inventory I hear in my case IC2/GT Hammer and IC2/GT Drill sound. I know this is strange. Testiing was done with just IC2, GT, NEI and ExU with Forge 1420

@Leftorius
Copy link

can confirm this :I

@SuperSandro2000
Copy link

Can confirm this, too!

@Peach774
Copy link

Peach774 commented Jul 8, 2015

IS there some way to fix this? Also, which mod is causing it, because I know someone who is having the same problem without IC2 or Gregtech. Could it be NEI?

@SuperSandro2000
Copy link

Downgrade to 1.2.5.

@rxiv
Copy link

rxiv commented Jul 8, 2015

Issue exists with 1.2.8 also.

@SuperSandro2000
Copy link

I used Forge 1448 and sometimes i heard the sound even if I only moved my mouse.

@Blood-Asp
Copy link

Maybe this helps searching for the problem:
http://forum.industrial-craft.net/index.php?page=Thread&postID=190418#post190418

@BentHaase
Copy link

Wow finally found it! This bug was grinding our nerves to the extremes. This could also be related to these kind of crashes: http://openeye.openmods.info/crashes/c2efef2765162477f951507848365d72

@Dream-Master
Copy link

I think the hammering sound is from the Minecraft Anvil but i am not 100 % sure.

@Dream-Master
Copy link

Still exists with Version 1.2.10

@leagris
Copy link

leagris commented Sep 7, 2015

Still exists with Version 1.2.11, now even cause Concurrent Modification Exception and crash client if player inventory is opened while sound plays.

See: crash report http://pastebin.com/H0r5Ni6i

@Dream-Master
Copy link

Maybe we have to contact RWThema via Twitter because he never answered here.

@KageDragon
Copy link

I also have this issue, with 1.2.7 or higher, and eventually the ConcurrentModificationException crash.

I found how to get Minecraft to show me some more info on sounds, and found this, whenever I open NEI:

[NEI Subset Item Allocation/DEBUG]: Playing sound minecraft:sounds/random/break.ogg for event minecraft:random.break as channel cdf834df-ffda-40ae-92ac-d2d62e6fb1f7
[NEI Subset Item Allocation/DEBUG]: Playing sound minecraft:sounds/random/anvil_break.ogg for event minecraft:random.anvil_break as channel ee76e776-a6a3-49d3-93fd-ab2039ddbabf
[NEI Subset Item Allocation/DEBUG]: Playing sound ic2:sounds/Treetap.ogg for event ic2:tools.Treetap as channel 8013a018-9977-4f77-bf04-3f78922b6e26

Here's hoping RWTema reads this :)

@Dream-Master
Copy link

Maybe he read it but he doesn't do anything against it.

@KageDragon
Copy link

OK, did some digging in eclipse.

[wall of text ahead!]

Here's whats happening, as far as I can tell:

The ExU Extra NEI Filtering seems to be a byproduct of the Advanced Item Filter code.
One of the options is HasContainerItem, which is any item that gets returned from a crafting operation
ie empty bucket when a water bucket is used in a recipe, or when a tool is returned, but with some durability used.

ExU calls hasContainerItem for the GregTech metatool

GT's hasContainerItem method:

public final boolean hasContainerItem(ItemStack aStack) {
        return getContainerItem(aStack) != null;
    }

GT's getContainerItem method:

public final ItemStack getContainerItem(ItemStack aStack) {
        if (!isItemStackUsable(aStack)) return null;
        aStack = UT.Stacks.copyAmount(1, aStack);
        IToolStats tStats = getToolStats(aStack);
        if (tStats == null) return null;
        doDamage(aStack, tStats.getToolDamagePerContainerCraft());
        aStack = aStack.stackSize > 0 ? aStack : null;
        if (aStack == null) UT.Sounds.play(tStats.getBreakingSound(), 1, 1.0F); else UT.Sounds.play(tStats.getCraftingSound(), 1, 1.0F);
        return aStack;
    }

The last line is the relevant one, for tools, it plays break.ogg if the tool is out of uses after being used in a crafting operation.
getContainerItem plays a sound regardless if hasContainerItem is simply checking or if getContainerItem is being called from an actual crafting operation.

PrefixItem also has this issue, I think these are the glass tubes, and they're causing the Treetap.ogg to be played.

DarkAsp's GT5 version has a similar problem, and it was a simple fix:

Blood-Asp/GT5-Unofficial@37def88

There are two other issues however, and I think they're related:

The ExU extra filter categories I would assume would be calculated when a world is first loaded
and I assume should be static after that, yet every time NEI is opened, or I view a recipe\usage in NEI,
I get the sounds, which tells me getContainerItem is being called every time, I'm not sure exactly what ExU is doing...

I'll ask Greg and Tema what they think, has anyone had any luck contacting Tema through Twitter or Curse?

@plaguewolf
Copy link

nope. tema has left exU behind to pursue RL, or at least it appears so. might i know where you got the relevant source from? is there a developer build available? because id love to fix this myself, and just us it for myself of course. this is beyond annoying, and i can no longer simply use an outdated version of exU because it uses an old RFapi, and enderIO complains something fierce about it.

@plaguewolf
Copy link

nevermind, ive found the source, now im purusing the source, hopefully i can figure this out, and in addition maybe figure out why the golden bag with inventory tweaks causes, when inserted into itself, a divide by zero effect.

@Morketh
Copy link

Morketh commented Oct 20, 2015

Im fairly certain a lot of people would be happy for a patch if you get one put together.

@plaguewolf
Copy link

well that was funky, i wonder if its related...?

dev environ: buildpath: exU, GTUnofficial 5.09.09, mod path: NEI, ic2-exp, BC, forestry

gonna trim some mods off

java.util.ConcurrentModificationException
at com.google.common.collect.HashBiMap$Itr.checkForConcurrentModification(HashBiMap.java:339) ~[guava-17.0.jar:?]
at com.google.common.collect.HashBiMap$Itr.hasNext(HashBiMap.java:345) ~[guava-17.0.jar:?]
at net.minecraft.client.audio.SoundManager.updateAllSounds(SoundManager.java:239) ~[SoundManager.class:?]
at net.minecraft.client.audio.SoundHandler.update(SoundHandler.java:224) ~[SoundHandler.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2104) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]

@plaguewolf
Copy link

@KageDragon, what relevant class did you get that from? so far i've only found reference to hasContainerItem inside cofh.api.* and inside ItemDivisionSigil.class

@plaguewolf
Copy link

com.rwtema.extrautils.tileentity.transfernodes.TileEntityTransferNodeInventory.class
oh dear lord, wall of if..else statements @ doCraft() has relevant hasContainerItem bits...

@KageDragon
Copy link

com\rwtema\extrautils\item\filters\AdvancedNodeUpgrades.class

addEntry(new Matcher("HasContainerItem")
{
  public boolean matchItem(ItemStack item)
  {
    return item.getItem().hasContainerItem(item);
  }
});

This was where whatever played the sound in GT was being called from, and I was focusing on the code that changed from 1.2.6->1.2.7

@plaguewolf
Copy link

ahhh, i see, i hadnt thought to compare the 2, ive just been looking through the code for 1.2.11 (or whatever the latest is)

@plaguewolf
Copy link

sadly, i realized earlier that lately i spend more time trying to fix my modpack, and reading through code, than actually playing minecraft. le sigh.

@ultrasn0w
Copy link

http://forum.industrial-craft.net/index.php?page=Thread&postID=195566#post195566
@rwtema, If you do not approve a patched extrautilites version, one post/comment will be enough and it will be gone again.
Oh and do NOT report bugs to rwtema when using this!!

Deleted patched version.

Fixed with version 1.2.12. Thank you @rwtema, the new feature is also working great!

@Morketh
Copy link

Morketh commented Oct 28, 2015

Nice patch and thank you for figuring that out

@ultrasn0w
Copy link

Confirmed that version 1.2.12 fixed this issue.

@SapientMC
Copy link

Same issue just after initialization of ME-system. Removing ME-controllers = quite, placing them back - annoying sound after few seconds. I've tried every version from 1.2.5 to 1.2.12 and nothing changes.

1-st time it appeared was crafting GT Motor via ME.

@JasonMcRay
Copy link
Author

After some testing it is fixed in ExU 1.2.12 and newest GT

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests