Jump to content

Recommended Posts

Posted (edited)
Spoiler

First thing first, i do try to make one forge mod and i get all of the information to start building my own mod is from MrCrayFish (maybe some of you know him already? the guy who created that Famous Furniture Mod) but then i'm stuck on how things supposed to work in Forge, MrCrayFish teach me that i should make 3 methods for my first class and that's preInit, init, and postInit. and what make me so confuse with just three of these?? it just make me blank.. from java, we all know that 'public static void main (String [] args) {}' method is supposed to be the "Laucher" for our all java application but with Forge, it make things different for me.. i have zero experience with gradle and github stuff but know what java library is.. So, don't expect me to fully understand things all by myself without proper documentation. i just not getting used by guessing how things works all by myself, i'm born at where there are tons of documentation to ease people who want to work with it.

 

Hello, i'm fairly new with forge and i don't get enough 'official' information about the minecraft forge itself..

I know this isn't Java School but at least give some introduction about the Forge 'framework' to us (modders).. i'm very blessed if you guys (Forge Developers) would spare your time to add documentation like the images i attached below...

 

"Where are we supposed to put all of these complex information?", maybe you can put them all on mcforge.readthedocs.io ? but i think there are supposed to be two domain for the forge docs, The Source Code infos (you can find objects or class information that are on the Forge Minecraft) and The Implementation infos (you can find tutorial on how forge objects should be implemented on this domain).

 

and again if you think that i want the Java Tutorial, you are completely wrong.. i mean is that there are the "hidden info" out there that we should know for the first time before we can use the Forge 'Framework' properly.

 

There are four images on the attachment and i'll give an information on how they should be applied:

[Image 1, java documentation home image] = You can find all of the classes that are included in the Minecraft Forge source code,

[Image 2, java documentation objects image] = You can see the objects or class information that gives you an idea what they are and how they are constructed (constructors, methods, child-class and parent-class, implements, etc),

[Image 3, codeigniter documentation image] = It's your first "Hello World!" mod, it contains pretty much a proper way to create a mod with Forge from start to packaging,

[Image 4, oracle documentation image] = It's some other forge tutorials that has it's own system to make things works and Absolutely not tutorial on how to create Integer variable.

 

The image 1 + image 2 is an illustration for 'The Source Code infos' and Image 3 + Image 4 is an illustration for 'The Implementation infos'. if you guys have any question regarding to my suggestion, just ask me but i can't promise you that i'll reply in any minutes as i don't check forge forum 24/7.

 

Well, if you want to see why this suggestion should be applied, here are several possible pros reasons below:

- It reduce the amount of people who ask for a help on how to code with forge,

- It makes community easier to explain as you can just refer what you mean with your explanation to the available documentation,

- It increases the interest to create a mod with forge (well, i have a little to not have a motivation to create one because of this),

- It does not restrict modders to certain forge knowledge anymore, the modders can finally use all of their ideas into their mod with ease,

- It also let modders only think and focus with their ideas only and push em to the max, and let the documentation explain how you do things,

- As the mods produced more and more and many minecraft players interest on playing with their lovely forge mods, Forge Developers indirectly get paid by the advertisement (harvesting ads from Forge Download).

 

maybe, if you guys are a pessimist kind of person, here are also several possible cons reasons below:

- It may take a lot of effort to make this happen depend to how many lines of code that need to be explained,

- There might be some explanation that people still don't understand what is that mean and may need some community help to improve that explanation (because i understand how pain it is to explain your code to people),

- There might be some typing mistakes as it's the first ever documentation that have a bunch of information you can get and may need some extra review from community to fix them all,

- (I'm not sure about this one but i think this will happen) As the Forge Developers source income are only from advertisement, it's unlikely that they get paid by their hardwork on creating these complex documentation immediatedly. We can only hope that forge developers will do this for us.. for the community.. for the future!

 

 

To be honest, i don't have any wish to make people offended (if there's one) in any way.. i don't pretend that i can do everything. i am just a normal person who's looking for a help to the masters or you can pretend me as a student who needs a help to the teacher. So, please don't throw me with hatred comments, i just want to be a nice person here..

 

Here are all of the pictures attachment below:

forge docs suggestion 1.png

forge docs suggestion 2.png

forge docs suggestion 3.png

forge docs suggestion 4.png

1n2u7l.jpg

Edited by firmansahita
some typing mistakes
Posted
29 minutes ago, diesieben07 said:

Doesn't this already exist with the Getting Started page? Please clarify what you are missing on that page.

That's not what i mean, i mean something like the URL i provide below.. if you follow the instruction, you get your first 'Hello World!' but on that page you refer, it's only explain you how you get around with forge and it doesn't include something like 'full code example'.

https://www.codeigniter.com/user_guide/tutorial/index.html

 

maybe if you don't know codeigniter, here's the java way to give people complete tutorial (tutorial that has both explanation and full source code)

http://docs.oracle.com/javafx/2/get_started/form.htm

and there, on the "Run the Application" section, there's a link called 'Login.java' and it redirect you to the full source code if you run into problems. (the link also pasted here for easyness)

