Jump to content

1.6.4 Custom Furnace Gui not showing with no console error


Bashula

Recommended Posts

I used Microjunks code for this part becouse i could not fix the error for it here it is

 

 

 

    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 if (!par5EntityPlayer.isSneaking())

        {

            TileEntityDarkIronFurnace var10 = (TileEntityDarkIronFurnace) par1World.getBlockTileEntity(par2, par3, par4);

            if (var10 != null)

            {

              par5EntityPlayer.openGui(Strings.instance, 0, par1World, par2, par3, par4);   

            }

            return true;

        }

        else

        {

            return false;

   

        }

    }

 

Link to comment
Share on other sites

this is the strings class i worked before the update

 

public class Strings

{   

protected boolean enableStats = true;

 

 

 

 

    public static final String MOD_ID = "Darkcraft";

    public static final String Name = "Darkcraft-1.6.4 Beta-Dev";

    public static final String Version = "1.6.3 Beta-Dev";

 

    public static final String ServerProxylocation = "Darkcraft.main.ServerProxy";

    public static final String ClientProxylocation = "Darkcraft.main.ClientProxy";

public static String get(String string) {

// TODO Auto-generated method stub

return null;

}

    public boolean getEnableStats()

    {

        return this.enableStats;

    }

 

    /**

    *

    * Disable statistics for the block, the block will no count for mined or placed.

    *

    */

 

    protected Strings disableStats()

    {

        this.enableStats = false;

        return this;

    }

 

@Instance("Darkcraft")

  public static MainRegistry instance;

 

}

 

 

 

Link to comment
Share on other sites

public class GuiHandlerDIFurnace implements IGuiHandler

{

@Override

public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)

{

TileEntity tile_entity = world.getBlockTileEntity(x, y, z);

switch(id)

{

case 0: return new DarkIronFurnaceContainer(player.inventory, (TileEntityDarkIronFurnace) tile_entity);

}

return null;

}

@Override

public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)

{

TileEntity tile_entity = world.getBlockTileEntity(x, y, z);

switch(id)

{

case 0: return new GUIDarkIronFurnace(player.inventory, (TileEntityDarkIronFurnace) tile_entity);

}

return null;

}

}

Link to comment
Share on other sites

Run in debug and double click in the left margin of that line of code. All the way to the left were that blue line is. You should see a circle appear. Double clicking again will remove it. Then, when that line executes, it pauses the execution, and you can mouse over the variables to see their values.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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