Jump to content

[SOLVED] [1.13.2] getWorld for custom dimension type always returns null


Recommended Posts

Posted (edited)

Hello! Whenever I try to teleport player to custom dimension using custom block I am getting error:

  Reveal hidden contents

 

I've been checking and it seems that the problem is:

  Reveal hidden contents

It's firing the NPE. 

So my first idea was that I am registing my custom dimension in the wrong way. Am I missing something?
Main mod file:

  Reveal hidden contents


RegistryHelper:

  Reveal hidden contents


ModDimensionKathairis

  Reveal hidden contents


DimensionKathairis

  Reveal hidden contents


Custom BlockPortal colliding method

  Reveal hidden contents


KathairisTeleportManager teleport method

  Reveal hidden contents


I think that I might be registrying my dimension wrongly, so I am asking you guys for some help :D Thanks, Krevik.

Edited by Krevik
Posted (edited)
  Quote

mcServer.getWorld(Kathairis.kath_Dim_type)

Expand  

 

mcServer is probaby null here.

Edited by larsgerrits

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

I fixed this in 1.12.2 by copy/pasting a McJty tutorial. I was getting a slightly different crash there. Something like "I tried to tick this entity that stopped existing mid-tick? Weird?"

 

I had to implement a short CustomTeleporter class to make the inter-dimensional travel official. https://wiki.mcjty.eu/modding/index.php?title=Commands-1.12

 

And if this doesn't work in 1.13.2 then please tell me because I wanted to release the first version of my mod on 1.13.2.

 

 

Posted (edited)
  On 2/26/2019 at 3:12 PM, Catastrophe said:

I fixed this in 1.12.2 by copy/pasting a McJty tutorial. I was getting a slightly different crash there. Something like "I tried to tick this entity that stopped existing mid-tick? Weird?"

 

I had to implement a short CustomTeleporter class to make the inter-dimensional travel official. https://wiki.mcjty.eu/modding/index.php?title=Commands-1.12

 

And if this doesn't work in 1.13.2 then please tell me because I wanted to release the first version of my mod on 1.13.2.

 

 

Expand  

Unfortunatelly It won't help. The crash is fired before custom Teleporter class is even loaded, so... it's not problem with teleporter class (at least now xD)
EDIT: Anyway I see that teleportation code is in teleporter class, so checked it for another mcServer getting method - also doesn't work :/

Edited by Krevik

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



×
×
  • Create New...

Important Information

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