Jump to content

[1.8] [RESOLVED] Custom dimension teleporter


xJon

Recommended Posts

Hi,

 

How can I change (or override) the default (nether) teleporter with a new one, which will basically be one block?

How can I basically get rid of the nether portal spawning when the player enters the new custom dimension?

 

Thanks for any support! :P

Why are you reading this?

Link to comment
Share on other sites

Create a custom teleporter.  Look up the code that is called from a portal, extend it, and modify it to meet your purposes.  Specifically get rid of the create portal on other side.

 

Create a block, that when collided or interacts calls up your custom teleporter.

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites

Create a custom teleporter.  Look up the code that is called from a portal, extend it, and modify it to meet your purposes.  Specifically get rid of the create portal on other side.

 

Create a block, that when collided or interacts calls up your custom teleporter.

I made a custom teleporter class that extands the Teleporter (vanilla) class and I've overridden the "makePortal" method. I tried to insert "setBlockState" in it, without all the other portal-making code, but I'm not sure at all if this is the way to do it.

The problem though, is that I don't really know how to call the Teleporter. I'm using "travelToDimension" to move the player on a block activate (I gave up currently on the GUI with one button, seems pretty useless). So basically nothing calls the custom Teleporter class.

I think I just totally understand the Telleporter class so I'm doing something wrong.

Thanks for the reply :)

Why are you reading this?

Link to comment
Share on other sites

Can't remember the method, entitycollides or somethign like that.  It will check if serverside, call the players portaltime, and then after certain conditions call the teleporter code.

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites

Can't remember the method, entitycollides or somethign like that.  It will check if serverside, call the players portaltime, and then after certain conditions call the teleporter code.

I'm currently unable to test that. When I'll be able to I'll see how it goes. Thanks anyway for replying.

Why are you reading this?

Link to comment
Share on other sites

Can't remember the method, entitycollides or somethign like that.  It will check if serverside, call the players portaltime, and then after certain conditions call the teleporter code.

Alright, I figured out how - I had to add the required arguments to transferPlayerToDimension :P

Also I found out that I can override placeInPortal and set a new block state in the entity pos to make my block when the player changes dimemsion.

My only problem now is that when the player come back to the overworld, it makes ANOTHER portal block, so each time it changes dimension the Teleporter class makes another teleport block.

What I can do so the teleporter class will make my teleport block to act like it should?

Thanks :)

Why are you reading this?

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



×
×
  • Create New...

Important Information

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