• 0

    posted a message on Simple replace blocks loop
    Quote from Abregado»
    Oneric: I'm going to go through your link to try out modifying the landscape pre-load. I can see that the Block IDs are written to memory directly rather than using setBlock which updates them live.

    I used a case statement so that it strips out plant life, then replaces solid blocks with bedrock and water/lava with obsidian.

    Could you post up your code please? I'm interested to see how you did this since my efforts have been fruitless.
    Posted in: Modification Development
  • 0

    posted a message on Using Ore Dictionary in smelting recipes?
    Quote from wakkytabbakky»

    if you change the item.brewingstand to the modname.ingotname it should search for it remove it then yours should be there


    Items.brewing_stand is an Item. I'm looking for something to do with a string which relates to an OreDict entry. I'm going to try and pass the resultItem.getItem() in RemoveRecipes(ItemStack resultItem) in place of the brewing stand because RemoveRecipe() is called from inside an OreDict iterator anyway (refer to this).

    Posted in: Modification Development
  • 0

    posted a message on Using Ore Dictionary in smelting recipes?
    Quote from TehNut»

    The original mod's smelting recipe takes precedence over yours. Try removing them.


    I have been trying. I found a code snippet on the Forge Forums and added it to my own.

    I call AddRecipes() once all the items and blocks have been registered and have been added to the OreDict.

    Code is on Pastebin because I can't stand code not being formatted on this. Code is here.


    However, this code only seems to go through the vanilla recipes, which isn't what I'm looking for. I'm looking for the entire recipe list after all the other mods recipes have been created.

    Posted in: Modification Development
  • 0

    posted a message on Using Ore Dictionary in smelting recipes?
    Quote from wakkytabbakky»

    one way to make other mods stuff smelt into yours is to remove their recipe and then add yours in with their ore = your ingot


    That's what I'm trying to do. Using OreDict seems like the easier way because if any other new mods come along that use OreDict, my mod will automatically take over it's relevant recipes (which is exactly what I want it to do). I take it you meant code specifically for certain mods when you said "remove their recipe". I just think OreDict will be more functional and will result in less code being written which is in both the developer's and the client's best interests (less code = less effort = smaller jarfile).

    Posted in: Modification Development
  • 0

    posted a message on Using Ore Dictionary in smelting recipes?

    Hello! I'm making a mod which essentially forces the user to only encounter one type of ore in their Minecraft world. Okay, I didn't explain that well. The mod basically converts all the different copper ores, for example, from the other mods installed to it's own generic copper ore. This eliminates the annoyance of having 4 or 5 different stacks of the same material thus saving inventory space. The mod uses the Ore Dictionary to do this.


    What I'm trying to do is to get any copper ore (using the Ore Dictionary) to smelt into my mod's generic ingot.

    This is what I have so far:

     GameRegistry.addSmelting(Some_OreDict_Magic_Goes_Here, new ItemStack(ingotCopper, 1), 0.7f);

    What I want to know is how to use an Ore Dictionary in the input of a smelting recipe. A simple "oreCopper" doesn't work because addSmelting() won't take a String as a first argument.


    Edit:

    So I tried the code below and it added my generic ore to generic ingot recipe but copper ingots from other mods still smelt to their original ingots and not mine. Is there any way to override this?

     for (ItemStack stack : OreDictionary.getOres("oreCopper")) { GameRegistry.addSmelting(stack, new ItemStack(ingotCopper, 1), 0.7f); } 

    For some reason, I can't do new lines in the code tags. Any help with that as well? :)

    Posted in: Modification Development
  • 0

    posted a message on Sudden Bad Login error? [Tekkit][Hexxit][FTB]
    Quote from Sky_Voux»
    Hi, i solved this problem going on server.properties and changing online mode to false

    Quote from xXFoxsterXx»
    wheres server properties?!?!?!?


    Hello, xXFoxsterXx
    Sky_Voux's solution is server-side. The server.properties file is (as the name suggests) a file which holds the server properties, one of which is online-mode.
    Online-mode set to true means that the server will authenticate usernames through the Minecraft official servers.
    Online-mode set to false means that the server doesn't check usernames with the official servers and just lets them in. This is very insecure for the server and allows people to login as the owner and change settings, grief etc.

    Hope I helped you understand :)
    Posted in: Mods Discussion
  • 0

    posted a message on Looking for a modding tutor and possibly collaborator?

    [deleted]

    Posted in: Mods Discussion
  • 0

    posted a message on Looking for a modding tutor and possibly collaborator?

    [deleted]

    Posted in: Mods Discussion
  • 0

    posted a message on Help with NBTTagCompound with Chests?
    Thanks for the quick reply, but as I said in my original post, I have no idea what NBT tags are or what they do. Not even sure why I need them. But I don't know where I would need to put your code.

    Actually, as I was writing this I found the solution (at least, to clear up the error). It was to change this line:

    NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i);


    to this:

    NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
    Posted in: Modification Development
  • 0

    posted a message on Help with NBTTagCompound with Chests?
    I've been following an outdated tutorial on making a chest, fixing the old stuff to the new stuff as I go. One thing I never got my head around was NBT tags. I read up a little but never really understood them. So now I have this is my TileEntityLavaChest class:

     @Override
     public void readFromNBT(NBTTagCompound tagCompound)
     {
     super.readFromNBT(tagCompound);
     NBTTagList tagList = tagCompound.getTagList("Inventory", blockMetadata);
     
     for (int i = 0; i < tagList.tagCount(); i++)
     {
     NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i);
     byte slot = tag.getByte("Slot");
     
     if (slot >= 0 && slot < inv.length)
     {
     inv[slot] = ItemStack.loadItemStackFromNBT(tag);
     }
     }
     }
    

    The line I'm having trouble with is this one:
    NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i);
    Eclipse (my IDE) tells me there is an error with tagAt. When I use the only quick-fix available to me ("add cast to 'tagList'") it changes to this:
    NBTTagCompound tag = (NBTTagCompound) ((Object) tagList).tagAt(i);
    But it still has an error at tagAt. Now Eclipse suggests that I "Change cast of 'tagList'" so when I select that, it highlights the word Object that it added but changes nothing.


    Things I have tried:

    • Changing the word Object that Eclipse added to NBTTagCompound (which is what I think it should be) and removed the other cast (essentially moving around some parenthesis) but I get this: "Cannot cast from NBTTagList to NBTTagCompound" and tagAt has a different error: "The method tagAt(int) is undefined for the type NBTTagCompound".
    • Asking for help from the tutorial creator (no reply yet)

    It is worth noting that I think the tutorial was for 1.6 and I'm developing for 1.7.
    Posted in: Modification Development
  • 0

    posted a message on Integration of my mod into an existing mod?
    I may not have worded my title clearly. Here is the long version of what it means:

    For Example, I want to make a mod which adds another generic machine to, say, Mekanism or Thermal Expansion. Is there a simple way to do this or do I need the source code or an API for it? I am aware that Mekanism and TE are different but Mekanism has managed to integrate it's cables into some other mods to make it work with them.

    So my question is, how would I go about obtaining and using said API if it is required? I use Eclipse to develop mods and have never done anything with somebody else's mod before and I am also a novice modder. (please don't tell me to get better at modding because I just want to play around and see what I can do at this stage)
    Posted in: Modification Development
  • 0

    posted a message on CandyLand (Alpha) (WIP)

    [deleted]

    Posted in: Minecraft Mods
  • 0

    posted a message on CandyLand (Alpha) (WIP)

    [deleted]

    Posted in: Minecraft Mods
  • 0

    posted a message on How can I check what the player is holding?
    Hello. I have a block (BlockCandyBushEmpty) which I want to change to another block (BlockCandyBush) when it's right-clicked with some bonemeal. In my BlockCandyBushEmpty class I have this code:

    public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z)
    {
    if (stack == new ItemStack(Items.dye, 1, 15))
    {
    if(world.getBlock(x, y, z) == this)
    {
    world.setBlock(x, y, z, Main.BlockCandyBush);
    return true;
    }
    else
    {
    return false;
    }
    }
    else
    {
    return false;
    }
    }


    I have no idea if this is correct or not becasue apparently there is no implementation of onItemUse. But what I do know is that it doesn't work. Any help?

    Note: I wrote this code myself, no copy-pasting. That's why I'm really unsure.
    Posted in: Modification Development
  • 0

    posted a message on When I use setBlock, textures don't update?
    Thanks man, that worked, but now my full bush is constantly named Empty Bush, but I think I'll figure that one out soon enough, thanks for your help, I should have looked at the declaration.
    Posted in: Modification Development
  • To post a comment, please or register a new account.