Jump to content

Recommended Posts

Posted

I changed something and problem dissapeared. But now there is another. I cant stop teleporting from overworld to my dimension. I went inside portal and teleport to my dimension, and just after second teleporting back. And i even cant get out from that. Im trying to break portals, but it teleports me to new one. How to fix that? You dont need code for that actually.

Posted

You have to add a cooldown and not teleport the player during that cooldown period.  Look at Nether Portals.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

No.... You need to code something that prevents the player from teleporting for 10seconds after he/she used your portal.

i think this is the code you're looking for:

                    entity.timeUntilPortal = entity.getPortalCooldown();

I'm always happy to help others!

 

Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL

Posted

No.... You need to code something that prevents the player from teleporting for 10seconds after he/she used your portal.

i think this is the code you're looking for:

                    entity.timeUntilPortal = entity.getPortalCooldown();

 

I already have this code. And it still does the same. Also, in overworld it generates the world, but in my dimension it isnt. I think im teleporting back and back again in a try of finding any surface. Check out this part of my code;

 

 

public void updateTick(World par1World, int par2, int par3, int par4,

Random par5Random) {

super.updateTick(par1World, par2, par3, par4, par5Random);

 

if (par1World.provider.isSurfaceWorld()

&& par5Random.nextInt(2000) < par1World.difficultySetting) {

int l;

 

for (l = par3; !par1World.doesBlockHaveSolidTopSurface(par2, l,

par4) && l > 0; --l) {

;

}

 

if (l > 0 && !par1World.isBlockNormalCube(par2, l + 1, par4)) {

Entity entity = ItemMonsterPlacer.spawnCreature(par1World, 57,

(double) par2 + 0.5D, (double) l + 1.1D,

(double) par4 + 0.5D);

 

if (entity != null) {

entity.timeUntilPortal = entity.getPortalCooldown();

{

 

}

}

}

}

}

 

 

Posted

I think you need to take a look in your teleporter file maybe you have an error or typo there

I'm always happy to help others!

 

Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL

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.