http://docs.oracle.com/javafx/2/get_started/Login.java.html

 

29 minutes ago, diesieben07 said:

Your IDE does this. Your IDE can even generate the HTML Javadoc from the Forge code if you prefer that.

How'd you do that with eclipse? does that generate exactly like the illustration i provide? i'm not so friendly with eclipse anyway, i usually use netbeans PLUS even on netbeans i don't generate the HTML Javadoc, i still read from the site manually.

Posted

It is explicitly designed that we do NOT give out 'full code examples' because if you're a modder you shouldn't need copy paste code.

And we have a history of the community spouting copy pasta all over the place, we will not contribute to this.

 

As for the javadocs, due to how Minecraft is obfuscated and the mappings are crowdsourced, the javadocs are useless as you would have different functions and docs then someone else based on what snapshot you're using.

Your IDE is the way to go for javadocs.

 

As for everything else, as diesieben points out, the github is public and we rely on the community to develop tutorials/documents on things. So if you want them, start making them.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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

    • the modpack keep crashing idk why,cause it never said anything about any mods causing it. crash log:https://drive.google.com/file/d/1iYKlUgvHUob8DjyRc3gqP_Viv_kSHO6L/view?usp=sharing mod list:https://drive.google.com/file/d/1MvMT-z9Jg2BITQ4uLshJ1uOh7q9EMBfC/view?usp=sharing but the server(anternos) works just fine
    • Hello, I am trying to make 2 recipes for a ruby. The first one is turning a block into a ruby and the other one is 9 nuggets into a ruby. But I keep on getting a error java.lang.IllegalStateException: Duplicate recipe rubymod:ruby   Any help would be great on how to fix it
    • Hello everyone, i'm new with programing Mods, and will need a lot of your help if possible,  Im trying to make a new GUI interface responsible to control the Droprate of game, it will control de loot drop and loot table for mobs and even blocks, but i try to make a simple Gui Screen, and wenever i try to use it, the game crash's with the error message in the subject, here is the code im using to:  IDE: IntelliJ Comunity - latest version Forge: 47.3.0 Minecraft version: 1.20.1 mapping_channel: parchment mapping_version=2023.09.03-1.20.1 Crash report link: https://pastebin.com/6dV8k1Fw   Code im using is:    package createchronical.droprateconfig; import com.mojang.blaze3d.systems.RenderSystem; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.screens.Screen; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import java.util.HashMap; import java.util.Map; public class ConfigScreen extends Screen { private static final ResourceLocation BACKGROUND_TEXTURE = new ResourceLocation("droprateconfig", "textures/gui/config_background.png"); // Mapa de mobs e itens com seus respectivos drop rates private final Map<String, Integer> dropRates = new HashMap<>(); public ConfigScreen() { super(Component.literal("Configurações de Drop Rate")); // Inicializa com valores de drop rate padrão dropRates.put("Zombie", 10); // Exemplo de mob dropRates.put("Creeper", 5); // Exemplo de mob dropRates.put("Iron Ore", 50); // Exemplo de item dropRates.put("Diamond", 2); // Exemplo de item } @Override protected void init() { // Cria um botão para cada mob/item e adiciona na tela int yOffset = this.height / 2 - 100; // Posicionamento inicial for (Map.Entry<String, Integer> entry : dropRates.entrySet()) { String itemName = entry.getKey(); int dropRate = entry.getValue(); // Cria um botão para cada mob/item this.addRenderableWidget(Button.builder( Component.literal(itemName + ": " + dropRate + "%"), button -> onDropRateButtonPressed(itemName) ).bounds(this.width / 2 - 100, yOffset, 200, 20).build()); yOffset += 25; // Incrementa a posição Y para o próximo botão } // Adiciona o botão de "Salvar Configurações" this.addRenderableWidget(Button.builder(Component.literal("Salvar Configurações"), button -> onSavePressed()) .bounds(this.width / 2 - 100, yOffset, 200, 20) .build()); } private void onDropRateButtonPressed(String itemName) { // Lógica para alterar o drop rate do item/mob selecionado // Aqui, vamos apenas incrementar o valor como exemplo int currentRate = dropRates.get(itemName); dropRates.put(itemName, currentRate + 5); // Aumenta o drop rate em 5% } private void onSavePressed() { // Lógica para salvar as configurações (temporariamente apenas na memória) // Vamos apenas imprimir para verificar dropRates.forEach((item, rate) -> { System.out.println("Item: " + item + " | Novo Drop Rate: " + rate + "%"); }); // Fecha a tela após salvar Screen pGuiScreen = null; assert this.minecraft != null; this.minecraft.setScreen(pGuiScreen); } @Override public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) { this.renderBackground(guiGraphics); guiGraphics.blit(BACKGROUND_TEXTURE, this.width / 2 - 128, this.height / 2 - 128, 0, 0, 256, 256, 256, 256); super.render(guiGraphics, mouseX, mouseY, partialTicks); } }  
  • Topics

×
×
  • Create New...

Important Information

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