Merge pull request #20 from Adubbz/master

Best Pull Request Ever
This commit is contained in:
ted 2013-04-03 23:57:38 -07:00
commit 8a75409198
18 changed files with 307 additions and 271 deletions

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 710 B

After

Width:  |  Height:  |  Size: 710 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 645 B

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

Before

Width:  |  Height:  |  Size: 491 B

After

Width:  |  Height:  |  Size: 491 B

View file

@ -1,14 +1,13 @@
package tdwp_ftw.biomesop;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class ClientProxy extends CommonProxy {
@Override
public void registerRenderers() {
MinecraftForgeClient.preloadTexture(BLOCK_PNG);
MinecraftForgeClient.preloadTexture(ITEMS_PNG);
MinecraftForgeClient.preloadTexture(ARMOR_MUD1_PNG);
MinecraftForgeClient.preloadTexture(ARMOR_MUD2_PNG);
MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST1_PNG);

View file

@ -1,12 +1,10 @@
package tdwp_ftw.biomesop;
public class CommonProxy {
public static String BLOCK_PNG = "/tdwp_ftw/biomesop/res/block.png";
public static String ITEMS_PNG = "/tdwp_ftw/biomesop/res/items.png";
public static String ARMOR_MUD1_PNG = "/tdwp_ftw/biomesop/res/armor/mud_1.png";
public static String ARMOR_MUD2_PNG = "/tdwp_ftw/biomesop/res/armor/mud_2.png";
public static String ARMOR_AMETHYST1_PNG = "/tdwp_ftw/biomesop/res/armor/amethyst_1.png";
public static String ARMOR_AMETHYST2_PNG = "/tdwp_ftw/biomesop/res/armor/amethyst_2.png";
public static String ARMOR_MUD1_PNG = "/mods/BiomesOPlenty/textures/armor/mud_1.png";
public static String ARMOR_MUD2_PNG = "/mods/BiomesOPlenty/textures/armor/mud_2.png";
public static String ARMOR_AMETHYST1_PNG = "/mods/BiomesOPlenty/textures/armor/amethyst_1.png";
public static String ARMOR_AMETHYST2_PNG = "/mods/BiomesOPlenty/textures/armor/amethyst_2.png";
// Client stuff
public void registerRenderers() {

View file

@ -125,12 +125,8 @@ public class BlockHolyGrass extends Block
if (par1World.provider.isHellWorld)
{
par1World.setBlock(par2, par3 + 1, par4, Block.fire.blockID);
if (this.isFireSource(par1World, par2, par3, par4, this.blockID, UP))
{
par1World.setBlock(par2, par3, par4, Block.slowSand.blockID);
}
}
if (!par1World.isRemote)
{

View file

@ -208,7 +208,7 @@ public class BonemealUse
{
if ((double)event.world.rand.nextFloat() < 0.45D)
{
((BlockMagicSapling)mod_BiomesOPlenty.magicSapling).func_96477_c(event.world, event.X, event.Y, event.Z, event.world.rand);
((BlockMagicSapling)mod_BiomesOPlenty.magicSapling).growTree(event.world, event.X, event.Y, event.Z, event.world.rand);
}
}
}

View file

@ -12,7 +12,7 @@ public class EntityJungleSpider extends EntitySpider
public EntityJungleSpider(World par1World)
{
super(par1World);
this.texture = "/tdwp_ftw/biomesop/res/mobs/junglespider.png";
this.texture = "/mods/BiomesOPlenty/textures/mobs/junglespider.png";
this.setSize(0.4F, 0.3F);
this.moveSpeed = 1.1F;
}

View file

@ -31,7 +31,7 @@ public class EntityRosester extends EntityChicken
public EntityRosester(World par1World)
{
super(par1World);
this.texture = "/tdwp_ftw/biomesop/res/mobs/rosester.png";
this.texture = "/mods/BiomesOPlenty/textures/mobs/rosester.png";
this.setSize(0.3F, 0.7F);
this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
float var2 = 0.25F;

View file

@ -1,7 +1,14 @@
package tdwp_ftw.biomesop;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.logging.Level;
import net.minecraft.block.Block;
import net.minecraft.block.BlockHalfSlab;
import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityEggInfo;
@ -32,6 +39,7 @@ import tdwp_ftw.biomesop.helpers.*;
import tdwp_ftw.biomesop.items.*;
import tdwp_ftw.biomesop.mobs.*;
import tdwp_ftw.biomesop.worldtype.WTBiomesOP;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
@ -61,6 +69,41 @@ public class mod_BiomesOPlenty
@PreInit
public void preInit(FMLPreInitializationEvent event)
{
String[] soundFiles = { "bopdisc.ogg", "bopdiscmud.ogg"};
for (String soundFile : soundFiles)
try
{
File file = new File("resources/mod/streaming/" + soundFile);
if (!file.exists()) {
System.out.println("[BoP] " + soundFile + " doesn't exist, creating...");
file.getParentFile().mkdirs();
file.createNewFile();
InputStream istream = getClass().getResourceAsStream("/mods/BiomesOPlenty/audio/" + soundFile);
OutputStream out = new FileOutputStream(file);
byte[] buf = new byte[1024];
int size = 0;
int len;
while ((len = istream.read(buf)) > 0) {
out.write(buf, 0, len);
size += len;
}
out.close();
istream.close();
if (size == 0) file.delete();
}
else {
throw new RuntimeException("Unknown Error, file does not exist");
}
}
catch (Exception e)
{
FMLCommonHandler.instance().getFMLLogger().log(Level.WARNING, "[BoP] Failed to load sound file: " + soundFile);
e.printStackTrace();
}
config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
skyColors = true;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB