• 0

    posted a message on Alternative stone generation
    I remember I once played a bit with this line:

    Quote from EdocsilShadesoul

    (new WorldGenMinable(stone6.blockID, 20)).generate(world, random, randPosX, randPosY, randPosZ);



    I made that 20 a 10000, yes it works, and it makes EVERYTHING on the layers it is specified to generate the block you stated in there.

    Try that out.
    Posted in: Modification Development
  • 0

    posted a message on how do i add a chat message to my custom mob?
    Quote from the_slayer98

    thats exactly what i want to know when you say 'onUpdate method' what do you mean?

    Is it on the base class?
    package TheSoulEater;
    import The_Slayer.The_Slayer;
    import net.minecraft.block.Block;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.EntityEggInfo;
    import net.minecraft.entity.EntityList;
    import net.minecraft.entity.EnumCreatureType;
    import net.minecraft.item.EnumArmorMaterial;
    import net.minecraft.item.EnumToolMaterial;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemSeeds;
    import net.minecraft.item.ItemStack;
    import net.minecraft.src.ModLoader;
    import net.minecraft.world.biome.BiomeGenBase;
    import net.minecraftforge.common.EnumHelper;
    import cpw.mods.fml.common.Mod;
    import cpw.mods.fml.common.Mod.Init;
    import cpw.mods.fml.common.SidedProxy;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    import cpw.mods.fml.common.network.NetworkMod;
    import cpw.mods.fml.common.registry.EntityRegistry;
    import cpw.mods.fml.common.registry.GameRegistry;
    import cpw.mods.fml.common.registry.LanguageRegistry;
    
    @Mod(modid = "TheSoulEater", name = "TheSoulEater", version = "1.0.0 MC 1.5.1")
    @NetworkMod(clientSideRequired = true, serverSideRequired = false)
    public class TheSoulEater
    {
    @SidedProxy(clientSide = "TheSoulEater.CommonProxy", serverSide = "TheSoulEater.ClientProxy")
    public static CommonProxy proxy;
    
    static int startEntityId = 350;
    
    public static EnumToolMaterial EnumToolMaterialSoul = EnumHelper.addToolMaterial("Soul", 4, 2500, 40.0F, 3, 14);
    public static EnumArmorMaterial SOUL = EnumHelper.addArmorMaterial("SOUL", 50, new int[]{3, 6, 6, 5}, 12);
    
    public static Item BlackSoul;
    public static Item SoulSword;
    public static Item SoulDust;
    
    public static Item helmetSoul = new SoulArmor (4500, SOUL, ModLoader.addArmor("Soul"), 0, "SoulHelmet").setUnlocalizedName("SoulHelmet").setCreativeTab(CreativeTabs.tabCombat);
    public static Item chestSoul = new SoulArmor(4501, SOUL, ModLoader.addArmor("Soul"), 1, "SoulChest").setUnlocalizedName("SoulChest").setCreativeTab(CreativeTabs.tabCombat);
    public static Item leggingsSoul = new SoulArmor(4502, SOUL, ModLoader.addArmor("Soul"), 2, "SoulLeggings").setUnlocalizedName("SoulLeggings").setCreativeTab(CreativeTabs.tabCombat);
    public static Item bootsSoul = new SoulArmor(4503, SOUL, ModLoader.addArmor("Soul"), 3, "SoulBoots").setUnlocalizedName("SoulBoots").setCreativeTab(CreativeTabs.tabCombat);
    
    @Init
    public void load(FMLInitializationEvent event)
    {
    LanguageRegistry.addName(helmetSoul, "Soul Hat");
    LanguageRegistry.addName(chestSoul, "Soul Cloak");
    LanguageRegistry.addName(leggingsSoul, "Soul Pants");
    LanguageRegistry.addName(bootsSoul, "Soul Shoes");
    
    
    EntityRegistry.registerModEntity(EntityTheSoulEater.class, "TheSoulEater", 1, this, 80, 3, true);
    EntityRegistry.addSpawn(EntityTheSoulEater.class, 3, 1, 1, EnumCreatureType.monster, BiomeGenBase.extremeHills, BiomeGenBase.plains, BiomeGenBase.desert, BiomeGenBase.jungle, BiomeGenBase.iceMountains, BiomeGenBase.swampland, BiomeGenBase.taiga, BiomeGenBase.hell,
    BiomeGenBase.desertHills, BiomeGenBase.taigaHills, BiomeGenBase.icePlains, BiomeGenBase.frozenRiver, BiomeGenBase.mushroomIsland, The_Slayer.FlatLandBiome);
    LanguageRegistry.instance().addStringLocalization("entity.TheSoulEater.TheSoulEater.name", "The Soul Eater");
    
    proxy.registerRenderThings();
    
    registerEntityEgg(EntityTheSoulEater.class, 0x000000, 0x260063);
    }
    
    public static int getUniqueEntityId()
    {
    do
    {
    startEntityId++;
    }
    while (EntityList.getStringFromID(startEntityId) != null);
    
    return startEntityId;
    }
    
    
    
    public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor)
    {
    int id = getUniqueEntityId();
    EntityList.IDtoClassMapping.put(id, entity);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
    
    {
    BlackSoul = new ItemBlackSoul(4504, "BlackSoul").setUnlocalizedName("BlackSoul").setCreativeTab(CreativeTabs.tabMaterials);
    GameRegistry.registerItem(BlackSoul, "BlackSoul");
    LanguageRegistry.addName(BlackSoul, "Black Soul");
    
    SoulSword = new ItemSoulSword(3505, EnumToolMaterialSoul, "SoulSword").setUnlocalizedName("SoulSword").setCreativeTab(CreativeTabs.tabCombat);
    LanguageRegistry.addName(SoulSword, "Soul Sword");
    }
    
    SoulDust = new ItemSoulDust(4506, "SoulDust").setUnlocalizedName("SoulDust").setCreativeTab(CreativeTabs.tabMaterials);
    GameRegistry.registerItem(SoulDust, "SoulDust");
    LanguageRegistry.addName(SoulDust, "Soul Dust");
    
    GameRegistry.addRecipe(new ItemStack(TheSoulEater.helmetSoul, 1), new Object[]{
    "SDS", "S S", " ", 'S', TheSoulEater.BlackSoul, 'D', Item.diamond,
    });
    
    GameRegistry.addRecipe(new ItemStack(TheSoulEater.bootsSoul, 1), new Object[]{
    " ", "S S", "D D", 'S', TheSoulEater.BlackSoul, 'D', Item.diamond,
    });
    
    GameRegistry.addRecipe(new ItemStack(TheSoulEater.chestSoul, 1), new Object[]{
    "S S", "SDS", "SSS", 'S', TheSoulEater.BlackSoul, 'D', Item.diamond,
    });
    
    GameRegistry.addRecipe(new ItemStack(TheSoulEater.leggingsSoul, 1), new Object[]{
    "SDS", "S S", "S S", 'S', TheSoulEater.BlackSoul, 'D', Item.diamond,
    });
    
    GameRegistry.addRecipe(new ItemStack(TheSoulEater.SoulSword, 1), new Object[]{
    " S ", "DSD", " E ", 'S', TheSoulEater.BlackSoul, 'D', Item.diamond, 'E', TheSoulEater.SoulDust,
    });
    
    GameRegistry.addRecipe(new ItemStack(TheSoulEater.SoulDust, 1), new Object[]{
    " ", " S ", " ", 'S', TheSoulEater.BlackSoul,
    });
    }
    }



    No &lt;_&lt;

    He is refering to the method used in on entities such as zombies and skeletons to make them burn in daylight.

    So, why don't you take a bit of your time to figure out how this:


    Quote from Lolcroc

    Don't use Minecraft.getMinecraft().thePlayer unless you're on the client; it will crash on the server. Instead, set up a collision box and check the entities. If one of them is a player, send out a chat message:
    //This goes in the onupdate method
    AxisAlignedBB var3 = this.boundingBox.expand(10.0D, 10.0D, 10.0D);
    List var4 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, var3);
    
    if (var4 != null && !var4.isEmpty()) {
    Iterator var5 = var4.iterator();
    
    while (var5.hasNext()) {
    EntityPlayer var6 = (EntityPlayer)var5.next();
    double var7 = this.getDistanceSqToEntity(var6);
    
    if (var7 < 10.0D)
    {
    //Add chat message
    }
    }
    }



    Goes with onUpdate method.

    Sincerely, if you can't figure that out, I highly recommend learning basic java.
    Posted in: Modification Development
  • 0

    posted a message on Spawn Entities in Randomly Generated Structures?
    As many of my problems, I end up solving them myself. &lt;_&lt;

    Well, the solution was simple. I just made a block generate inside the house

    Used the method

    onBlockAdded()
    {
    }


    Then use the code that turns ice into air in the nether for it to vanish.
    And use the code for Silverfish to spawn from stone bricks also.

    That's the solution if anyone needs it.
    Posted in: Modification Development
  • 0

    posted a message on Spawn Entities in Randomly Generated Structures?
    Bump.
    Posted in: Modification Development
  • 0

    posted a message on Spawn Entities in Randomly Generated Structures?
    Hello, I made a simple WorldGenerator for a house, but I was wondering how to make a mob spawn in it.

    Anyone has any idea on how to do this?

    I checked the villagers code in their houses gen, but they are just components for bigger structures...

    And those bigger structures don't extend WorldGenerator, but StructureComponent.

    Which Forge is unable to register...

    So anyone has any idea on this?

    EDIT**

    I've been trying to make a block that generates also inside the houses, and after 1 tick it would dissapear and spawn a zombie where it was. But, I cannot get updateTicks() to help me on this one.

    So I am clueless now... help?
    Posted in: Modification Development
  • 0

    posted a message on Custom map Soudi [ Aribec]
    Quote from xiKasperxGamer

    السلام عليكم كيف حالكم ان شاء الله طيبين اقدم لكم كستم ماب الجزر الطائرةة بتصميم عربي او سعودي
    فديو


    للتحميل

    http://arabsh.com/fi...xgamer-rar.html



    اتمنى انهه يلعبه فراس قيمر .. ولو شفةة الموضوع ي فراس ي ليت تضيفني سكايب faisaldub1
    عندي شي مهم ...
    ومع السلامةة

    معليش غلطةة باسم في الموضوع الترجمةة سعودي


    Wrong Section.

    English Only...
    Posted in: Modification Development
  • 0

    posted a message on Texture is not working, I don't see why!
    Quote from thejester118

    The spoiler did not show!??!?!!

    How do I fix it!?!?!!?!?!?!?


    Use Forge dude... Modloader has been a pain lately and many of the current mods use Forge.

    With Forge, many base classes dont have to be touched also.
    Posted in: Modification Development
  • 0

    posted a message on New way to add textures?
    Quote from dani_killer89

    @Override
    public void func_94332_a(IconRegister iconReg) {
    this.field_94336_cN = iconReg.func_94245_a("Power:greenore");
    }


    That method is outdated for 1.5.1, this one works:

    @SideOnly(Side.CLIENT)
        public void updateIcons(IconRegister par1IconRegister)
        {
    	    this.icon = par1IconRegister.registerIcon("testmod:Item");
        }
    Posted in: Modification Development
  • 0

    posted a message on Texturing with forge 1.5.1
    Everything is fine, but this...


    Quote from the_slayer98


    @SideOnly(Side.CLIENT)
    public void func_94581_a(IconRegister par1IconRegister)
    {
    this.icon = par1IconRegister.func_94245_a(this.iconPath); //THIS IS WHERE THE ERROR IS
    }

    [/CODE]


    That method ("func_94245_a") is only for 1.5 , you may wanna change it to this...

    [code]@SideOnly(Side.CLIENT) public void updateIcons(IconRegister par1IconRegister) { this.icon = par1IconRegister.registerIcon("mod/ + this.iconPath"); }[/code]

    I am assuming you have a mod folder in your minecraft.jar with the textures

    If you dont, just change this to a directory of your choice

    [code]this.icon = par1IconRegister.registerIcon("DIRECTORY HERE");[/code]

    Example:

    [code]this.icon = par1IconRegister.registerIcon("/mods/testmod/textures/items/GreenStoneIngot.png");[/code]

    Hope it helped.
    Posted in: Modification Development
  • 0

    posted a message on [Forge] Texturing not working
    Quote from nexuss1

    I have attempted several times to texture my file, to no avail. What am I doing wrong?

    ItemFireSword.java
    package mod.myMod;
    
    import net.minecraft.client.renderer.texture.IconRegister;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.Item;
    
    public class ItemFireSword extends Item {
    
    public ItemFireSword(int id) {
    super(id);
    setMaxStackSize(64);
    setCreativeTab(CreativeTabs.tabCombat);
    setUnlocalizedName("FireSword");
    }
    
    public void func_94581_a(IconRegister iconRegister)
    {
    iconIndex = iconRegister.func_94245_a("myMod:FireSword");
    }
    }

    ClientProxy.java
    package mod.myMod.client;
    
    import net.minecraftforge.client.MinecraftForgeClient;
    import mod.myMod.CommonProxy;
    
    public class ClientProxy extends CommonProxy {
    
    @Override
    public void registerRenderers() {
    MinecraftForgeClient.preloadTexture(ItemFireSword);
    
    }
    
    }

    CommonProxy.java
    package mod.myMod;
    
    public class CommonProxy {
    public static String ItemFireSword = "/myMod/textures/items/FireSword.png";
    
    // Client stuff
    public void registerRenderers() {
    // Nothing here as the server doesn't render graphics!
    }
    }

    Texture is located at:
    mcp742/jars/mods/myMod/textures/items/FireSword.png

    I also tried:
    mcp742/eclipse/Minecraft/bin/myMod/textures/items/FireSword.png

    When I run the game, I just get a white square with "missing texture" inside of it.



    Hmm, how about we try making an iconPath method?

    So it looks like this?

    package mod.myMod;
    import net.minecraft.client.renderer.texture.IconRegister;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.Item;
    public class ItemFireSword extends Item {
    	
    private String iconPath;
    
    @SideOnly(Side.CLIENT)
    private Icon icon;
    
    public ItemFireSword(int id) {
    super(id);
    setMaxStackSize(64);
    setCreativeTab(CreativeTabs.tabCombat);
    setUnlocalizedName("FireSword");
    }
    
    @SideOnly(Side.CLIENT)
    public void func_94581_a(IconRegister par1IconRegister)
    {
    this.icon = par1IconRegister.func_94245_a("myMod:FireSword");
    }
    
    @SideOnly(Side.CLIENT)
    public Icon getIconFromDamage(int par1)
    {
    return this.icon;
    }
    }


    Try that out and tell me how it did. B)
    Posted in: Modification Development
  • 0

    posted a message on FORGE 1.5 Block Icon Index?
    Quote from deathman12e3

    In Forge 1.5, how do I set a block's icon index?


    Sprite sheets aren't used anymore.

    Blocks and Items use individual 16x16 textures files.

    Google some tutorials for it.
    Posted in: Modification Development
  • 0

    posted a message on Missing return statement
    Quote from marvelpwn802

    I am trying to use MCP with Minecraft 1.5, but every time I try to decompile it gives me this:

    == ERRORS FOUND ==
    src/minecraft/net/minecraft/src/RenderBlocks.java:4960: missing return statement
    }
    ^
    1 error


    I have force updated, and I have ModLoader 1.5.1 in my minecraft.jar.


    Try backing up your code, and run cleanup.bat.

    That's how I have fixed mine plenty of times.
    Posted in: Modification Development
  • 0

    posted a message on (HELP!)Grenades[1.6.2]MCP ModLoader and FORGE[GUN: SOLVED]
    Quote from kaikaii99

    He's just asked for help because maybe he doesn't know how minecraft code works...
    Give him the answer instead of telling him to give up on his mod.


    There are plenty of tutorials for getting the job done.

    He can easily take 1 hour to understand how to make it work.

    But no, he is just asking how to do everything.

    So, maybe if he made the code already with one of those tutorials, and something is giving him errors. It would be acceptable asking for help here.
    Posted in: Modification Development
  • 0

    posted a message on [1.5]Forge Need help with Ore generation PLEASE!
    Quote from mrgreen33gamer

    I need some help with generating custom ores i have make the ores but i don't know how to make them generate

    I have already looked it up on Google and now i need help from a professional.

    PLEASE leave a comment

    THANKS YOU!


    Did you looked everywhere? even in the wiki? I think not...

    http://www.minecraftforge.net/wiki/Tutorials/Ore_Generation
    Posted in: Modification Development
  • 0

    posted a message on (HELP!)Grenades[1.6.2]MCP ModLoader and FORGE[GUN: SOLVED]
    Quote from mrgreen33gamer

    Ya but it's not that easy


    Coding ain't easy, go figure out yourself.

    If you can't the coding isn't your thing.

    No one is spoonfeeding others here.
    Posted in: Modification Development
  • To post a comment, please or register a new account.