lawremi / CustomOreGen

Custom Ore Generation mod for Minecraft, originally by JRoush
Artistic License 2.0
40 stars 25 forks source link

1.10 Update #155

Closed Draco18s closed 7 years ago

Draco18s commented 8 years ago

Just so you guys are aware, I've done a quick and dirty update to 1.10 https://github.com/Draco18s/CustomOreGen/tree/1.10-Update

Not doing this as a PR because there's a bunch of stuff that should be cleaned up or is just broken.

But oregen works great.

lawremi commented 8 years ago

Awesome, thanks for taking this on. Presumably the wireframe overlay is broken due to the massive rendering overhaul in 1.8. I knew that would be the toughest thing to port.

Draco18s commented 8 years ago

Also figured out issue 1 mentioned above (and pushed to the branch).

Draco18s commented 8 years ago

Giving the rendering stuff a cursory glance right now. Also, there's a bug still in the cogEnableDebugging command (discovered that a little while ago).

Draco18s commented 8 years ago

Ah here we go.

Looks like rendering is running on the wrong thread (MC is very multithreaded now).

[00:34:32] [Netty Local Client IO #0/ERROR] [FML]: Exception caught during firing event net.minecraftforge.fml.common.network.FMLNetworkEvent$ClientCustomPacketEvent@11820e0c: java.lang.RuntimeException: No OpenGL context found in the current thread. at org.lwjgl.opengl.GLContext.getCapabilities(GLContext.java:124) ~[lwjgl-2.9.4-nightly-20150209.jar:?] at org.lwjgl.opengl.GL11.glGenLists(GL11.java:1412) ~[lwjgl-2.9.4-nightly-20150209.jar:?] at CustomOreGen.Client.ClientState.addDebuggingGeometry(ClientState.java:192) ~[ClientState.class:?]

The Error: null in the command ties back into FMLInterface.getDisplayString having a null ModContainer object.

I don't know how to deal with either of these.

lawremi commented 7 years ago

Thanks for taking the initiative on this. It's unfortunate that your branch is 236 commits behind the master. This is unlikely to be a clean merge. I will create a branch on my fork now and incorporate everything you've already figured out. There is a lot of general code cleanup that should probably happen prior to the branch. Did the compiler point out the stripped generics, missing override annotations, etc?

Draco18s commented 7 years ago

I grabbed the version that was current on GitHub when I started. I didn't do a general cleanup for things like overrides, I just went through every class that was showing an error and worked out what needed to change. Most of them were easy (SRG methods that gained a real name) but there were a handful that were more complicated.

Even if you can't merge directly, you should be able to look at my branch to see what I did. The biggest change was in how to retrieve the MinecraftServer object. Most were able to do it through a world object, the others use FMLCommonHandler.INSTANCE.getMinecraftServerInstance()

lawremi commented 7 years ago

Alright, I've got it compiling in the 1.10 branch on my fork. Your changes were a great guide. Next step is running.

Draco18s commented 7 years ago

Awesome! Glad to help out.

lawremi commented 7 years ago

I just pushed a lot of fixes, including the debugging geometry rendering. There are no more obvious bugs. Btw, I've been having a lot of fun playing with your Artifacts mod. It's brilliant.

Draco18s commented 7 years ago

Artifacts is indeed an interesting one. It'll get updated to 1.10 eventually too. The baked model system is going to make it a pain in the ass, though.

Draco18s commented 7 years ago

Pulled your update branch, had two classes throwing errors (two sorts) that were easy for me to fix. One was a getBiome that had to be getBiomeGenForCoords and one that was ChunkPos.asLong that needed to be ChunkPos.chunkXZ2Int (MCP name differences?) but GODS having wireframes again is beautiful.

lawremi commented 7 years ago

Yes, MCP differences. I am using mappings version snapshot_nodoc_20161009.

Draco18s commented 7 years ago

I should update to the newer ones, I'm just a lazy bastard. (also, commands are still busted, but I think you knew that).

lawremi commented 7 years ago

I haven't tested all of the commands, actually just /cogInfo, which seems to work for me. Which ones do you know are broken?

Draco18s commented 7 years ago

Enable Debugging and Cog Setting Ex AFAICT they make changes to the wireframe rendering and causes it to seize up when it tries (likely a threading issue). (pretty much the only two commands I use... :P )

lawremi commented 7 years ago

Pretty sure I just pushed a fix for those. Now we just need to update the configs for the mods that are at 1.10 already (separate issue).

Draco18s commented 7 years ago

Cool, those work now. Loading up an existing save did crash though. http://pastebin.com/YzfawLQM

lawremi commented 7 years ago

Weird. Perhaps something got corrupted, as it's internal to that hash map. Or there is a race condition.

Draco18s commented 7 years ago

Was just a test world, so I nuked it, but figured I'd report the error anyway.