• 1

    posted a message on [SOLVED]

    /Users/*****/Desktop/Folder/CodeStuffUpdated/build/sources/main/java/theMod/items/ItemMultiTool.java:5:
    error: package com.sun.xml.internal.bind.v2.schemagen.xmlschema does
    not exist[/p


    Your error is there. Check line 5 of your ItemMultiTool.java


    could be a wrong import, typo, anything.

    Posted in: Modification Development
  • 0

    posted a message on Gui on Custom Alloy Furnace works in Eclipse but not as a mod 1.7.2

    In your resource Declaration here:


    public static final ResourceLocation texture = new ResourceLocation(NaturalCraftMain.modid, "/textures/gui/alloyFurnace.png");

    Try this instead, and see if it works


    public static final ResourceLocation texture = new ResourceLocation(NaturalCraftMain.modid + ":" + "textures/gui/alloyFurnace.png");
    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] BackGround Texture not loading when opening container
    Quote from JustJane»

    Have you tried...

    (Main.modID + ":" + "textures/gui/IngotKilnGui.png")


    After further investigation, your suggestion was the actual FIX. When I compiled the file to export to Minecraft, my build.gradle was not over-writing the old classes in the build folders, only the bin folders. Thank you very, very, very much for your help.
    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] BackGround Texture not loading when opening container

    I had a thought. Should, where the texture files are located (i.e. src/resources/assets.madhatmodding.textures.gui), be a Package or, Source Folder? Would that make a difference? I think its a package at the moment.

    Posted in: Modification Development
  • 0

    posted a message on Gui on Custom Alloy Furnace works in Eclipse but not as a mod 1.7.2

    I know this is really late but, did you end up resolving this Issue? I am having the same problem myself.

    Posted in: Modification Development
  • 0

    posted a message on Gui Error

    thanks it works!! :D


    I know I'm a little late but, I am having this same issue. I've done all the fixes on this post and still no Joy. Can you paste your fix so, I may see it?
    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] BackGround Texture not loading when opening container
    Quote from JustJane»

    (Main.modID + ":" + "mod/textures/gui/IngotKilnGui.png")

    Maybe?


    Uh, nope but, THANKS for pointing that out. 'T'was a typo! LoL. Sorry. Thanks for trying to be helpful, though. I really do appreciate it.
    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] BackGround Texture not loading when opening container

    That didn't fix it <_<

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] BackGround Texture not loading when opening container
    Quote from JustJane»

    Have you tried...

    (Main.modID + ":" + "textures/gui/IngotKilnGui.png")


    Nope, but I will try it. thank you.
    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] BackGround Texture not loading when opening container

    Hey all,


    as the Description states, when I open my Furnace, the background texture has the Black and Pink squares of "Texture death" (Picture Provided). The Container name, all the slots, inventory name all work. I'm not seeing the Texture of the slots, progress scale, and remaining scale.


    Here is the Code for my GuiContainer:


    package com.madhatmodding.mod.gui;
    
    import org.lwjgl.opengl.GL11;
    
    import com.madhatmodding.mod.Main;
    import com.madhatmodding.mod.container.ContainerIngotKiln;
    import com.madhatmodding.mod.tileentity.TileEntityIngotKiln;
    
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.gui.inventory.GuiContainer;
    import net.minecraft.client.resources.I18n;
    import net.minecraft.entity.player.InventoryPlayer;
    import net.minecraft.inventory.Container;
    import net.minecraft.util.ResourceLocation;
    
    public class GuiIngotKiln extends GuiContainer
    {
    	public ResourceLocation texture = new ResourceLocation(Main.modID + ":" + "/textures/gui/IngotKilnGui.png");
    	public TileEntityIngotKiln ingotKiln;
    
    	public GuiIngotKiln(InventoryPlayer invPlayer, TileEntityIngotKiln teIngotKiln)
    	{
    		super(new ContainerIngotKiln(invPlayer, teIngotKiln));
    		ingotKiln = teIngotKiln;
    		
    		this.xSize = 176;
    		this.ySize = 166;
    	}
    	
    	protected void drawGuiContainerForegroundLayer(int i, int j)
    	{
    		String name = this.ingotKiln.hasCustomInventoryName() ? this.ingotKiln.getInventoryName() : I18n.format(this.ingotKiln.getInventoryName());
    		
    		this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
    		this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 5, 4210752);
    	}
    	
    
    	@Override
    	protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
    	{
    		GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    		Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
    		drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
    		
    		if (ingotKiln.hasPower())
    		{
    			int i1 = ingotKiln.getPowerRemainingScaled(43);
    			drawTexturedModalRect(guiLeft + 8, guiTop + 69 - i1, 176, 60 - i1, 18, i1);
    		}
    		
    		int j1 = ingotKiln.getKilnProgressScaled(24);
    		drawTexturedModalRect(guiLeft + 116, guiTop + 35, 176, 0, j1 + 1, 18);
    	}
    
    }



    The Texture location for my Gui (in Eclipse) is: src/main/resources/assets.madhatmodding/textures/gui/IngotKilnGui.png


    As a side note, all of this works well in Eclipse, just not after compiling and, using in modded Minecraft.


    Any help would be appreciated. If you need anything else, let me know.

    Posted in: Modification Development
  • 0

    posted a message on Repairing a Custom Bow [SOLVED]
    Quote from sky_01»

    Again, you should compare items, not itemstacks.

    Since you're a new programmer, you should know that OR statements check all the conditions and return true if one (or more) succeed.
    You're looking for something like this:

    return par2ItemStack.getItem() == Items.bow || par2ItemStack.getItem() == yourBow || super.getIsRepairable(par1ItemStack, par2ItemStack);


    Not sure why you need to check the super, though...


    You're right Sky, on both accounts.I am new and, I do know that OR statements check all the conditions and return true, or false if not met. I don't need to check the super, code works fine with out it, thank you. I just couldn't remember the "||", which is what I was trying to look for.
    Posted in: Modification Development
  • 0

    posted a message on Repairing a Custom Bow [SOLVED]
    Quote from sky_01»

    No, test if par2.getItem() is equal to the repair item. ItemStack equality is unreliable, whereas Item's are always singletons.


    First, thank you for helping a new programmer.

    Here's what I have so far.....
    public boolean getIsRepairable(Itemstack par1ItemStack, Itemstack par2ItemStack)
    
    {
        return par2ItemStack.isItemEqual(new ItemStack(Items.bow) || super.getIsRepairable(par1ItemStack, par2ItemStack);
    
    }

    this lets me use a Bow to repair but, I cant figure out the or part. I'd like to use either my bow, or the "Vanilla" Bow

    Posted in: Modification Development
  • 0

    posted a message on Repairing a Custom Bow [SOLVED]
    Quote from UpcraftLP»

    You have to create an ItemStack containing the Item.


    I've created the new ItemStack referencing my bow. Now, how do I implement using my bow, or a regular bow, to repair my custom bow?
    Posted in: Modification Development
  • 0

    posted a message on Repairing a Custom Bow [SOLVED]
    Quote from sky_01»

    The parameters for getIsRepairable are the ItemStack to repair and the ItemStack that is being used to repair it. Just return true if that second ItemStack's item is a regular bow or your own bow or whatever.


    I've tried that and, the error says "Incompatible operand types ItemStack and Item". How do I work around that?
    Posted in: Modification Development
  • 0

    posted a message on Repairing a Custom Bow [SOLVED]

    Greetings all,


    I successfully created a custom Bow for my mod but, neglected to put in (or add) the ".getIsRepairable". When I do this though, how do I specify a regular bow will work?


    public boolean getIsRepairable(ItemStack par1, ItemStack par2)
    {
       //Using Items.bow here as par2 throws an error
    }
    Posted in: Modification Development
  • To post a comment, please .