How do i change a blocks ID in 1.8

Started by Darealslenderman on Fri, 07/24/2015 - 23:29
Last seen on 05:04, 27. Mar 2017
Joined Aug 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How do i change a blocks ID in 1.8
Fri, 07/24/2015 - 23:29 (edited)

I noticed the ID code for items used this 

static{
block = (new ItemitemCopperIngot01(780));

}

But with blocks there doesnt seem to be a an ID, heres the code Mcreator created but yet its ingame 


import net.minecraftforge.fml.client.registry.*;
import net.minecraftforge.fml.common.*;
import net.minecraftforge.fml.common.asm.*;
import net.minecraftforge.fml.common.asm.transformers.*;
import net.minecraftforge.fml.common.discovery.*;
import net.minecraftforge.fml.common.discovery.asm.*;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.functions.*;
import net.minecraftforge.fml.common.network.*;
import net.minecraftforge.fml.common.registry.*;
import net.minecraftforge.fml.common.toposort.*;
import net.minecraftforge.fml.common.versioning.*;
import net.minecraftforge.fml.relauncher.*;
import net.minecraftforge.fml.server.*;
import net.minecraft.block.*;
import net.minecraft.block.material.*;
import net.minecraft.client.*;
import net.minecraft.client.audio.*;
import net.minecraft.client.entity.*;
import net.minecraft.client.gui.*;
import net.minecraft.client.gui.achievement.*;
import net.minecraft.client.gui.inventory.*;
import net.minecraft.client.model.*;
import net.minecraft.client.multiplayer.*;
import net.minecraft.client.particle.*;
import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.culling.*;
import net.minecraft.client.renderer.entity.*;
import net.minecraft.client.renderer.tileentity.*;
import net.minecraft.client.settings.*;
import net.minecraft.command.*;
import net.minecraft.crash.*;
import net.minecraft.creativetab.*;
import net.minecraft.dispenser.*;
import net.minecraft.enchantment.*;
import net.minecraft.entity.*;
import net.minecraft.entity.ai.*;
import net.minecraft.entity.boss.*;
import net.minecraft.entity.effect.*;
import net.minecraft.entity.item.*;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.*;
import net.minecraft.entity.player.*;
import net.minecraft.entity.projectile.*;
import net.minecraft.inventory.*;
import net.minecraft.item.*;
import net.minecraft.item.crafting.*;
import net.minecraft.nbt.*;
import net.minecraft.network.*;
import net.minecraft.network.rcon.*;
import net.minecraft.pathfinding.*;
import net.minecraft.potion.*;
import net.minecraft.profiler.*;
import net.minecraft.server.*;
import net.minecraft.server.dedicated.*;
import net.minecraft.server.gui.*;
import net.minecraft.server.integrated.*;
import net.minecraft.server.management.*;
import net.minecraft.stats.*;
import net.minecraft.tileentity.*;
import net.minecraft.util.*;
import net.minecraft.village.*;
import net.minecraft.world.*;
import net.minecraft.world.biome.*;
import net.minecraft.world.chunk.*;
import net.minecraft.world.chunk.storage.*;
import net.minecraft.world.demo.*;
import net.minecraft.world.gen.*;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.layer.*;
import net.minecraft.world.gen.structure.*;
import net.minecraft.world.storage.*;
import net.minecraftforge.classloading.*;
import net.minecraftforge.client.*;
import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.sound.*;
import net.minecraftforge.common.*;
import net.minecraftforge.event.*;
import net.minecraftforge.event.entity.*;
import net.minecraftforge.event.entity.item.*;
import net.minecraftforge.event.entity.living.*;
import net.minecraftforge.event.entity.minecart.*;
import net.minecraftforge.event.entity.player.*;
import net.minecraftforge.event.terraingen.*;
import net.minecraftforge.event.world.*;
import net.minecraftforge.oredict.*;
import net.minecraftforge.transformers.*;
import net.minecraft.init.*;
import java.util.*;

