i have had the same problem before, the only crash report is that java has ran out of heap space
it only crashes when trying to load a world, and it only crashes with this block
if i remove the getTextureFromSide(int side) method it works, should i used getBlockTextureFromSideAndMetadata(int side, int meta)
the code i have used is as follows
/*******************************************************************************
* Copyright (c) 2012 Alchemist'.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Viper283
* Jamesc554544
* Alchemist
******************************************************************************/
package fma;
import net.minecraft.src.Block;
import net.minecraft.src.Material;
/**
* @author viper283
*
*/
public class ModBlocks {
public static Block chalk;
public static Block meta;
public static Block crate;
public static void initBlock() {
chalk = new BlockChalk(ModIds.chalk, 5).setBlockName("chalk");
meta = new FMAMetaBlock(ModIds.meta, Material.rock);
crate = new BlockCrate(ModIds.crate, 3).setBlockName("crate");
}
}
and for the block class
/*******************************************************************************
* Copyright (c) 2012 Alchemist'.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Viper283
* Jamesc554544
* Alchemist
******************************************************************************/
package fma;
import net.minecraft.src.Block;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Material;
/**
* @author viper283
*
*/
public class BlockCrate extends Block {
/**
* @param par1
* @param par2
*/
public BlockCrate(int par1, int par2) {
super(par1, par2, Material.wood);
this.setCreativeTab(CreativeTabs.tabDeco);
// TODO Auto-generated constructor stub
}
@Override
public String getTextureFile() {
return Resources.blockTextures;
}
@Override
public int getBlockTextureFromSide(int side) {
if(side == 1 || side == 5) {
return 4;
}
return 3;
}
}