Jump to content

[1.11.2] Screwed Up World Gen, Can't Find the Issue


HalestormXV

Recommended Posts

Alright at the risk of sounding and looking stupid I make this post. I'd like to preface this with I ported this code over from 1.9.2 or 1.8.2 (I can't exactly remeber as it has been quite some time) and I know there may have obivously been some changes, because this code worked in 1.9.2 and i beleive 1.8.2 on both Client and Server. But like I said I may be totally wrong as it has been quite some time. 

 

Now for some reason it works perfectly on the client but once you try to run the server with the mod it causes the server to crash with the following: https://pastebin.com/vqHcSXMs

 

It clearly appears to be a NullPointer in my WorldGen. Here is the:

WorldGen code: https://pastebin.com/eGLwqf8C

Main: https://pastebin.com/ikm5Y1fd

ClientProxy: https://pastebin.com/tU18bTPe

CommonProxy: https://pastebin.com/B5kpeXSJ

 

That should be all the relevant files. Perhaps it is because I don't have any .withProperty (I didn't think I needed properties unless 1.11.2 now requires them on my gens? Or maybe BlockMatcher is no longer used? Or hell maybe I am just registering it in the wrong spot on the proxy) Either way that is why I am posting here. I need some help, it's been a while since I have done modding and despite how dumb the error might be I will learn from it as I have done in the past. But I need the extra eyes to point it out to me. So I appologize in advanced for the noobyness but it has been some time. Also most of this setup was learned from old tutorials and older videos, that may have been good for their time, but perhaps there have been a number of changes that render those old tutorials obsolete (the way the main is setup, and proxies etc.) therefore rendering my code style obsolete at least for the 1.11.2.

 

EDIT:

I'm a flipping idiot. I registered all my items and blocks in my ClientProxy and not my CommonProxy (derp the server needs to know what is being registered also) and I was registering my worldGen in the CommonProxy. Moving my items and block registration into the CommonProxy fixed the issue. I'm guessing the same golden rule of ClientProxy ONLY handles renders and client side crap ONLY still stands strong? Feedback is still aprreciated or perhaps registering them this way is only a temp fix and something else may crash. 

Edited by HalestormXV
Link to comment
Share on other sites

gen_AngelicOre = new WorldGenMinable(eAngelusBlocks.angelicOre.getDefaultState(), 2, BlockMatcher.forBlock(Blocks.STONE));

eAngelusBlocks.angelicOre

This is null. And it is null because you are initializing your blocks/items in your client proxy(aka client side only). 

Edit - well, I'm late. Anyway you should not use proxies for common code, just move it somewhere else, pereferrably to the new registry events.

Edited by V0idWa1k3r
  • Like 1
Link to comment
Share on other sites

Yeah i noticed it after i made the post and made the edit up top. Thanks for the response though. Honestly sometimes i think the knowing "Your going to look like an idiot when somone sees this" fear sometimes makes you see the code better lol. At least for me because I may not be a phenomenal coder and still have a lot to learn, but stupid and silly mistakes like this always make me cringe especially when I know they are stupid and silly and I just can't see it.  Any tips that you might have with the layout of the code?

Edited by HalestormXV
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • okay.. ';D i did my good old technique of troubleshooting modpack (disabling ALL the mods and gradually in parts enabbling them and lauching game, enabling more mods, launching e.t.c) and managed to narrow it down to one mod.... it was "better smithing table" causing all the errors and making several mods to spit errors.. Same way by FIRSTLY turning on "better smithing tables" and seeing which mods it clashed with was: "Doggy Tallents Next" "bartering station" "Curios API" And further i wasn't able to check what mods conflicted b'cuz it was like: it was working with X mods, enabled 10 more mods, crashed. procedurally disabled all of them and still was crashing, disabled some more mods, worked. enabled back mods with which it was crashing and now it wasn't  i can't understand why and what mods are bad but i'm happy i somehow got the main error causer which again was "better smithing table". Without that mod everything works just fine. SOLVED (?)
    • So I'm creating yet another minecraft modpack and stumbled upon error I've never encoutered.. I tried to troubleshoot it myself and it always worked but this time I didn't manage.. Here is minecraft crash report: https://pastebin.com/EVqzdDKg I can't find how or from where to post debug.log  I'm sorry, can someone help me? (as a disclaimer - i've tried already reinstalling minecraft and java)
    • It works without mods, I've ran it through the launcher by itself and runs perfectly fine, when I open it through Forge I can get through to the launcher but when I go to open the world it loads then gives me the error code 1. Is there anymore info that could help diagnose it?
    • Also had the issue. GLAD TO TELL YOU I HAVE THE FIX! Create: Applied Kinetic literally says "Replace all inscriber recipes with Create's sequenced assembly recipe". When I turned off this mod it worked fine. I also didn't use that mod of the pack i played so it didn't matter for me.
    • Right now im trying to make an own mod for minecraft for the version 1.16.5 with forge but whatever i do it still doesnt fix the error this is my build.gradle : buildscript { repositories { maven { url = "https://maven.minecraftforge.net" } mavenCentral() } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:5.1.+' } } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'java' group = 'com.example' // Modify to your package name version = '1.0' archivesBaseName = 'flippermod' java { toolchain { languageVersion = JavaLanguageVersion.of(8) } } minecraft { version = "1.16.5-36.2.42" // Ensure this matches your Forge version mappings channel: 'official', version: '1.16.5' runs { client { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' mods { flipper_mod { sourceSets.main.output } } } } } repositories { maven { url = "https://maven.minecraftforge.net/" } mavenCentral() } dependencies { minecraft "net.minecraftforge:forge:1.16.5-36.2.42" } and this one is my settings.gradle:  pluginManagement { repositories { gradlePluginPortal() maven { name = 'MinecraftForge' url = 'https://maven.minecraftforge.net/' } } } plugins { id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' } rootProject.name = 'flippermod' this one is the mods.tml    modLoader="javafml" loaderVersion="[36,)" modId="flippermod" version="1.0.0" displayName="Flippermod" and the last one is the gradle-wrapper.properties distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip dc :"code_slivki"
  • Topics

×
×
  • Create New...

Important Information

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