import net.minecraftforge.common.util.*;
import net.minecraft.client.renderer.texture.*;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import net.minecraft.client.resources.model.*;
import net.minecraft.block.state.*;
public class mcreator_blockOreCopper01 {

public mcreator_blockOreCopper01(){}

public static BlockBlockOreCopper01 block;

public static Object instance;public int addFuel(ItemStack fuel){return 0;}
public void serverLoad(FMLServerStartingEvent event){}
public void preInit(FMLPreInitializationEvent event){
}
public void registerRenderers(){}
public void load(FMLInitializationEvent event){
if(event.getSide() == Side.CLIENT){
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation("TestEnvironmentMod:BlockOreCopper01", "inventory"));}
}


static{

block = (BlockBlockOreCopper01)(new BlockBlockOreCopper01().setHardness(2.0999999999999996F)
.setResistance(31.0F)
.setLightLevel(0.0F)
.setUnlocalizedName("BlockOreCopper01")
.setLightOpacity(255)
.setStepSound(Block.soundTypeStone)
.setCreativeTab(mcreator_cTNDOres.tab)
);block.setBlockBounds(0.0F,0.0F,0.0F,1.0F,1.0F,1.0F);
block.setHarvestLevel("pickaxe", 1);
}


public void generateSurface(World world, java.util.Random rand, int chunkX, int chunkZ){
for(int i = 0; i < 9; i++){
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(99)+0;
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mcreator_blockOreCopper01.block.getDefaultState(), 11)).generate(world, rand, new BlockPos(randPosX, randPosY, randPosZ));
}
}

public void generateNether(World world, Random random, int chunkX, int chunkZ){}

static{
block = (new BlockBlockOreCopper01(580));

}
static class BlockBlockOreCopper01 extends Block
{

int a1 = 0,a2 = 0,a3 = 0,a4 = 0,a5 = 0,a6 = 0;

boolean red = false;

 

 

protected BlockBlockOreCopper01()
{
        super(Material.rock);

GameRegistry.registerBlock(this, "BlockOreCopper01");

}


public void onBlockAdded(World world, BlockPos pos, IBlockState state){
int i = pos.getX();int j = pos.getY();int k = pos.getZ();world.scheduleUpdate(new BlockPos(i, j, k), this, this.tickRate(world));

}
public int isProvidingStrongPower(IBlockAccess worldIn, BlockPos pos, IBlockState state, EnumFacing side){
return red?1:0;
}
@Override
public int tickRate(World world)
{
    return 10;
}

public int quantityDropped(Random par1Random){
return 1;
}

}
}

Edited by Darealslenderman on Fri, 07/24/2015 - 23:29
Last seen on 02:40, 28. Nov 2015
Joined Aug 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I want to know how to do this
Mon, 09/14/2015 - 22:55

I want to know how to do this too. I can't figure it out. It was possable in the old version.

Last seen on 18:15, 6. Nov 2017
Joined Dec 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Go in preference (upper right
Sun, 01/03/2016 - 03:57

Go in preference (upper right corner), select the tab ''Block/Items ID's''

Last seen on 08:18, 12. Jan 2018
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
static{block = (new
Sun, 01/03/2016 - 05:37

static{
block = (new BlockBlockOreCopper01(580));   Try messing with that number and see what happens (Back up Mod First in case it breaks your mod)

Last seen on 14:35, 19. Jun 2017
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Try this: Go to your
Wed, 01/20/2016 - 17:21

Try this: Go to your preferences and then go to "Starting ID for Items (152+x):" (This should be the 2nd one, I dont have a problem with it so i get mine to just 1 but if you set it to like 100 you shouldnt get and interferance but some massive ids such as music disks and items in other mods you have can take that id so make it higher, if it wont work, well idk :P

Last seen on 14:35, 19. Jun 2017
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
*This also works for blocks,
Wed, 01/20/2016 - 17:22

*This also works for blocks, items, achievements, biomes and mobs. Only mod IDs will change and not vanilla :P*