Fixed an issue causing sound files to be created on the desktop

This commit is contained in:
Adubbz 2013-04-22 12:21:54 +10:00
parent fa80c61faa
commit 1e20a0e961
2 changed files with 5 additions and 2 deletions

View file

@ -31,6 +31,7 @@
- Added Better World Generation 4 support
- Made shears instantly destroy Biomes O Plenty leaves
- Adjusted high grass hitbox to cover both blocks
- Fixed an issue causing sound files to be created on the desktop
Version 0.5.1 '17-04-2013'
- Fixed server crash with mudballs

View file

@ -7,6 +7,7 @@ import java.io.OutputStream;
import java.util.logging.Level;
import net.minecraft.block.BlockDispenser;
import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityEggInfo;
@ -69,12 +70,13 @@ public class BiomesOPlenty
boolean isClient = proxy instanceof ClientProxy;
String[] soundFiles = { "bopdisc.ogg", "bopdiscmud.ogg"};
if (isClient)
{
for (String soundFile : soundFiles) try
{
File file = new File("resources/mod/streaming/" + soundFile);
System.out.println(Minecraft.getMinecraftDir().getAbsolutePath().toString() + "/resources/mod/streaming/" + soundFile);
File file = new File(Minecraft.getMinecraftDir().getAbsolutePath() + "/resources/mod/streaming/" + soundFile);
if (!file.exists()) {
System.out.println("[BiomesOPlenty] " + soundFile + " doesn't exist, creating...");
file.getParentFile().mkdirs();