Posted June 28, 20205 yr 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
June 28, 20205 yr 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 June 28, 20205 yr by diesieben07
August 8, 20205 yr 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.