Jump to content

Domzy

Members
  • Posts

    1
  • Joined

  • Last visited

Domzy's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Help with 1.8.9 mod that copies messages when ctrl + right clicking on them I'm pretty new to Forge modding and been trying to figure out how to get the chat message that was ctrl + right clicked on then copy the message, but I have no clue, any help? I know I could just get a mod that already does this but I want to do this by myself this is all i have right now: package com.example.examplemod; import java.awt.Toolkit; import java.awt.datatransfer.StringSelection; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; import net.minecraft.init.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import java.awt.datatransfer.Clipboard; @Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION) public class ExampleMod { public static final String MODID = "examplemod"; public static final String VERSION = "1.0"; private static String copiedMessage = ""; @EventHandler public void init(FMLInitializationEvent event) { // some example code System.out.println("DIRT BLOCK >> " + Blocks.dirt.getUnlocalizedName()); MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void onClientTick(TickEvent.ClientTickEvent event) { Minecraft mc = Minecraft.getMinecraft(); if (Mouse.isButtonDown(1) && Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && mc.currentScreen instanceof GuiChat) { } } }
×
×
  • Create New...

Important Information

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