Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

SoLegendary's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. Following creating a top-down view mod of the game, I want to also be able to pan the camera in the X-Z plane by moving the mouse to the edges of the screen, like a classic top-down strategy game or MOBA. This works fine in full screen, but in windowed mode, there is nothing keeping the mouse inside the window so it's very easy to just move off of it out to the desktop and subsequently lost. Since mouse coordinates are only tracked on every tick, moving the mouse to the edges really fast also means it's last known coordinates may be too far from the edge to begin panning. As a bonus, if this is possible, could it also be made active only for certain GUI screens so that the user can still get the mouse out without having to alt-tab? I know what I'm trying to do might be out of scope of what Forge can do since it deals with the application window itself, I still want to make sure there isn't any in-forge options I'm missing.
  2. Resurrecting this thread to ask: Is there a way to enable keybindings while in a GUI? I've been able to use GuiScreenEvent.KeyboardKeyEvent but for detecting held buttons it has a delay after the initial press, just like when holding down a button to repeat the same character while typing. The same is true for getGui().keyPressed(). However, keybindings do not have this issue and are guaranteed to execute code smoothly when a key is held. I've noticed that some GUI screens do in fact allow keybindings when open, like the player inventory screen. Is there a way to also allow use of keybindings on custom GUIs?
  3. Actually I solved it a different way by just setting the camera entity to face downward above the ground and hard-setting the FOV to 180 to effectively render everything in range, then just manually offsetting the camera angle up by 45deg. That said, this method would definitely improve performance a lot. Thanks!
  4. Do you know another method for editing the view frustum or disabling frustum culling entirely? I've tried looking at Minecraft.levelRenderer as it has quite a few references to view frustums like capturedFrustum, viewArea, frustumPoints, frustumPos, except when I use the access transformer to make these public in order to read them, they all seem to be null or 0. For some context, I've implemented an orthographic camera, but when it's zoomed out, you can see behind the player, which isn't rendered due to frustum culling: Increasing FOV helps somewhat, but I can only get it to a maximum of 180 (ie. a semicircle rendering cone) using the FOV modifier event before it just wraps around again. If there's a way to get it to 360 somehow that would also solve the issue.
  5. I have only recently started modding using Forge, but I found very quickly that I was able to modify the vanilla source code directly by simply right clicking a classname -> Go to Declarations or Usages in IntelliJ. This would open up the source .jar file at the path: \build\fg_cache\net\minecraftforge\forge\1.16.5-36.2.0_mapped_official_1.16.5\forge-1.16.5-36.2.0_mapped_official_source_1.16.5.jar which I could easily pull out of the .jar archive, edit with a notepad and throw back in. I was doing this to disable frustum culling in ClippingHelper.java (ie. rendering outside of the player's usual view) for a camera mod I was working on. However, as of today making these changes seemed to suddenly have no effect. I saved the changes, deleted my .gradle and build folders, invalidated my caches and reran the gradlew genIntellijRuns to rebuild them and suddenly that source jar no longer exists and I cannot find any vanilla .java files anymore, only .class files which are not editable by text editor. My mod still runs perfectly fine, minus the changes to the ClippingHelper class I made of course. So my questions are: Where did this source .jar go? Is there an alternative way to edit Vanilla .java source files like I was doing? Is there an alternative to editing Vanilla classes in the first place? As proof I'm not crazy, I've attached the original ClippingHelper.java class below that I was previously able to find under that path. https://pastebin.com/MvFtQaTH
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.