However, the Glacier Ice is registered correctly, I believe. It shows up in-game and in my custom creative tab too. But it doesn't work when put as a topBlock in the BiomeGen file:
// This Is My Package Declaration And Everything Applies To Before With This
package fisherman77.glacierice.common.gen;
// You Don't Need This If You Have package net.minecraft.src;
import fisherman77.glacierice.common.GlacierIce;
import net.minecraft.block.Block;
import net.minecraft.src.*;
import net.minecraft.world.biome.BiomeGenBase;
public class BiomeGenGlacier extends BiomeGenBase{
public BiomeGenGlacier(int id){
super(id);
// This Is The Top Five Or So Blocks, Remember The Java Byte Rule: No Byte Is Above 127
topBlock = (byte)GlacierIce.BlueGlacierIce.blockID;
// This Is The Rest Of The Blocks, Again The Java Byte Rule
fillerBlock = (byte)Block.ice.blockID;
theBiomeDecorator.treesPerChunk = 0;
theBiomeDecorator.deadBushPerChunk = 0;
theBiomeDecorator.reedsPerChunk = 0;
theBiomeDecorator.cactiPerChunk = 0;
waterColorMultiplier = 0x242424;
}
}
Hello! First of all sorry for my bad English (I'm from Spain). I just solved the error few mitunes ago :3. Let me explain how solved this problem.
1.- You have to put your id block under "127" (I think so): Try typing "106".
2.- You must register your block BEFORE the Init method.
3.- I leave my "mod_mainclass" here so you can see what I mean.
public class mod_FoodPlus extends BaseMod{
public static Item applecakeslice;
public static Item coockedcarrot;
public static Item stew;
public static final Block saltblock = new saltblock(159).setHardness(1.0F).setResistance(2.0F).setUnlocalizedName("saltblock");
public static final BiomeGenBase SaltBiome = (new biomeGenSalt(25)).setBiomeName("SaltBiome");
@Init
public void load() {
YOURCODE
}
}
close. On the topic of #1, it can be up to 256, just as long as the ids inst occupied
THANK YOU so much for posting this. I was looking ALL AROUND the web and could not find a single thing about why this wasn't working! It makes sense I suppose since a byte can't hold that much data. I finally got my custom blocks to spawn in. Thank you so much.
And here is how I declared my block in my main mod file:
And how I declared my biome:
And then I registered it in my CommonProxy (called up a method in the core GlacierIce.java file):
However, the Glacier Ice is registered correctly, I believe. It shows up in-game and in my custom creative tab too. But it doesn't work when put as a topBlock in the BiomeGen file:
close. On the topic of #1, it can be up to 256, just as long as the ids inst occupied
insert witty signature here