Remove debug print statement and load additional sound files
This commit is contained in:
parent
ad4f260deb
commit
9616a43afd
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -74,9 +74,13 @@ public class SoundHandler implements IResourceManagerReloadListener, ITickable {
|
|||
this.sndManager.reloadSoundSystem();
|
||||
this.sndRegistry.clearMap();
|
||||
|
||||
// Load sounds from two files: sounds.json and sounds2.json
|
||||
String[] soundFiles = { "sounds.json", "sounds2.json" };
|
||||
|
||||
for (String s : iresourcemanager.getResourceDomains()) {
|
||||
for (String soundFile : soundFiles) {
|
||||
try {
|
||||
for (IResource iresource : iresourcemanager.getAllResources(new ResourceLocation(s, "sounds.json"))) {
|
||||
for (IResource iresource : iresourcemanager.getAllResources(new ResourceLocation(s, soundFile))) {
|
||||
try {
|
||||
Map map = this.getSoundMap(iresource.getInputStream());
|
||||
|
||||
|
@ -85,14 +89,14 @@ public class SoundHandler implements IResourceManagerReloadListener, ITickable {
|
|||
(SoundList) entry.getValue());
|
||||
}
|
||||
} catch (RuntimeException runtimeexception) {
|
||||
logger.warn("Invalid sounds.json", runtimeexception);
|
||||
logger.warn("Invalid " + soundFile, runtimeexception);
|
||||
}
|
||||
}
|
||||
} catch (IOException var11) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static class SoundMap {
|
||||
|
|
|
@ -89,8 +89,6 @@ public class ItemBlock extends Item {
|
|||
setTileEntityNBT(world, entityplayer, blockpos, itemstack);
|
||||
this.block.onBlockPlacedBy(world, blockpos, iblockstate1, entityplayer, itemstack);
|
||||
}
|
||||
System.out.println(
|
||||
"Placed block at " + blockpos.getX() + ", " + blockpos.getY() + ", " + blockpos.getZ());
|
||||
// ! fix sounds
|
||||
// world.playSoundEffect((double) ((float) blockpos.getX() + 0.5F),
|
||||
// (double) ((float) blockpos.getY() + 0.5F), (double) ((float) blockpos.getZ()
|
||||
|
|
Loading…
Reference in New Issue