Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

hi,

I'm a beginner in forge programming.

I tried making base mod that add blocks,items ecc.

Today i downloaded a mod and i decomplied with intellij to see how it's made but some functions has weird name like "func_77973_b".

 

I hope someone can explain me this names

Thank you

7 minutes ago, costa99 said:

I hope someone can explain me this names

Minecraft code is obfuscated. You can't just decompile it and get readable human names.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
14 minutes ago, Animefan8888 said:

Minecraft code is obfuscated. You can't just decompile it and get readable human names.

ok i know that minecraft code is obfuscated and there is mcp but i decompiled a forge mod jar 

this is the code

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package bl4ckscor3.mod.xptome;

import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.RegistryEvent.Register;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
import net.minecraftforge.registries.ObjectHolder;

@Mod("xpbook")
@EventBusSubscriber(
    modid = "xpbook",
    bus = Bus.MOD
)
public class XPTome {
    public static final String MODID = "xpbook";
    @ObjectHolder("xpbook:xp_book")
    public static final Item XP_BOOK = null;

    public XPTome() {
        MinecraftForge.EVENT_BUS.addListener(this::onAnvilUpdate);
    }

    @SubscribeEvent
    public static void onRegisterItems(Register<Item> event) {
        event.getRegistry().register((new ItemXPTome()).setRegistryName(new ResourceLocation("xpbook", "xp_book")));
    }

    @SubscribeEvent
    public void onAnvilUpdate(AnvilUpdateEvent event) {
        if (event.getLeft().func_77973_b() == XP_BOOK || event.getRight().func_77973_b() == XP_BOOK) {
            event.setCanceled(true);
        }

    }
}

 

i read somewhere about "mappings" but i don't know about

21 minutes ago, costa99 said:

i read somewhere about "mappings" but i don't know about

Search the forums for "MCP names" "SRG names" and "Notch names" (or "Mojang names").

There's like nine people who've asked that same question just in the last nine months.

 

Mappings are the SRG -> MCP names translation guide.

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.

  • Author
43 minutes ago, Draco18s said:

Search the forums for "MCP names" "SRG names" and "Notch names" (or "Mojang names").

I searched and i understand how it works thanks.

 

But my question is if  this mod use this functions means that who made this mod has the mcp name of it and why i didn't too?

I'm not up to date? 

If you downloaded and decompiled someone else's mod, you will never see MCP names.

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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.