lumien231 / Random-Things

The Random Things Minecraft Mod
69 stars 42 forks source link

[Request] Silence at spawn when the block breaker mines. #310

Closed Ruchian closed 6 years ago

Ruchian commented 6 years ago

The block breaker, while active and inside a loaded chunk breaking blocks anywhere within the overworld, causes the pickup/equip sound to play inside the spawn chunks on each interval. (basically at the same time it breaks a block)

I don't know anything about coding and modding myself, but according to @Virtuoel it's because of this line of code. https://github.com/lumien231/Random-Things/blob/8a45b3ce7f3d4b694a4028de7b3fa03d1f1df5f5/src/main/java/lumien/randomthings/tileentity/TileEntityBlockBreaker.java#L79

He says: The sound plays because the fake player's held item is set to another item And when you change the held item, the reequip sound plays

I was wondering if you could edit it a bit to make the block breaker be quiet at spawn. On servers it causes some confusion and some annoyance even. Some people started refering this to as the mysterious pickup sound or blob sound.

Virtuoel commented 6 years ago

Another contributing factor is that the default position of a player, including FakePlayers, is at the world spawn.
A simple fix would probably be to call fakePlayer.get().setSilent(true); after creating it to silence the reequip sounds.