Jump to content

SeaBass

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by SeaBass

  1. BiomeGenBase biomegenbase = par2World.getWorldChunkManager().getBiomeGenAt(x, z); This gives a whole lot of info, what you want is biomegenbase.biomeName
  2. Did you see my comment before? You can do it with WorldGenMinable.generate, or mimic that with your own WorldGen class. You can also put something like this in the class to make sure it only replaces stone blocks: if (world.getBlockId(i, j, k) == Block.stone.blockID)
  3. I just tested this in my own mod successfully, and generating new blocks is possible through WorldGenerator. You can use the method WorldGenMinable.generate or create your own. Here's some tutorials about that: http://www.minecraftforum.net/topic/1524180-152-popgalops-beginner-advanced-modloader-modding-tutorials-taking-requests/ Specifically the Making Ore Generate and Structure Generation sections. I'm not sure how to have the generate method called after a certain period of time, I'm sure that wouldn't be too hard, but I have tested it successfully through using a custom item.
  4. Havvy's tutorials are for 1.5 and earlier, chances are they wont work for 1.6. Forge is still in development for 1.6, so you may have to wait a while for new tutorials.
  5. Yeah, we did that tonight with the kids, just seeing that they could make a texture and import it in MC, they thought it was the coolest thing! Speaking of: can anyone recommend a good website / book on (basic ) java? Up to date? Other good modding tutorials than Forge's? Thanks. This page has some good stuff for beginners: https://netbeans.org/kb/articles/learn-java.html It's more exciting stuff that Oracle's reference pages for Java.
  6. Oops, the class wasn't being initialized properly. Looks like the code I posted initially works just fine.
  7. Perhaps I'm not registering the icons correctly? Nothing I do there seems to change anything, here's my whole block class: package amanus; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; public class BlockBeehive extends Block { @SideOnly(Side.CLIENT) private Icon iconTop; private Icon iconDefault; public BlockBeehive(int id, Material par2Material) { super(id, par2Material); this.setCreativeTab(Amanus.tabAmanus); } @SideOnly(Side.CLIENT) public Icon getIcon(int side, int meta) { if (meta == 0 && side == 0) return iconTop; else if(meta == 0 && side == 1) return iconTop; else return iconDefault; } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { this.iconTop = par1IconRegister.registerIcon("tree_top"); this.iconDefault = par1IconRegister.registerIcon("tree_spruce"); } }
  8. Wouldn't this add 100 ticks to the potion duration on every single tick? Thus making the effect last 100 times longer than however you had it equipped for? You should try having it check to see if the potion effect is already active before applying it again. Here's the code I used for one of my items: if (!player.isPotionActive(Potion.jump)) { player.addPotionEffect(new PotionEffect(Potion.jump.id, 500, 1)); }
  9. From reading the tutorials, it appeared that this method is used to set textures on different sides, but it doesn't seem to be doing anything in my block class: @SideOnly(Side.CLIENT) public Icon getIcon(int par1, int par2) { return (par1 == 1 || par1 == 0) ? this.hive_top : this.blockIcon; } Other than this, the block is working fine. It doesn't look like this method is being called at all, even when I put errors in, it doesn't change anything.
  10. The code I gave is not for an item texture, it's for an armor texture.
  11. No problem, just override the texture in the item class: @Override public String getArmorTextureFile(ItemStack itemstack) { return "/mods/Amanus/textures/gemArmor.png"; }
  12. Here's the code I use to register armor in Forge: public static Item gemChest = new GemChest(5004, EnumArmorMaterial.IRON, 2, 1).setUnlocalizedName("gemChest"); Registration.itemRegistration(gemChest, "Gem Chest"); public static void itemRegistration(Item par1, String par2) { GameRegistry.registerItem(par1, par2); LanguageRegistry.addName(par1, par2); }
  13. @Override public boolean canPlaceBlockAt(World world, int x, int y, int z) { if(world.getBlockId(x, y-1, z) == MoreDimensions.slimeGrass.blockID) { } else if(world.getBlockId(x, y-1, z) == MoreDimensions.slimeDirt.blockID) { } else { world.setBlockToAir(x, y, z);{return true;} } return true; } This appears to return true in every case. You want code that only returns true for your blocks, and returns false for everything else.
  14. I'm using a block that extends BlockFlower, and I was curious about this, so I tried this code: @Override protected boolean canThisPlantGrowOnThisBlockID(int par1) { return false; } In my understanding, that should mean that it can't be place on any blocks, but even with this code it can still be placed on dirt and grass.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.