When I tried to make a biome, i got no errors but I haven't found it after looking around for over fifteen minutes. How can I get it to spawn more often? Here's my code:
Hey Techguy! Now.. I'm trying to make a mod that extends the uses for the nether. I've added many things so far(because of you, so thank you), but i was wondering if you knew how to create a biome that will spawn in the nether even if it edits base class files. If you can do this i will greatly appreciate it!
I don't think you can, and if you can, it's very, VERY difficult. The Nether is one and only one biome that has its own generation methods, so I doubt you can.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
Go into EnumToolMaterial study what the numbers do by looking at the comments and make a new material ( you should put the code where it has wood and stone and all that), then change the material of the tools in the mod_** file to the new material.
Keep in mind that this does edit the base class.
Could you explain a little more, I found this confusing. sorry I am really new to making mods for Mc
I don't think you can, and if you can, it's very, VERY difficult. The Nether is one and only one biome that has its own generation methods, so I doubt you can.
When I tried to make a biome, i got no errors but I haven't found it after looking around for over fifteen minutes. How can I get it to spawn more often? Here's my code:
First I don't think you can do all those filler blocks. The filler block is just below grass so they would override each other. I'm not sure how to make it more common though.
P.S. You probably did this but make sure to add ModLoader.addBiome(biomeNameHere); in your mod_
How would I get a block to act like a web and a cactus?
So that it would slow you down while in it, but hurt .5 hearts?
Well, basically you would take the correct code, namely the collision based code and put it into one block, it would look something like this:
package net.minecraft.src;
import java.util.Random;
public class BlockTest extends Block
{
public BlockTest(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_Testing.nameHere.blockID;
}
public boolean isOpaqueCube()
{
return false;
}
public int quantityDropped(Random random)
{
return 1;
}
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
par5Entity.setInWeb();
par5Entity.attackEntityFrom(DamageSource.cactus, 1);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
}
Well, basically you would take the correct code, namely the collision based code and put it into one block, it would look something like this:
package net.minecraft.src;
import java.util.Random;
public class BlockTest extends Block
{
public BlockTest(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_Testing.nameHere.blockID;
}
public boolean isOpaqueCube()
{
return false;
}
public int quantityDropped(Random random)
{
return 1;
}
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
par5Entity.setInWeb();
par5Entity.attackEntityFrom(DamageSource.cactus, 1);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
}
It doesn't seem to hurt the player, just get them stuck in it.
package net.minecraft.src;
import java.util.Random;
public class BlockBramble extends Block
{
public BlockBramble(int i, int j)
{
super(i, j, Material.wood);
this.setCreativeTab(CreativeTabs.tabBlock);
}
public Block idDropped1(int i, Random random, int j)
{
return mod_BlockBramble.blockBramble;
}
public boolean isOpaqueCube()
{
return false;
}
public int quantityDropped(Random random)
{
return 1;
}
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
par5Entity.setInWeb();
par5Entity.attackEntityFrom(DamageSource.cactus, .5);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
}
package net.minecraft.src;
import java.util.Random;
public class BlockBramble extends Block
{
public BlockBramble(int i, int j)
{
super(i, j, Material.wood);
this.setCreativeTab(CreativeTabs.tabBlock);
}
public Block idDropped1(int i, Random random, int j)
{
return mod_BlockBramble.blockBramble;
}
public boolean isOpaqueCube()
{
return false;
}
public int quantityDropped(Random random)
{
return 1;
}
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
par5Entity.setInWeb();
par5Entity.attackEntityFrom(DamageSource.cactus, .5);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
}
You can't do .5 damage, half a heart is 1, and that is the smallest increment you can use
Edit: If you want to reduce the amount of damage it deals you can do something like this:
package net.minecraft.src;
import java.util.Random;
public class BlockTest extends Block
{
int isJustHit = 0;
public BlockTest(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_Testing.nameHere.blockID;
}
public boolean isOpaqueCube()
{
return false;
}
public int quantityDropped(Random random)
{
return 1;
}
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
par5Entity.setInWeb();
if (isJustHit == 0)
{
par5Entity.attackEntityFrom(DamageSource.cactus, 1);
isJustHit = 1;
}
else
{
isJustHit ++;
}
if (isJustHit > 100)
{
isJustHit = 0;
}
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
}
and then you adjust the 100 in the 'if (isJustHit > 100)' line, smaller for faster damage, larger for slower damage.
The topic has now been unlocked at TechGuy's request. You're now free to post. Keep in mind that TechGuy is very busy and probably won't have time to help all of you out personally. The more-skilled of you will have to help each other for now, if you're up to it.
package net.minecraft.src; public class BiomeGenOres extends BiomeGenBase { public BiomeGenOres(int par1) { super(par1); spawnableCreatureList.clear(); spawnableWaterCreatureList.clear(); this.spawnableMonsterList.add(new SpawnListEntry(EntityDevil.class, 8, 4, 8)); topBlock = (byte)Block.blockSteel.blockID; fillerBlock = (byte)Block.blockGold.blockID; fillerBlock = (byte)Block.blockLapis.blockID; fillerBlock = (byte)Block.blockDiamond.blockID; fillerBlock = (byte)mod_MoSwords.rubyBlock.blockID; fillerBlock = (byte)mod_MoSwords.netherBlock.blockID; fillerBlock = (byte)Block.blockEmerald.blockID; } }-
View User Profile
-
View Posts
-
Send Message
Retired StaffI don't think you can, and if you can, it's very, VERY difficult. The Nether is one and only one biome that has its own generation methods, so I doubt you can.
Could you explain a little more, I found this confusing. sorry I am really new to making mods for Mc
package net.minecraft.src; public class BlockBramble extends BaseMod { public static final Block bramble = new BlockBramble(160, 0).setBlockBramble("Bramble").setHardness(3F).setResistance(4F).setLightValue(0F).setCreativeTab(CreativeTabs.tabBlock).setStepSound(Block.soundGrassFootstep); public void load() { bramble.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Bramble.png"); ModLoader.registerBlock(bramble); ModLoader.addName(bramble, "Bramble"); ModLoader.addRecipe(new ItemStack(bramble, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt}); } public String getVersion() { return "1.4.4"; } }It says the method setBlockBramble(String) is undefined, and the constructor BlockBramble(int, int) is also undefined.
I dare you to click it.
have you made the
BlockBramble.java?
Yes.
I dare you to click it.
I'd post that as well
here is the problem I believe
make sure you don't mess up with capitals and such.
Ah, found the problem.
Thanks.
I dare you to click it.
Ahh..
So that it would slow you down while in it, but hurt .5 hearts?
I dare you to click it.
First I don't think you can do all those filler blocks. The filler block is just below grass so they would override each other. I'm not sure how to make it more common though.
P.S. You probably did this but make sure to add ModLoader.addBiome(biomeNameHere); in your mod_
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWell, basically you would take the correct code, namely the collision based code and put it into one block, it would look something like this:
package net.minecraft.src; import java.util.Random; public class BlockTest extends Block { public BlockTest(int i, int j) { super(i, j, Material.wood); } public int idDropped(int i, Random random, int j) { return mod_Testing.nameHere.blockID; } public boolean isOpaqueCube() { return false; } public int quantityDropped(Random random) { return 1; } public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { par5Entity.setInWeb(); par5Entity.attackEntityFrom(DamageSource.cactus, 1); } public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { return null; } }It doesn't seem to hurt the player, just get them stuck in it.
I dare you to click it.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIt works for me... Um, are you in creative?
No.
This is my coding if it's needed:
package net.minecraft.src; import java.util.Random; public class BlockBramble extends Block { public BlockBramble(int i, int j) { super(i, j, Material.wood); this.setCreativeTab(CreativeTabs.tabBlock); } public Block idDropped1(int i, Random random, int j) { return mod_BlockBramble.blockBramble; } public boolean isOpaqueCube() { return false; } public int quantityDropped(Random random) { return 1; } public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { par5Entity.setInWeb(); par5Entity.attackEntityFrom(DamageSource.cactus, .5); } public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { return null; } }I dare you to click it.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou can't do .5 damage, half a heart is 1, and that is the smallest increment you can use
Edit: If you want to reduce the amount of damage it deals you can do something like this:
package net.minecraft.src; import java.util.Random; public class BlockTest extends Block { int isJustHit = 0; public BlockTest(int i, int j) { super(i, j, Material.wood); } public int idDropped(int i, Random random, int j) { return mod_Testing.nameHere.blockID; } public boolean isOpaqueCube() { return false; } public int quantityDropped(Random random) { return 1; } public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { par5Entity.setInWeb(); if (isJustHit == 0) { par5Entity.attackEntityFrom(DamageSource.cactus, 1); isJustHit = 1; } else { isJustHit ++; } if (isJustHit > 100) { isJustHit = 0; } } public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { return null; } }-
View User Profile
-
View Posts
-
Send Message
Retired Staffthats all just wanted to know ps