Jump to content

Zelnehlun

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Zelnehlun

  1. Hello, I know that there are tutorials for adding sound files to your mod, but I would like to download a .ogg sound file dynamically and use the SoundManager of Minecraft to play it. Can someone hint me the correct class/method names to do this? (Again the sound files are not available at start-up, they are beeing downloaded at runtime and the names are not known before) Thank you for your help in advance. Greetings Zelnehlun
  2. Thank you, somehow Windows 8 thought changing the path without telling me would be fine. Sorry for annoying, could have solved it by myself >.<
  3. Good Morning, since yesterday my gradle setup fails to download and/or setup forge when running the command: "gradlew.bat setupDecompWorkspace --refresh-dependencies" I deleted the .gradle cache twice but it did not really help. (Before I deleted the cache it said corrupted cache ) This is the error: Please let me know if you need additional information. Greetings Zelnehlun
  4. @TheGreyGhost Works like a charm actually. I listen for the tick start event and put the current item into a variable, in the tick end event I check if the current item has changed. If it changed lookup keys from 1 to 9 and reset it to the state before the tick if one of the keys is down. Of course, sometimes (very rare) it misses a key event and changes the item but that is not too bad. Thank you for your help! Updating Forge to be able to use the ClientCommandHandler, I will edit this post with the source code if someone looks into this thread
  5. Hello, I have two questions regarding switching the current item in hand and being notified when the player sends a chat message to the server (presses enter in chat). Q1: Is there a way to disable changing the current item in hand with the num keys? The code is in the Minecraft class or more specifically in the tick loop there is a for which seems to iterate 0 to 9 and checks if the corresponding key is pressed. Without editing the base class I would like to disable this behavior (switching by scrolling the mouse wheel should still be possible) Q2: Is there a ChatSendEvent? I would like to retrieve the message a player is about to send to the server. This is because I need to declare a client-side-only command, the server should not know about this command. (If this is not possible, no problem the first question is more important ) Thank you for reading =)
  6. How much particles are beeing spawned exactly? Sounds like you are hitting the particle limit, try increasing it if it is not maxed out yet.
  7. I am trying to communicate between the Forge Client and the Bukkit Server. It does not matter that the classes have similar package names because they are in completely different projects (Forge Minecraft Client & Bukkit Server Plugin)
  8. I learned a lot by reading this tutorial: http://www.minecraftforum.net/topic/1854988-tutorial-162-changing-vanilla-without-editing-base-classes-coremods-and-events-very-advanced/
  9. Hello, I created a Packet Handler on the Forge client side and a PluginMessageListener on the Bukkit server side. The server is sending a handshake packet to the client but the client does not receive the packet. This is the code: Mod class: @Mod(modid = "litecraft", name = "Litecraft", version = "0.1") @NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {LitePacketHandler.CHANNEL}, packetHandler = LitePacketHandler.class) public class Litecraft { PacketHandler class: http://paste.minecraftforge.net/view/a91fc7ec SERVER SIDE (Bukkit) PacketHandler: http://paste.minecraftforge.net/view/20e59795 onEnable method of the plugin: this.packetHandler = new LitePacketHandler(); Bukkit.getMessenger().registerIncomingPluginChannel(this, LitePacketHandler.CHANNEL, packetHandler); Bukkit.getMessenger().registerOutgoingPluginChannel(this, LitePacketHandler.CHANNEL); I put souts at the appropriate lines and tested it multiple times without success, I would be very thankful for your help. Greetings Zelnehlun
  10. First of all, I know editing base classes is highly discouraged. The problem is I started writing my mod using only MCP in 2012, somewhere at the start of 2013 I started using forge but I still have problems achieving the same results without editing base classes. I will try to list the goals: Is there a ResourcePackChangeEvent? I would like to get notified when the user selects a new resource pack so I can validate that it does not contain transparent textures. At the moment I hooked my function in the ResourcePackRepository class in the func_110615_a function Is there a hook for passSpecialRender in RendererLivingEntity? I am changing how the nametag is rendered above entities, is replacing the class via reflection the way to go? Is there a KeyPress Event? This one should be really simple but I am blind or stupid, currently using the KeyBinding class. I have a lot of other tasks but I guess I would be able to figure them out if someone can help me get started. This article seems to be very related: http://www.minecraftforum.net/topic/1854988-tutorial-162-changing-vanilla-without-editing-base-classes-coremods-and-events-very-advanced/ Is replacing methods and classes using ASM the best? Thank you for reading and hopefully not banning me from the forums because of editing base classes Greetings, Zelnehlun
×
×
  • Create New...

Important Information

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