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

I am new to modding and have come across a road block (probably due to my inexperience). I have enabled my modded items to be able to be used as a payment for beacons fine, however I am unable to figure out how to make my custom items appear next to the diamond, iron ingot, gold ingot etc. when looking at the GUI for the beacon. Any help would be appreciated :) 

I'm guessing you didn't look at the BeaconScreen code at all. Here's a tidbit:

 [removed code for BeaconScreen#drawGuiContainerBackgroundLayer - diesieben07]

You would just need to adjust the x and y offsets from there.

Edited by diesieben07

  • 1 month later...
  • Author
On 6/28/2020 at 10:50 PM, ChampionAsh5357 said:

I'm guessing you didn't look at the BeaconScreen code at all. Here's a tidbit:

 [removed code for BeaconScreen#drawGuiContainerBackgroundLayer - diesieben07]

You would just need to adjust the x and y offsets from there.

Thank you that helped a lot! I didn't know how to create events when originally posting this but I learnt the basics and I create GuiOpenEvent that changes the Beacon GUI to my own modified version.

@Mod.EventBusSubscriber(modid = MyMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT)
public class ModClientEvents {

    @SubscribeEvent
    public static void onOpenBeacon(GuiOpenEvent event) {
        if(event.getGui() instanceof BeaconScreen) {
            BeaconScreen gui = (BeaconScreen) event.getGui();
            event.setGui(new ModifiedBeaconGui(gui.getContainer(), (PlayerInventory)gui.getListener(), gui.getTitle()));
        }
    }

Yet if there is a better way to do this please share on this post.

I also have updated my mod to 1.16.1 but I am not sure how to edit the topic title.

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.