Jump to content

Where can I find the JavaDocs for the forge API?


N!ghthauq

Recommended Posts

What IDE do you use? How did you set up your workspace. The source should be attached automatically and viewable in your external libraries

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

29 minutes ago, Cadiboo said:

What IDE do you use? How did you set up your workspace. The source should be attached automatically and viewable in your external libraries

Oh, sorry. I use Eclipse 2018 - 12, and i used the forge Gradle installation.

 

I'm an idiot. I don't expect much from myself, which is why I am here getting help.

Link to comment
Share on other sites

On 2/27/2019 at 1:58 PM, N!ghthauq said:

i used the forge Gradle installation

What does this mean? Can you explain more?

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

I set up my workspace exactly how the forge installation guide told me. My workspace is in the same folder as my eclipse root folder as well if that is what you're asking for.

tempsnip.png

I'm an idiot. I don't expect much from myself, which is why I am here getting help.

Link to comment
Share on other sites

This is more what your looking for LINK . it teaches you structure.  the docs in eclipse are not helpful  unless you know the basics first.

and this will give you java docs in eclipse.

1. add this line apply plugin: 'eclipse' to build.gradle just under   apply plugin: 'net.minecraftforge.gradle'

2. run gradlew eclipse

3.if eclipse is open restart it 

NOTE: you must build first.

Edited by JavaMan7
Link to comment
Share on other sites

You can always just generate your own JavaDocs. The Forge source (at least from GradleForge) seldom has JavaDoc comments, and the comments that are there are limited in information. If you really want to comprehend everything, build your own JavaDocs.

2 hours ago, JavaMan7 said:

1. add this line apply plugin: 'eclipse' to build.gradle just under   apply plugin: 'net.minecraftforge.gradle'

2. run gradlew eclipse

3.if eclipse is open restart it 

NOTE: you must build first.

That's not how you build JavaDocs in Eclipse, at least from the time I used the program.
Project > Generate JavaDocs

  • Like 1

Epic Website

Link to comment
Share on other sites

16 hours ago, FrostBytes said:

That's not how you build JavaDocs in Eclipse, at least from the time I used the program.

They are already built but the paths to them are not thats what the eclipse comand dose 1.13.2+ already has the eclipse plugin buit in. This is the best way to do this and it going to be done this way in the future. And like i said befor forge docs are here the ones in eclipse are just qick references.

  • Like 1
Link to comment
Share on other sites

33 minutes ago, N!ghthauq said:

Alright, I thought forge would have their classes, enums, methods, etc. documented.

You mean this?

https://mcforge.readthedocs.io/en/latest/gettingstarted/

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I've been given the link to that many different times. Yes I like it, I think it's good but it confuses me because it doesn't look like any other javadocs I've seen.

  • Like 1

I'm an idiot. I don't expect much from myself, which is why I am here getting help.

Link to comment
Share on other sites

That's because it isn't autogenerated.

 

Just because Java has a way to docvument things and Forge is written in Java does not mean that all docs are JavaDoc.

 

The intertnal docs and the external docs sever a different purpose.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

19 hours ago, FrostBytes said:

You can always just generate your own JavaDocs. The Forge source (at least from GradleForge) seldom has JavaDoc comments, and the comments that are there are limited in information. If you really want to comprehend everything, build your own JavaDocs.

That's not how you build JavaDocs in Eclipse, at least from the time I used the program.
Project > Generate JavaDocs

Um....let me just look up-thread a bit.

Hmm.

 

  • Confused 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

10 hours ago, N!ghthauq said:

Alright, I thought forge would have their classes, enums, methods, etc. documented.

this is the minecraft source code and minecraft forge source code.

gfverdg.PNG.91d9c82bc4d669803f7065433eff01e7.PNG

Ctrl+space list all field and methods in a class 

public static void main(string args[]){

System.out.


}

crt.PNG.82eba682996242b1790bf2aec93fd460.PNG

ewfrgtb.PNG.02cb47c574b59d52e759d11db48b2b1c.PNG

hovering over an object will link to its class clicking on it takes you to its source code.

ct2.thumb.PNG.3f14c6f9d4546d255fa4359c65ee8699.PNG

right click on an object and click type hierarchy  

register.PNG.6099fb9616e30c29ca8873e5adc58a8c.PNG

btw this is all of the types that have a registry call type 

the docks are not the best. they don't tell you every thing you may need to dig this should help and i think this is what you are look for maybe?

and there is out line is on the side looks  like this ?

ergth.PNG.e72bd2a540e0c2c5df736a02850c3045.PNG

 

 

 

this is a piece of code from EntityType<T> class at first I did not now how to register entitys but this gave me a start point to finger it out. this is to just get you thinking.

   public static final EntityType<EntityTippedArrow> ARROW = register("arrow", EntityType.Builder.create(EntityTippedArrow.class, EntityTippedArrow::new));
   public static final EntityType<EntityBat> BAT = register("bat", EntityType.Builder.create(EntityBat.class, EntityBat::new));

 

 

you now have a reference to just about every thing in terms of docs. 

Edited by JavaMan7
  • Like 1
Link to comment
Share on other sites

  • 5 months later...

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
    • It is an issue with quark - update it to this build: https://www.curseforge.com/minecraft/mc-mods/quark/files/3642325
  • Topics

×
×
  • Create New...

Important Information

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