Jump to content

TommyHoogstra

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by TommyHoogstra

  1. Solved, they added 2 hands in 1.9, so had to check if it was there main hand interacting.
  2. Hey everyone, my server runs a bukkit plugin that lets users open iron doors and trapdoors with their fists, however, when using the forge client, it does not let them. I coded the plugin, and tried swapping to a vanilla client which worked, is there something I can do in the mean time? Is this a known bug? It looks like the event is called twice, so it opens and closes the door. If the player holds a bow in their hand, the door opens correctly. Thanks.
  3. Sorry for double post, i can confirm it works with EntityJoinWorldEvent, however, I would like to find out if theres a way to check the 'join' cause, e.g. Respawning, Logging in, etc. Right now im just using a boolean that gets set to false if the client logs out, and true when the entity joins.
  4. It doesn't seem to be working without the slash either I also tried addChatMessage, that didnt work either. I'm assuming its something wrong with the scheduled task?
  5. Ok, thanks very much. However, this is all that needed to change in my code, but it still doesn't send the command when I join, I think im missing something obvious, but I'm new Forge and its API so I'm not quite sure. public class Auth implements Runnable { @Override public void run() { Minecraft.getMinecraft().thePlayer.sendChatMessage("/auth"); } }
  6. Its a server command, is there any documentation on the Chat Message Packet, or an example around? Thanks
  7. Ok, So I went with the ClientConnectedToServerEvent, and even though I haven't added the command to my server yet, I was expecting an 'unknown command' message to pop up. Am I missing something? @Mod(modid = "MAH", version = "1.0") public class MAH { @EventHandler public void init(FMLInitializationEvent e){ MinecraftForge.EVENT_BUS.register(new Events()); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @EventHandler public void preInit(FMLPreInitializationEvent event) { } public class Events { @SubscribeEvent public void onJoin(ClientConnectedToServerEvent event) { Minecraft.getMinecraft().addScheduledTask(new Auth()); } } public class Auth implements Runnable { @Override public void run() { ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/auth"); } }
  8. For the EntityJoinWorldEvent, couldn't I just check if the entity is instanceof EntityPlayerSP?
  9. Hey everyone, I'm kinda new to forge but have a fair amount of java experience, I'm in a bit of a rush so I was hoping of someone could give me some pointers as google hasnt satisfied my needs. I'm trying to get the client to run a command as soon as it joins a server, e.g. /auth 123111717 I've tried using the ClientConnectToServer (forgot its exact name, forgive me), EntityJoinWorldEvent, PlayerLoggedInEvent (i think this is for server side mods, excuse me if I'm wrong) but have had no such luck at getting a command to execute. Any pointers, or examples? Thanks
×
×
  • Create New...

Important Information

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