How do i change a blocks ID in 1.8

6 posts / 0 new
Last post
Offline
Last seen: 7 months 1 day ago
Joined: 08/18/2014 - 21:51
Gems: 0
How do i change a blocks ID in 1.8

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 07/25/2015 - 01:29


ZephaniahNoah's picture
Offline
Last seen: 1 year 11 months ago
Joined: 08/15/2015 - 02:19
Gems: 0
I want to know how to do this

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

Offline
Last seen: 8 months 1 week ago
Joined: 12/23/2014 - 02:26
Gems: 0
Go in preference (upper right

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

Brich036's picture
Offline
Last seen: 9 months 2 weeks ago
Joined: 05/11/2015 - 03:57
Gems: 1
static{block = (new

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

will always keep modding and never forget that :D

TheRockettek's picture
Offline
Last seen: 4 months 6 days ago
Joined: 01/16/2016 - 17:13
Gems: 0
Try this: Go to your

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

Makes good mods but after working on it for 5 days, accidentaly deletes it -,-

TheRockettek's picture
Offline
Last seen: 4 months 6 days ago
Joined: 01/16/2016 - 17:13
Gems: 0
*This also works for blocks,

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

Makes good mods but after working on it for 5 days, accidentaly deletes it -,-