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,25 +74,29 @@ public class SoundHandler implements IResourceManagerReloadListener, ITickable {
|
||||||
this.sndManager.reloadSoundSystem();
|
this.sndManager.reloadSoundSystem();
|
||||||
this.sndRegistry.clearMap();
|
this.sndRegistry.clearMap();
|
||||||
|
|
||||||
for (String s : iresourcemanager.getResourceDomains()) {
|
// Load sounds from two files: sounds.json and sounds2.json
|
||||||
try {
|
String[] soundFiles = { "sounds.json", "sounds2.json" };
|
||||||
for (IResource iresource : iresourcemanager.getAllResources(new ResourceLocation(s, "sounds.json"))) {
|
|
||||||
try {
|
|
||||||
Map map = this.getSoundMap(iresource.getInputStream());
|
|
||||||
|
|
||||||
for (Entry entry : (Set<Entry>) map.entrySet()) {
|
for (String s : iresourcemanager.getResourceDomains()) {
|
||||||
this.loadSoundResource(new ResourceLocation(s, (String) entry.getKey()),
|
for (String soundFile : soundFiles) {
|
||||||
(SoundList) entry.getValue());
|
try {
|
||||||
|
for (IResource iresource : iresourcemanager.getAllResources(new ResourceLocation(s, soundFile))) {
|
||||||
|
try {
|
||||||
|
Map map = this.getSoundMap(iresource.getInputStream());
|
||||||
|
|
||||||
|
for (Entry entry : (Set<Entry>) map.entrySet()) {
|
||||||
|
this.loadSoundResource(new ResourceLocation(s, (String) entry.getKey()),
|
||||||
|
(SoundList) entry.getValue());
|
||||||
|
}
|
||||||
|
} catch (RuntimeException runtimeexception) {
|
||||||
|
logger.warn("Invalid " + soundFile, runtimeexception);
|
||||||
}
|
}
|
||||||
} catch (RuntimeException runtimeexception) {
|
|
||||||
logger.warn("Invalid sounds.json", runtimeexception);
|
|
||||||
}
|
}
|
||||||
|
} catch (IOException var11) {
|
||||||
|
;
|
||||||
}
|
}
|
||||||
} catch (IOException var11) {
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class SoundMap {
|
public static class SoundMap {
|
||||||
|
|
|
@ -89,8 +89,6 @@ public class ItemBlock extends Item {
|
||||||
setTileEntityNBT(world, entityplayer, blockpos, itemstack);
|
setTileEntityNBT(world, entityplayer, blockpos, itemstack);
|
||||||
this.block.onBlockPlacedBy(world, blockpos, iblockstate1, entityplayer, itemstack);
|
this.block.onBlockPlacedBy(world, blockpos, iblockstate1, entityplayer, itemstack);
|
||||||
}
|
}
|
||||||
System.out.println(
|
|
||||||
"Placed block at " + blockpos.getX() + ", " + blockpos.getY() + ", " + blockpos.getZ());
|
|
||||||
// ! fix sounds
|
// ! fix sounds
|
||||||
// world.playSoundEffect((double) ((float) blockpos.getX() + 0.5F),
|
// world.playSoundEffect((double) ((float) blockpos.getX() + 0.5F),
|
||||||
// (double) ((float) blockpos.getY() + 0.5F), (double) ((float) blockpos.getZ()
|
// (double) ((float) blockpos.getY() + 0.5F), (double) ((float) blockpos.getZ()
|
||||||
|
|
Loading…
Reference in New Issue