Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#25 Chunks are not generated on 1.10.2 #36

Merged
merged 2 commits into from
Nov 18, 2016

Conversation

JoshuaRogers
Copy link

I was able to get the terrain to properly generate by changing loadChunk to provideChunk and then marking that it needed saving.

In the process, I found some bounds checking issues that caused my server to generate 32,000 chunks more than I wanted.

@gecgooden gecgooden merged commit 050e336 into gecgooden:master Nov 18, 2016
@gecgooden
Copy link
Owner

Thanks for doing that Joshua. I hadn't had the opportunity to have a good look at the problem

@TheBrain0110
Copy link

Built the new source, and still crashing as per #26. Is the fix from the file you posted there in the master branch?

@JoshuaRogers
Copy link
Author

Unfortunately, no. In order to get it running, I had to patch up the jar that gecgooden provided with the code changes to allow generation on 1.10.2. If need be, and with gecgooden's blessing, I could share the patched jar.

@TheBrain0110
Copy link

Hmmm. I'd tried that when building from the last commit, but couldn't get it to work. But I was trying to move files from the patched jar into the freshly compiled one.

If you've only changed Utilities.java, I'll try moving just that class into his...

@JoshuaRogers
Copy link
Author

My patched jar consisted of taking Utilities$Region.class and Utilities.class from my branch and patching them into the last jar that gecgooden provided in #26.

As an aside, I also changed my build.gradle to use a mapping of "snapshot_20161101", though I'm not sure if that part was necessary.

@gecgooden
Copy link
Owner

I built and tried this request (via gradle runServer) without any crashes, and the chunks seemed to generate correctly. What modpacks/forge versions are you trying?

@TheBrain0110
Copy link

I'm using FTB Infinity Lite 1.2.0, forge 2124.

I added Dynmap and Worldedit server side, but I don't think that should make a difference? A lot of people have reported the AbstractMethodError on different packs...

On Nov 18, 2016, 21:42 -0500, George Gooden notifications@github.com, wrote:

I built and tried this request (via gradle runServer) without any crashes, and the chunks seemed to generate correctly. What modpacks/forge versions are you trying?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub (#36 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/ADvsul8rQbm1s-yf407yrcBpw26gp3Tyks5q_mILgaJpZM4K2Hin).

@gecgooden
Copy link
Owner

Okay, I'll try that one out first. It shouldn't make a difference with those mods added.

@TheBrain0110
Copy link

TheBrain0110 commented Nov 21, 2016

So I built a jar by patching in Utilities$Region.class and Utilities.class to the jar from #26 as @JoshuaRogers said, and the server loads without crashing.

But when I go to run the RADIUS command, I get a NoSuchMethodError, and it does nothing:

> chunkgen radius
[14:53:26] [Server thread/INFO]: chunkgen radius <x> <z> <radius> [dimension] [logToChat]
> chunkgen radius 0 0 10 0 false
[14:53:33] [Server thread/INFO]: An unknown error occurred while attempting to perform this command
[14:53:33] [Server thread/WARN]: Couldn't process command: 'chunkgen radius 0 0 10 0 false'
java.lang.NoSuchMethodError: net.minecraft.util.math.Vec3d.distanceTo(Lnet/minecraft/util/math/Vec3d;)D
        at com.gecgooden.chunkgen.util.Utilities.lambda$queueChunkGeneration$2(Utilities.java:124) ~[Utilities.class:?]
        at com.gecgooden.chunkgen.util.Utilities.queueSquare(Utilities.java:110) ~[Utilities.class:?]
        at com.gecgooden.chunkgen.util.Utilities.queueRegion(Utilities.java:100) ~[Utilities.class:?]
        at com.gecgooden.chunkgen.util.Utilities.lambda$queueAllRegions$1(Utilities.java:88) ~[Utilities.class:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:1.8.0_102]
        at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352) ~[?:1.8.0_102]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_102]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_102]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_102]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_102]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_102]
        at java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:423) ~[?:1.8.0_102]
        at com.gecgooden.chunkgen.util.Utilities.queueAllRegions(Utilities.java:87) ~[Utilities.class:?]
        at com.gecgooden.chunkgen.util.Utilities.queueChunkGeneration(Utilities.java:153) ~[Utilities.class:?]
        at com.gecgooden.chunkgen.util.Utilities.queueChunkGeneration(Utilities.java:129) ~[Utilities.class:?]
        at com.gecgooden.chunkgen.commands.ChunkGenCommand.func_184881_a(ChunkGenCommand.java:73) ~[ChunkGenCommand.class:?]
        at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:104) [k.class:?]
        at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:83) [k.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:423) [ld.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:388) [ld.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]

If I run the ZONE command, the server crashes with:

[14:57:53] [Server thread/INFO]: chunkgen zone <x> <z> <xSize> <zSize> [dimension] [logToChat]
> chunkgen zone 0 0 10 10 0
[14:58:02] [Server thread/INFO]: Enqueued 1764 chunks to generate
[14:58:02] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NoSuchMethodError: net.minecraft.server.MinecraftServer.worldServerForDimension(I)Lnet/minecraft/world/WorldServer;
	at com.gecgooden.chunkgen.util.Utilities.generateChunk(Utilities.java:61) ~[Utilities.class:?]
	at com.gecgooden.chunkgen.handlers.TickHandler.onServerTick(TickHandler.java:34) ~[TickHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_161_TickHandler_onServerTick_ServerTickEvent.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) ~[EventBus.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:274) ~[FMLCommonHandler.class:?]
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:602) ~[MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]

So, it looks like there's still something missing in Utilities.java?

@TheBrain0110
Copy link

TheBrain0110 commented Nov 21, 2016

There also seems to be missing a bit of localization between client and server. Using the commands from the server console works fine, gives usage help & feedback, etc.
I tested giving the commands as a player ingame, and all I ever got back was

[15:37:30] [Client thread/INFO]: [CHAT] commands.chunkgen.usage
[15:37:34] [Client thread/INFO]: [CHAT] commands.chunkgen.usage.radius

In fact, even as the player chat printed that, the server console showed the correct feedback:

[15:37:30] [Server thread/INFO]: [TheBrain0110: chunkgen <zone|radius|stop>]
[15:37:34] [Server thread/INFO]: [TheBrain0110: chunkgen radius <x> <z> <radius> [dimension] [logToChat]]

Also if you give an invalid number of arguments, it throws an ArrayIndexOutOfBoundsException to the console instead of repeating the usage message or something. But I was expecting that one, I noticed it when looking through ChunkGenCommand.java. (You have case statements for astring.length == 1, 4 & 5, but no handler for 2&3 arguments). Not super important, just thought I'd mention it, could cleanup the code to account for all cases and give correct feedback.

> chunkgen radius 10
[15:30:28] [Server thread/INFO]: An unknown error occurred while attempting to perform this command
[15:30:28] [Server thread/WARN]: Couldn't process command: 'chunkgen radius 10'
java.lang.ArrayIndexOutOfBoundsException: 2
        at com.gecgooden.chunkgen.commands.ChunkGenCommand.func_184881_a(ChunkGenCommand.java:63) ~[ChunkGenCommand.class:?]
        at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:104) [k.class:?]

Should I go ahead and open separate issues here? I'm kinda just tagging on my feedback as I test this build...

@gecgooden
Copy link
Owner

Yeah, could you open some issues for the localization and ArrayIndexOutOfBoundsException?

I rebuilt the mod locally and wasn't getting that crash. I'll verify and upload it for you to try when I get home from work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants