Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Knux14

Knux14

Members
 View Profile  See their activity
  • Content Count

    51
  • Joined

    January 19, 2013
  • Last visited

    March 21, 2016

Community Reputation

0 Neutral

About Knux14

  • Rank
    Stone Miner

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!
  1. Knux14

    Open GUI on connect

    Knux14 replied to Knux14's topic in Modder Support

    mmh actually I'm not that done.. I am doing pretty much the same thing, once the player has set it server-side, I send another packet to sync the ExtandedProperties: public IMessage handleClientMessage(final EntityPlayer player, final UpdateClientMessage message, MessageContext ctx) { final Minecraft mc = Minecraft.getMinecraft(); mc.addScheduledTask(new Runnable() { @Override public void run() { System.out.println("Tries to get it"); PlayerProps pp = PlayerProps.get(player); System.out.println("Got it: " + pp.toString()); pp.setName(message.fName, message.lName); pp.setMoney(message.money); } }); return null; } Then I get it at each connect. It works the first time when I set my name, but then as soon as I connect it does nothing. When I take out the task, it kicks me out and the log says that "NullPointerException" on PlayerProps.get I have no clue how to register it since I already do this: @SubscribeEvent public void onEntityConstructing(EntityConstructing evt) { if (evt.entity instanceof EntityPlayer && PlayerProps.get((EntityPlayer)evt.entity) == null) { PlayerProps.register((EntityPlayer)evt.entity); } } NOTE that it does work without problems singleplayer EDIT: Actually, it works some times, and some other it doesn't.. I can't find how to reproduce working / non working. By "Some time" I mean, when I connect, and that it doesn't work, I disconnect and reconnect, untill it works. Tough when I disconnect and reconnect it is not mandatory that it works...
    • March 21, 2016
    • 4 replies
  2. Knux14

    Open GUI on connect

    Knux14 replied to Knux14's topic in Modder Support

    This is working indeed, Thank you I haven't modded for a while those thinks looks kinda new to me..
    • March 20, 2016
    • 4 replies
  3. Knux14

    Open GUI on connect

    Knux14 posted a topic in Modder Support

    Hello, So, recently I started my mod, which is designed to be played multiplayer without any other mod. In this mod, the server send a "OpenGui" Message/Packet, and the client need to open a GUI in which he will put a first name and a last name. Then the client need to send back a "SetName" Message/Packet. Right now I implemented this as is: - PlayerLoggedInEvent detect a player connection. After checking that the world !isRemote, I send a OpenGuiMessage(Login) to the player - When the client receive "OpenGuiMessage(Int)" it opens the Gui "Int" with a simple "mc.displayGuiScreen" The problem is that actually, the Gui pops up just before Minecraft load the render, so a few ms after the screen shows, it closes to have currentScreen == null & GuiIngame. It is not even visible, though my PC got laggy during the connection so I had time to see the GuiScreen poping up then closes.. How can I wait the render has been done to open the Gui (Or opening it directly without showing the Game first) Thanks in advance
    • March 20, 2016
    • 4 replies
  4. Knux14

    [1.6.4] EntityLiving and NBT Data

    Knux14 replied to Knux14's topic in Modder Support

    Yes I know, I already used it, but I don't understand how the packet is supposed to say "THAT entity", how to select MY entity, Because I won't be able to include a whole entity in the packet and I don't think I can have "Update name of Entity at X/Y/Z" Here's my sourcecode: https://github.com/Knux14/Stuffies/tree/master/fr/Knux14/Stuffies
    • February 9, 2014
    • 6 replies
  5. Knux14

    [1.6.4] EntityLiving and NBT Data

    Knux14 replied to Knux14's topic in Modder Support

    Okai so it's now pretty much working. All I do is add if (!w.isRemote) In the interact of the Entity. Now I need to get the name from the server, Am I forced to use packet ? Is there any other ways?
    • February 8, 2014
    • 6 replies
  6. Knux14

    [1.6.4] EntityLiving and NBT Data

    Knux14 replied to Knux14's topic in Modder Support

    ow that would explain everything... I'm gonna try something, I'll let you know
    • February 8, 2014
    • 6 replies
  7. Knux14

    [1.6.4] EntityLiving and NBT Data

    Knux14 posted a topic in Modder Support

    Hello everyone, Today I tried to make a boat but I am in front of a problem. Data doesn't works. In the rightclic method I have the username correctly working but if I print the username in the interact method I get "null" Here's my codes: ItemFlycar: https://gist.github.com/Knux14/8887545 EntityFlycar: https://gist.github.com/Knux14/8887547 RenderFlycar: https://gist.github.com/Knux14/8887556 I've tried several different way but nothing is working. Here's what I currently get for ONE right clic: http://screencloud.net/v/52oT I don't understand why the function is triggered twice and why does the first time everything is set to null and not the second... Thanks in advance
    • February 8, 2014
    • 6 replies
  8. Knux14

    [1.6.4 | IC2] TileEntity not removing

    Knux14 replied to Knux14's topic in Modder Support

    Okay I found the bug. I was posting the events in the "updateEntity" and "invalidate" methods of the TileEntity. I moved them in the "onBlockAdded" and "breakBlock" events and now it works fine. Thank you
    • December 30, 2013
    • 6 replies
  9. Knux14

    [1.6.4 | IC2] TileEntity not removing

    Knux14 replied to Knux14's topic in Modder Support

    I've didn't found where to post EnergyNet has a remove tile entity method that you need to use when the block is broken. It seems that it doesn't contain it, here's my IEnergyNet class: https://gist.github.com/anonymous/8189898 I've found this on google which seems to have it but it also seems to be a bit old: http://atomicstrykers-minecraft-mods.googlecode.com/hg-history/853343e5b365415ccfc8583059ca7bf3d87ba538/PowerConverters/common/ic2/api/EnergyNet.java I have an event which is supposed to do the same as EnergyNet.removeTileEntity() => EnergyTileUnloadEvent but it doesn't work. It is said in the comment that it should do the same as the method but the method doesn't exists anymore: * Every energy tile which wants to get disconnected from the IC2 Energy * Network has to either post this event or alternatively call * EnergyNet.removeTileEntity(). Edit2: If I post the event in breakBlock I have this error when I destroy then replace the block 2013-12-31 00:32:40 [Avertissement] [iC2] EnergyNet.removeTileEntity: fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@24ed3cfa (fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@24ed3cfa) wasn't found (added), skipping 2013-12-31 00:32:55 [Avertissement] [iC2] EnergyNet.addTileEntity: fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@69217a9c (fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@69217a9c) is conflicting with fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@24ed3cfa using the same position (already added, prev. te not removed, overlapping), aborting
    • December 30, 2013
    • 6 replies
  10. Knux14

    [1.6.4 | IC2] TileEntity not removing

    Knux14 posted a topic in Modder Support

    Hello I am making a mod which using the IC2 api bug I got a problem. The tile entity seems not to be removing. Here's my code: https://gist.github.com/anonymous/8188707 I've already tried by using "world.removeBlockTileEntity(x, y, z)" but it's still giving me the same error... When I place the block (Or any IC2 blocks) where I destroyed one of mine, i get this error in the logs: 2013-12-30 22:37:38 [Avertissement] [iC2] EnergyNet.addTileEntity: fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@85fc923 (fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@85fc923) is conflicting with fr.Knux14.Electools.TileEntity.TileEntityTeleportBlock@48cdb24 using the same position (already added, prev. te not removed, overlapping), aborting If there is a cable next to this block, even if I break mine, the cable still seems to be connected. Anybody can help me ? Thanks in advance
    • December 30, 2013
    • 6 replies
  11. Knux14

    Event on connect / disconnect

    Knux14 replied to Knux14's topic in Modder Support

    Thanks, it works perfectly!
    • December 22, 2013
    • 4 replies
  12. Knux14

    Event on connect / disconnect

    Knux14 replied to Knux14's topic in Modder Support

    Okay thanks, i've already tried with IConnectionHandler but it does not seems to work serverside (The connect is only clientside) I'll try it right now
    • December 22, 2013
    • 4 replies
  13. Knux14

    Event on connect / disconnect

    Knux14 posted a topic in Modder Support

    Hello everyone, I'm searching a way to detect when a player is connecting and when is deconnecting. I've looked in the events but the only one i've found is "playerJoinWorldEvent" which is triggered every time a player is changing dimension ... I didn't managed to find a way to get what i want. Did anybody knows how could I do it ? Thanks in advance
    • December 22, 2013
    • 4 replies
  14. Knux14

    getWorldName()

    Knux14 replied to Knux14's topic in Modder Support

    Mmh sorry for the doublepost but, I have the world name but I need the Folder... I can't get it by this way and I can't just use the function "makeUsableName" because if the player has renamed the world it won't be the same folder ...
    • October 31, 2013
    • 7 replies
  15. Knux14

    Changing vanilla classes without editing them

    Knux14 replied to Evgenit's topic in Modder Support

    By using a coremod: http://www.minecraftforum.net/topic/1854988-tutorial-162-changing-vanilla-without-editing-base-classes-coremods-and-events-very-advanced/ or http://www.minecraftforge.net/wiki/Using_Access_Transformers or By using reflexion: http://tutorials.jenkov.com/java-reflection/index.html Coremod is the way to do because it's Forge based. But reflexion works too.
    • October 31, 2013
    • 6 replies
  • All Activity
  • Home
  • Knux14
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community