• 0

    posted a message on onItemUse
    Quote from rt8269197

    i am a beginner in code could u just help me out plz?

    look in ItemSoup. it is literally right there in the onFoodEaten method.
    something about return new ItemStack(item, 1)
    Posted in: Modification Development
  • 0

    posted a message on light source from hand
    Quote from artwich

    The DynamicLights mod is open-source.

    See how it's done there, copy and give credit.

    You really are making it difficult for yourself though :wink.gif:
    :tongue.gif:
    i looked at the source a bit but i didnt know what to take D:
    Posted in: Modification Development
  • 0

    posted a message on light source from hand
    Quote from Devilyoda

    wouldnt you add.setlightValue() ????? i am not sure how you have your zippo set up to really help ya with your code.

    where am i putting this? so far its no luck

    Quote from IX iTzRogue XI

    You can't have light produce from held items/blocks. You could download the DynamicLights mod and add your item/block to a txt file so it registers to glow :/

    thought of that but i would rather do it myself so i don't require another mod.
    but if all goes bad, this is what i will have to do.
    Posted in: Modification Development
  • 0

    posted a message on light source from hand
    Quote from xDangeRx

    Didnt you post this yesterday? Check in ItemSoup.
    And then you need to link it to an Entity...

    ItemSoup has nothing about light.
    i already doen the part where right click will open/close it now.
    now i want to to produce light, and that is definitely not in ItemSoup
    Posted in: Modification Development
  • 0

    posted a message on light source from hand
    ok i am currently makign a mod for a zippo lighter.
    im not expereienced, but this is about all i need and i am complete.

    i want to have it so once i have opened my zippo lighter, it produces light like what a torch would produce when its placed on the ground. I am not sure how i can do this so please, all help possible.
    Posted in: Modification Development
  • 0

    posted a message on onItemUse
    Quote from Stewiecraft

    Go look at the soup code, it's fairly simple.

    thanks stewie, that worked :biggrin.gif:.
    now to add a light source.
    Posted in: Modification Development
  • 0

    posted a message on onItemUse
    Quote from Voragain

    Are you coding that with Modloader or Forge, or with nothing?

    ModLoader.
    Posted in: Modification Development
  • 0

    posted a message on onItemUse
    Quote from sirolf2009

    he means that you make 2 items, one item has the texture of an open zippo and the other has the texture of a closed zippo

    oh yea, derp.
    but how would it change item? This is what im stuck on.
    Posted in: Modification Development
  • 0

    posted a message on onItemUse
    Quote from ENoether

    Another idea might be to have two separate items, an open lighter and a closed lighter, and change an open to a closed (and vice versa) on a right-click.

    This is what I want.
    By seperate the items do you mean 2 image files? I have created both images files of the lighter (LighterClosed/LighterOpen). How do I get it to change texture on right click though?
    Posted in: Modification Development
  • 0

    posted a message on onItemUse
    Quote from epiXz

    onItemRightClick

    yea i found onItemRIghtClick, but how do I get it to change texture?
    I looked at ItemBow but that an EnumAction.
    Posted in: Modification Development
  • 0

    posted a message on Need help with making/creating block Stuff
    why don't you go look at the diamond block hardness/resistance?
    Posted in: Modification Development
  • 0

    posted a message on onItemUse
    Hi I am having trouble. I am trying to make a Zippo lighter mod and I want it to be so that when I am holding the lighter and right click it opens/closes.
    I found 'onItemUse' method but I am not sure how I would go about doing this.
    I have created 2 .png files of the lighter open and closed, how would I make it so right click = open otherwise if its open then it is closed when right clicked.
    Posted in: Modification Development
  • 0

    posted a message on addspawn
    Quote from Sartharis

    1st integer= spawn rate
    2nd integer= minimum spawned
    3rd integer= maximum spawned

    ohhh ok makes sense. had alot of them everywhere.
    do you know what the 0.5F is in the AddRenderer section?
    Posted in: Modification Development
  • 0

    posted a message on addspawn
    ok so i am new to modding and really wanna try make a mob.
    I followed a tutorial and I have created my mob in techne, and I then started the code for my mod_xxx.

    here is the code, I have called the mob 'figger' (idk what that is lol.)

    	public mod_Figger()
    	{
    		ModLoader.RegisterEntityID(EntityFigger.class, "Figger", ModLoader.getUniqueEntityId());
    		ModLoader.AddSpawn(EntityFigger.class, 10, EnumCreatureType.creature, new BiomeGenBase[] {
    	            BiomeGenBase.forest,
    				BiomeGenBase.desert,
    				BiomeGenBase.plains,
    				BiomeGenBase.taiga,
    				BiomeGenBase.swampland
    		});
    	}
    		public String Version()
    		{
    			return "Figger v1";
    		}
    		public void AddRenderer(Map map)
    		{
    			map.put(EntityFigger.class, new RenderFigger(new ModelFigger(), 0.5F));
    		}


    I'm getting an error with the ModLoader.AddSpawn saying that it is not applicable for the arguments?
    I don't know what this means.
    AddSpawn now has no errors, what I done was add 3 more intergers where I only had 1.
    What do these mean?
    I also have an error in the public void AddRenderer(Map map) method. Where I have new RenderFigger(new ModelFigger(), 0.5F)); it gives me the error 'the constructor is undefined'.
    What is that? please help :biggrin.gif:


    Got it working but I am still unsure of what the 3 intergers I added in the ModLoader.AddSpawn line. all they intergers are 10
    Posted in: Modification Development
  • 0

    posted a message on my new mob trap
    so with my new obsession of mob traps. and finding out about XP harvesting, i wanted to make a new mob trap with this.
    So I did.



    Both downloads to the empty world and mob trap are in the video description.

    Tell em what you think? :smile.gif:
    Posted in: Videos
  • To post a comment, please .