Jump to content

I can’t get the advancements button to work [1.12.2]


Abbadon696

Recommended Posts

I use the FTBQuests mod as the main adventure lines of the game.
So I wanted to change the functionality of the the advancements button from the pause menu when I pressed it, but the code complains about the absence of  "field_146127_k" "func_71410_x"

import com.feed_the_beast.ftbquests.client.ClientQuestFile;

import net.minecraft.client.Minecraft;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraftforge.client.event.GuiOpenEvent;

import net.minecraftforge.client.event.GuiScreenEvent;

import net.minecraftforge.fml.common.Mod.EventBusSubscriber;

import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

import net.minecraftforge.fml.relauncher.Side;

import net.minecraftforge.fml.relauncher.SideOnly;

 

@SideOnly(Side.CLIENT)

@EventBusSubscriber(value = {Side.CLIENT}, modid = "gmrmod")

public final class ClientRegisterEvents {

@SubscribeEvent

public static void DisableOpeningAdvancementsGui(GuiOpenEvent event) {

if (event.getGui() instanceof net.minecraft.client.gui.advancements.GuiScreenAdvancements)

event.setCanceled(true);

}

@SubscribeEvent

public static void OpenQuestGui(GuiScreenEvent.ActionPerformedEvent.Post event) {

if (event.getGui() instanceof net.minecraft.client.gui.GuiIngameMenu)

if ((event.getButton()).field_146127_k == 5)

ClientQuestFile.INSTANCE.openQuestGui((EntityPlayer)(Minecraft.func_71410_x()).field_71439_g);

}

}

Edited by Abbadon696
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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