Started by
f0rze
on
Topic category: Help with Minecraft modding (Java Edition)
Help created a fashion they don't work!After I made them I threw in the client with forcom As it starts to run it crashes to desktop with the crash.
Here is the link:http://pastebin.com/SpSTM4fr
Can I see code of rubineOre?
@#1 this is how to do?
@#1
package mod.mcreator;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.World;
import net.minecraft.world.IBlockAccess;
import net.minecraft.util.MathHelper;
import net.minecraft.util.IIcon;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.client.Minecraft;
import net.minecraft.block.material.Material;
import net.minecraft.block.Block;
import java.util.Random;
import cpw.mods.fml.relauncher.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
public class mcreator_rubineOre {
public mcreator_rubineOre() {
}
public static BlockRubineOre block;
public static Object instance;
public int addFuel(ItemStack fuel) {
return 0;
}
public void serverLoad(FMLServerStartingEvent event) {
}
public void preInit(FMLPreInitializationEvent event) {
GameRegistry.registerBlock(block, "RubineOre");
}
public void registerRenderers() {
}
public void load() {
}
static {
block = (BlockRubineOre) (new BlockRubineOre().setHardness(2.0F).setResistance(10.0F).setLightLevel(0.0F).setBlockName("RubineOre")
.setBlockTextureName("RubineOre").setLightOpacity(0).setStepSound(Block.soundTypeStone).setCreativeTab(CreativeTabs.tabBlock));
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
Block.blockRegistry.addObject(177, "RubineOre", block);
block.setHarvestLevel("pickaxe", 0);
}
public void generateSurface(World world, java.util.Random rand, int chunkX, int chunkZ) {
for (int i = 0; i < 2; i++) {
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(17) + 0;
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mcreator_rubineOre.block, 9)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public void generateNether(World world, Random random, int chunkX, int chunkZ) {
}
static class BlockRubineOre extends Block {
int a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0, a6 = 0;
Random field_149942_b = new Random();
IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null;
boolean red = false;
protected BlockRubineOre() {
super(Material.iron);
}
public void onBlockAdded(World world, int i, int j, int k) {
EntityPlayer entity = Minecraft.getMinecraft().thePlayer;
if (entity != null && world != null) {
int le = MathHelper.floor_double((double) (entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
world.setBlockMetadataWithNotify(i, j, k, le, 2);
}
world.scheduleBlockUpdate(i, j, k, this, this.tickRate(world));
}
public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
return red ? 1 : 0;
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int i, int par2) {
if (i == 0)
return gor;
else if (i == 1)
return dol;
else if (i == 2)
return st1;
else if (i == 3)
return st2;
else if (i == 4)
return st4;
else if (i == 5)
return st3;
else
return gor;
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister reg) {
this.gor = reg.registerIcon("RubineOre");
this.dol = reg.registerIcon("RubineOre");
this.st1 = reg.registerIcon("RubineOre");
this.st2 = reg.registerIcon("RubineOre");
this.st3 = reg.registerIcon("RubineOre");
this.st4 = reg.registerIcon("RubineOre");
}
public int getRenderType() {
return 0;
}
@Override
public int tickRate(World world) {
return 10;
}
public int quantityDropped(Random par1Random) {
return 1;
}
public Item getItemDropped(int par1, Random par2Random, int par3) {
return mcreator_rubine.block;
}
}
}