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 wanted to make a custom crafting table.

The idea I had was to basically to copy the vanilla crafting table - so have the 3 by 3 grid and the 1 output (I wanted to do this so my recipes wouldn't clash, in the vanilla table).

Context aside for a minute.

I tried to copy the classes, but nothing worked!

I was just wondering if anyone would be able to help, either with reference code or just some help!

Please and Thanks!

This is for 1.12.2!

Edited by Pppineeeee3

On 4/5/2019 at 3:11 AM, Pppineeeee3 said:

I tried to copy the classes, but nothing worked!

Of course nothing worked.

You can't just copy everything out of its original context and expect it to work.

 

  1. Define "nothing worked"
  2. Show your code. We can't do anything without seeing your code.

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

  • Author
19 hours ago, DavidM said:

Of course nothing worked.

You can't just copy everything out of its original context and expect it to work.

 

  1. Define "nothing worked"
  2. Show your code. We can't do anything without seeing your code.

The block was IG but no GUI opened.

1 hour ago, Pppineeeee3 said:

The block was IG but no GUI opened.

 

21 hours ago, DavidM said:

Show your code. We can't do anything without seeing your code.

 

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.

1 hour ago, Pppineeeee3 said:

The block was IG but no GUI opened.

You have to call player.openGUI(INSTANCE (Main mod instance), id (0 if it is the first GUI your mod has), other args...).

Then you have to make a GUI handler like this:
 

public class GuiHandler implements IGuiHandler {
    @Nullable
    @Override
    public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
        if(ID == 0)
            return new YourContainer();
        return null;
    }

    @Nullable
    @Override
    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
        if(ID == 0)
            return new YourGuiScreen(YourContainer());
        return null;
    }
}

Then register it in your load method:

NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE(Main mod instance), new GuiHandler());

 

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.