• 0

    posted a message on Check if a play right clicks with an item
    Thank you so much! The solution for everyone else, it's onItemRightClick
    Posted in: Modification Development
  • 0

    posted a message on Check if a play right clicks with an item
    Hi guys! This may be a stupid question, but what is the method that is used to check if a play right clicks with an item? I realize onItemUse checks that, but only if you right click a block. Is there a method to check if you right click anywhere, not necessarily on a block? Thanks!
    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace GUI not opening
    Quote from Aft

    add this if instead of the old one:
    if(!world.isRemote)
    return true;
    
    if(var10 == null)
    return false;
    
    ModLoader.openGUI(par5EntityPlayer, new GuiCoalgem(par5EntityPlayer.inventory, var10));
    return true;



    I used your code, and the GUI opens. However, when trying to move stacks of blocks, they just snap back into place. I don't know where that problem could come from, does anyone know?

    Thank you, by the way.
    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace GUI not opening
    Quote from Kalvin

    Have you tried to see what heppens when you remove the if(par1World.isRemote) { return true; } or changed it to !par1World.isRemote. And also try to put this on top in the method so you can see if it get's called at all:
    System.out.println("called") 
    this prints the word "called" in the console whenever it is able to call the system.out.println method.


    At the moment, I am at school, but I didn't think of checking that. I will tell you the results whe I get back home.
    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace GUI not opening
    Sorry for the double post, but I figured out that, when I change the OpenGUI method and take out the if statement, the GUI opens, but I cannot move any items in my inventory. They snap back right away.
    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace GUI not opening
    Thank you for the help. Does anyone else have any ideas? I'm really not sure what to do here.
    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace GUI not opening
    Quote from microjunk

    Many things have changed since 1.2.5, though the only thing I can think of that you may need to do is register your tileentity....


    I may have registered it wrong. In my mod_Coalgen code, there's this line:

    ModLoader.registerTileEntity(TileEntityCoalgen.class, "Coalgen");


    Is that right?
    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace GUI not opening
    I have tried that tutorial, and I have ended up having too many bugs to worry about. I appreciate the help, but I would prefer to use what I already have and make it work. I did the same thing in 1.2.5 and it worked just fine, so I'm not sure what is wrong.
    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace GUI not opening
    Quote from microjunk

    I had the same problem more or less with mine, and when I added a guihandler from this tutorial link everything worked out....


    I guess I should have added that I am only using ModLoader, not Forge.
    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace GUI not opening
    Quote from microjunk

    you need several files for a custom furnace, block, recipe, tile, container, guifurnace, and gui handler, slot, and one more I think. If you dont have all these you will have problems...

    I have all of the files. I have SlotCoalgen, TileEntityCoalgen, GuiCoalgen, CoalgenRecipes, and ContainerCoalgen. I didn't post them because I didn't think they would be of importance. I can post them if they help solve the problem.
    Posted in: Modification Development
  • 0

    posted a message on Custom Furnace GUI not opening
    Hello!

    Recently, I made a custom furnace, called, in my code, Coalgen. To make this, I copied the furnace files and replaced all instances of "furnace" with "coalgen," which worked fine. I then registered the TileEntityCoalgen and added the BlockCoalgen in the mod_Coalgen. I had one error, which was a method displaying the GUI, which I fixed (at least I thought). I tested this mod, and was able to craft the block and place it just fine. However, when trying to open the GUI, nothing came up. I would try to place a block on it, and it wouldn't allow it to, which I think means that it's trying to open a GUI, but isn't.

    I'm not sure if it has to do with the method I fixed, or something else having nothing to do with it. Can anyone help with this?

    Below, I have my mod_Coalgen and the method of my BlockCoalgen file. If you want any more files uploaded, ask me.

    mod_Coalgen
    package net.minecraft.src;
    public class mod_Coalgen extends BaseMod
    {
    public static final Block Coalgen = (new BlockCoalgen(170, false)).setBlockName("coalgen");
    public mod_Coalgen()
    {
    ModLoader.addName(Coalgen, "Coal Generator");
    ModLoader.registerBlock(Coalgen);
    ModLoader.registerTileEntity(TileEntityCoalgen.class, "Coalgen");
    ModLoader.addRecipe(new ItemStack(Coalgen, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), Block.dirt});
    Coalgen.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Drewb13/coalgenfront.png");
    }
    public String getVersion()
    {
    return "Coal Generator v0.1";
    }
    @Override
    public void load() {
    // TODO Auto-generated method stub
    
    }
    }


    BlockCoalgen
    public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
    {
    if (par1World.isRemote)
    {
    return true;
    }
    else
    {
    TileEntityCoalgen var10 = (TileEntityCoalgen)par1World.getBlockTileEntity(par2, par3, par4);
    
    if (var10 != null)
    {
    ModLoader.openGUI(par5EntityPlayer, new GuiCoalgen(par5EntityPlayer.inventory, var10));
    }
    
    return true;
    }
    }
    Posted in: Modification Development
  • 0

    posted a message on [Request] Multiverse type mod for single player
    Quote from GeneralEagleEye

    I dont really think it will work because i dont use forge.....

    Eventually most mods will use forge. I'd get used to it now.
    Posted in: Requests / Ideas For Mods
  • 12

    posted a message on My inventory slots all have a grey screen over them, as if selected (Help!)
    I would love to know the answer to this issue, too. I am having the same problem.

    EDIT: I found the answer!
    In your inventory, NEI should be up. If it isn't, hit O. Then, at the bottom, the search bar for NEI should be yellow. You double clicked it. Double click it again to take it away! WOOT!
    Posted in: Legacy Support
  • 0

    posted a message on Enchanting Help?
    Hello. Basically, I made myself a tool set. It works fine, however, when I try to enchant the tools, the levels come up on the enchanting table, but when I click them, nothing happens. Does anyone know how to fix this?
    Posted in: Mods Discussion
  • 0

    posted a message on Need help with Mod! Crashes every time!
    What block has the id 3241? It's too big, make it, like simplyodd said, 140-255
    Posted in: Mods Discussion
  • To post a comment, please .