Jump to content

PeterRDevries

Forge Modder
  • Posts

    169
  • Joined

  • Last visited

Everything posted by PeterRDevries

  1. They use color multiplier and a second texture to overlay, like the leather knees just keep the same leather color.
  2. So i'm trying to overlay 2 textures i've looked at how minecraft did it with leather armor but i just can't find out how they did it. please help
  3. Yes that was what i'm looking for thanks
  4. I thank you sir ^^
  5. Nothing seems to generate now. public WorldGeneratorTrees() { GameRegistry.registerWorldGenerator(this); } @SuppressWarnings("static-access") @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { if(!(world.getWorldInfo().getTerrainType() == world.getWorldInfo().getTerrainType().FLAT)){ generateBigTree(world, random, chunkX, chunkZ); generateAltar(world, random, chunkX, chunkZ); generateOtherTree(world, random, chunkX, chunkZ); for(int i = 0; i < 15; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); new WorldGenTeak().generate(world, random, x, y, z); } for(int i = 0; i < 15; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); new WorldGenHollow().generate(world, random, x, y, z); } for(int i = 0; i < 15; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); new WorldGenWillow().generate(world, random, x, y, z); } } } public static void generateAltar(World world, Random random, int chunkX, int chunkZ) { for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); new EssenceMine().generate(world, random, x, y, z); } for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); new WorldGenAltarAir().generate(world, random, x, y, z); } } public static void generateOtherTree(World world, Random random, int chunkX, int chunkZ) { for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); new WorldGenTeak().generate(world, random, x, y, z); } for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); new WorldGenHollow().generate(world, random, x, y, z); } for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); new WorldGenWillow().generate(world, random, x, y, z); } } public static void generateBigTree(World world, Random random, int chunkX, int chunkZ) { //normaal for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); new WorldGenTree(false, 5, 0, 0, false, WoodCutting.woodcuttingleaves.blockID, WoodCutting.woodcuttinglog.blockID).generate(world, random, x, y, z); } //oak for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); int meta = 2; new WorldGenBigTree(true, WoodCutting.woodcuttinglog.blockID, meta, WoodCutting.woodcuttingleaves.blockID, meta).generate(world, random, x, y, z); } //yew for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); int meta = 9; new WorldGenBigTree(true, WoodCutting.woodcuttinglog.blockID, meta, WoodCutting.woodcuttingleaves.blockID, meta).generate(world, random, x, y, z); } //mahogany for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); int meta = 7; new WorldGenBigTree(true, WoodCutting.woodcuttinglog.blockID, meta, WoodCutting.woodcuttingleaves.blockID, meta).generate(world, random, x, y, z); } //maple for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(16); int z = chunkZ + random.nextInt(16); int y = world.getHeightValue(x, z); int meta = 5; new WorldGenBigTree(true, WoodCutting.woodcuttinglog.blockID, meta, WoodCutting.woodcuttingleaves.blockID, meta).generate(world, random, x, y, z); } } } on the models so they should spawn normally protected int[] GetValidSpawnBlocks() { return new int[] { Block.grass.blockID, Block.dirt.blockID }; }
  6. Seems like a kinda promising api i've seen some apis that export .obj to java but i don't know if i could use that in minecraft.
  7. So i've seen a few mods that use blender models in minecraft. but I can't seem to find any tutorials on how to use blender models for minecraft and I really don't know how I should do this myself. Sorry for asking so much :3 thanks stijnhero
  8. Okay well thanks i'll change all the values to 16 to test it again hold on
  9. So this is my world gen everything seems to look fine but it doenst work it generates altars trees and such but it only generates them in deserts. When it does generates it generates around 10 trees perchuck and i can't seem to find out what i'm doing wrong help please import java.util.Random; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.registry.GameRegistry; public class WorldGeneratorTrees implements IWorldGenerator { public WorldGeneratorTrees() { GameRegistry.registerWorldGenerator(this); } @SuppressWarnings("static-access") @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { if(!(world.getWorldInfo().getTerrainType() == world.getWorldInfo().getTerrainType().FLAT)){ generateBigTree(world, random, chunkX, chunkZ); generateAltar(world, random, chunkX, chunkZ); generateOtherTree(world, random, chunkX, chunkZ); for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); int y = world.getHeightValue(x, z); new WorldGenTeak().generate(world, random, x, y, z); } for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); int y = world.getHeightValue(x, z); new WorldGenHollow().generate(world, random, x, y, z); } for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); int y = world.getHeightValue(x, z); new WorldGenWillow().generate(world, random, x, y, z); } } } public static void generateAltar(World world, Random random, int chunkX, int chunkZ) { for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); int y = world.getHeightValue(x, z); new EssenceMine().generate(world, random, x, y, z); } for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(128); int z = chunkZ + random.nextInt(128); int y = world.getHeightValue(x, z); new WorldGenAltarAir().generate(world, random, x, y, z); } } public static void generateOtherTree(World world, Random random, int chunkX, int chunkZ) { for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); int y = world.getHeightValue(x, z); new WorldGenTeak().generate(world, random, x, y, z); } for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); int y = world.getHeightValue(x, z); new WorldGenHollow().generate(world, random, x, y, z); } for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); int y = world.getHeightValue(x, z); new WorldGenWillow().generate(world, random, x, y, z); } } public static void generateBigTree(World world, Random random, int chunkX, int chunkZ) { //normaal for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(128); int z = chunkZ + random.nextInt(128); int y = world.getHeightValue(x, z); new WorldGenTree(false, 5, 0, 0, false, WoodCutting.woodcuttingleaves.blockID, WoodCutting.woodcuttinglog.blockID).generate(world, random, x, y, z); } //oak for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(64); int z = chunkZ + random.nextInt(64); int y = world.getHeightValue(x, z); int meta = 2; new WorldGenBigTree(true, WoodCutting.woodcuttinglog.blockID, meta, WoodCutting.woodcuttingleaves.blockID, meta).generate(world, random, x, y, z); } //yew for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(128); int z = chunkZ + random.nextInt(128); int y = world.getHeightValue(x, z); int meta = 9; new WorldGenBigTree(true, WoodCutting.woodcuttinglog.blockID, meta, WoodCutting.woodcuttingleaves.blockID, meta).generate(world, random, x, y, z); } //mahogany for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); int y = world.getHeightValue(x, z); int meta = 7; new WorldGenBigTree(true, WoodCutting.woodcuttinglog.blockID, meta, WoodCutting.woodcuttingleaves.blockID, meta).generate(world, random, x, y, z); } //maple for(int i = 0; i < 1; i++){ int x = chunkX + random.nextInt(32); int z = chunkZ + random.nextInt(32); int y = world.getHeightValue(x, z); int meta = 5; new WorldGenBigTree(true, WoodCutting.woodcuttinglog.blockID, meta, WoodCutting.woodcuttingleaves.blockID, meta).generate(world, random, x, y, z); } } }
  10. Please look at the forge method files next time. onItemUseFinish Used for when item use count runs out, ie: eating completed
  11. Okay I see I thank you all for the help and I'll take a look into it! I couldn't find that armor tutorial because I googled on custom 3d armor models ^^ but I've got it now
  12. I want to add custom rendered armor so thats why i'm extending item not itemarmor. and using isvalidarmor, but i cant seem to get isvalidarmor to work so i can equip my item.
  13. I don't have anycode only the item code: public class ItemCoal extends Item { private static int armorType = 0; public ItemCoal(int par1) { super(par1); this.setCreativeTab(Main.tab...); this.setUnlocalizedName(Mining.ITEM_COAL_NAME_UN); } @Override public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) { ?? } @SideOnly(Side.CLIENT) private Icon icon; @SideOnly(Side.CLIENT) @Override public void registerIcons(IconRegister par1IconRegister) { itemIcon = par1IconRegister.registerIcon(Icons.getIcon("coal")); } } sorry the code tag isn't working for me somehow
  14. Hey, so i've been stuck on this problem for a couple of hours now. I have my item and I'm trying to get it rendered as a block on the players head. And I just can't seem to get the isvalidarmor to work this question may seem kinda basic but I do really need your help, whatever I try I can't seem to get it to work. public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) { } Thanks greetings stijnhero
×
×
  • Create New...

Important Information

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