Jump to content

list of alll methods in forge 1.7.10 is there a tutorial like this ??


Recommended Posts

Posted

Good days

bad english advertishment.

 

 

im in neeed of another method, this time a have an item called "itemMercenario00" i whish this method on rigth click on a block whit this item in hand return the coordenadas x y z of the block, like

 

entitiplayer.getOnfocusBlockCordenadas(entity ,  x,  y,  z);

 

example, i have a custom stick on mi hand, hit  a block whit the stick , it return position(x, y, z); of the block hit.

 

 

in the other hand  i been played minecraft just like a year and half, and beging whi this of the mods this sunday, soo im very newbii whith this

is there somewhere a list of everymethod avaliable in 1.7.10 something sorted like the java documentation but filled whit the notch teachings ??

 

 

 

 

Posted

Solve the part of the method to return the block cordenadas on click

 

public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_){

 

//###########################################

System.out.println("###########################################");

MovingObjectPosition mop = Minecraft.getMinecraft().renderViewEntity.rayTrace(20, 1.0F);

if(mop != null)

{

    int blockHitSide = mop.sideHit;

    Block blockLookingAt = p_77659_2_.getBlock(mop.blockX, mop.blockY, mop.blockZ) ;

   

    float fx=mop.blockX;

    float fy=mop.blockY;

    float fz=mop.blockZ;

   

System.out.println("fx="+fx+" fy="+fy+" fz="+fz);   

}

}

 

 

but still need the list.

Posted

Hi

 

Unfortunately the list doesn't exist.  There are some partial lists, mostly out of date.

You can browse through the forgeSrc packages; some of it is well documented, some of it isn't.

 

The way I find usually works well is

1) think of something in vanilla that works similar to what I want (eg I want to make a tomato plant that grows like wheat)

2) find out where wheat is in the vanilla code.  A full text search on the package usually gives good results.  For blocks and items you can browse through the Blocks and Items classes to see a list.

3) go look at the vanilla code to see which methods it overrides and what the various methods do, if they call other classes.

4) write some test code based on the vanilla code, test it, swear a lot, look at some more vanilla code, tweak my code again, perhaps read the forum, keep trying until the test code works or it reaches 2am and it's time to go to sleep.

 

My biggest hint is - take baby steps, don't try to do it all at once.  Do something simple, test it till it works, then add a bit more code, test it till it works, etc.  It's much quicker that way.

 

-TGG

 

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.