Jump to content

Floydman

Members
  • Posts

    4
  • Joined

  • Last visited

Floydman's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. This is a follow-up to a question I asked earlier on Discord but didn't get resolved: I am working on a custom sky renderer, and my goal is to be able to take 2 vectors, one representing the in-game y-axis and the other pointing toward the object I want to render, generate a quaternion that rotates the first to become the second, and give that quaternion to the MatrixStack to render the object in the correct place. When I brought it up before, I was a little unsure of my vector math, but I have now verified that when using my quaternion to rotate the first vector, it perfectly (or almost perfectly since I'm dealing in floats) rotates to become the second vector. (I've even put together a Mathematica workbook that shows all the vectors behaving like they should.) However, when giving this quaternion to the MatrixStack, I still get very odd behavior. (For example, even with no orbital or axial tilt, the sun renders a very odd path instead of it's normal vanilla circle.) So what I'm thinking is that I must be messing up the rendering code, even though I basically copied how Minecraft renders its sky objects. Here are the two classes I am using (one for vector math and the other for rendering): https://gist.github.com/TheFloydman/3443e0b888dd04f2770a785080e8b76d I am aware there are simpler ways to render a stationary sun around which the Minecraft planet is orbiting, but I'm using this as a simple situation to prepare for something more complex, like a planet or comet is is orbiting the sun. If I can describe an object's current position with a vector, I want to be able to render it correctly. Edit: Adding an animation to demonstrate what should be happening. The black vector is the current rotation of the observer, red is the position of the observer, green is the position of another orbiting planet, and blue is the vector generated when I transform the black rotation vector with the quaternion I generate. This view is from overhear, but the orbital inclinations of each planet is 7 degrees, and the observer's planet is tilted 23 degrees. As you can see, no matter where the black observer rotation and green other planet vectors are pointed, the blue vector always points from the observer's planet to the other planet.
  2. I just found the fix: For whatever reason, in runClient.launch and runServer.launch the mapEntry MOD_CLASSES includes the main class multiple times. Removing all but the first two resolves the issue.
  3. I am using Forge 25.0.44. I only have one @Mod annotation, but whenever I run or debug from within Eclipse, I get this error: [19:18:35.605] [pool-2-thread-1/DEBUG] [ne.mi.fm.lo.mo.Scanner/SCAN]: Scanning C:\Users\danie\Documents\GitHub\modid\bin\main with language loader javafml [19:18:35.605] [pool-2-thread-1/DEBUG] [ne.mi.fm.ja.FMLJavaModLanguageProvider/SCAN]: Found @Mod class thefloydman.modid.ModId with id modid [19:18:35.605] [pool-2-thread-1/DEBUG] [ne.mi.fm.ja.FMLJavaModLanguageProvider/SCAN]: Found @Mod class thefloydman.modid.ModId with id modid [19:18:35.606] [pool-2-thread-1/ERROR] [ne.mi.fm.lo.mo.BackgroundScanHandler/SCAN]: An error occurred scanning file Mod File: C:\Users\danie\Documents\GitHub\modid\bin\main java.util.concurrent.CompletionException: java.lang.IllegalStateException: Duplicate key net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget@5c11fbc6 This causes Minecraft to crash the moment it loads. A few other folks on Discord have said they have the same issue. One said it just stopped happening. The other said they switched to IntelliJ. The error does not occur when using runClient from the command prompt. I have tried a clean install (and copying over the source files).
×
×
  • Create New...

Important Information

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