Jump to content

Recommended Posts

Posted

I have been working on my dimension for quite a while, but I've been getting this error where it will keep teleporting me back and forth from my dimension to the Overworld. If I get lucky with /kill, I can end up in my dimension, but I'm aiming for it to work like a regular portal should. Here's my code:

 

My Portal Block:

 

  Reveal hidden contents

 

 

My Teleporter:

 

  Reveal hidden contents

 

 

My WorldProvider:

 

  Reveal hidden contents

 

 

My ChunkProvider:

 

  Reveal hidden contents

 

 

So, that's my code. It's not a crashing error, so I don't have a crash report.

-Mitchellbrine

 

  Quote

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

  Quote
I don't want your charity, I want your information
Posted

I'm having the same problem, if you haven't already figured it's caused by the teleporter file dropping the player directly on the portal. I'm still looking for a way to fix it, I'll let you know if I have anything.

I am the current head modder for the Metroid Prime Suits mod. I have no other staff members, so I'm hiring! I also co-own the SkyTekkit server.

width=600 height=126http://i1276.photobucket.com/albums/y480/Sypher40/MPSbanner_zps9d50d86a.png[/img]

Posted

Thank you!

-Mitchellbrine

 

  Quote

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

  Quote
I don't want your charity, I want your information
Posted

Here use this :

 

 

  Reveal hidden contents

 

Make sure your teleporter is extending to Teleporter. That way you can use transferPlayerToDimension properly. (This will stop the teleport from happening back and forth and make it an instant teleport when you walk into it.)

 

Other notes: mod_MainClass.DimensionTest = my dimension ID & TeleporterTestDimension will be your teleporter, and then the dimension id at the very end.

If I helped, please click the 'Thank you'!

 

 

 

 

.

Posted

THANK YOU SO MUCH!!!!!!!!!!!!! BTW, is there any way to do this without ModLoader methods? If so, I'd like to be informed so I can make my mod SMP compatible.

-Mitchellbrine

 

  Quote

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

  Quote
I don't want your charity, I want your information
Posted

No problem, now can you help me with an issue I have with my dimension stuff? When you build your portal, how do you open it with fire? I want to make a custom block for it so i dont edit base classes. So if you are doing it like that, please share how your doing it. Because I cant for the life of me get it to open.

If I helped, please click the 'Thank you'!

 

 

 

 

.

Posted

If you want it to build the portal in like a placer class, instead of putting in a bunch of your mod portal blocks, put in your fire block. But I see what you mean. You want your custom fire to ignite it, right? So in your fire class, replace what's there with the following:

 

public void onBlockAdded(World par1World, int par2, int par3, int par4)
{
if (par1World.provider.dimensionId > 0 || par1World.getBlockId(par2, par3 - 1, par4) != BLOCKUSED4PORTALFRAME.blockID || !CUSTOMPORTALBLOCK.tryToCreatePortal(par1World, par2, par3, par4))
if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !this.canNeighborBurn(par1World, par2, par3, par4))
{
par1World.setBlockToAir(par2, par3, par4);
}
else
{
par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, this.tickRate(par1World) + par1World.rand.nextInt(10));
}
}

 

If you want it to spawn in a frame, replace whatever this is in your portal class with:

public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4)
{
byte b0 = 0;
byte b1 = 0;
if (par1World.getBlockId(par2 - 1, par3, par4) == BLOCK4PORTAL.blockID || par1World.getBlockId(par2 + 1, par3, par4) == BLOCK4PORTAL.blockID)
{
b0 = 1;
}
if (par1World.getBlockId(par2, par3, par4 - 1) == BLOCK4PORTAL.blockID || par1World.getBlockId(par2, par3, par4 + 1) == BLOCK4PORTAL.blockID)
{
b1 = 1;
}
if (b0 == b1)
{
return false;
}
else
{
if (par1World.getBlockId(par2 - b0, par3, par4 - b1) == 0)
{
par2 -= b0;
par4 -= b1;
}
int l;
int i1;
for (l = -1; l <= 2; ++l)
{
for (i1 = -1; i1 <= 3; ++i1)
{
boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3;
if (l != -1 && l != 2 || i1 != -1 && i1 != 3)
{
int j1 = par1World.getBlockId(par2 + b0 * l, par3 + i1, par4 + b1 * l);
if (flag)
{
if (j1 != BLOCK4PORTAL.blockID)
{
return false;
}
}
else if (j1 != 0 && j1 != YOURMODNAME.YOURMODFIRE.blockID)
{
return false;
}
}
}
}
for (l = 0; l < 2; ++l)
{
for (i1 = 0; i1 < 3; ++i1)
{
par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, mod_OtherWorld.NewPortal.blockID, 0, 2);
}
}
return true;
}
}

 

If that doesn't help, PM me!

-Mitchellbrine

 

  Quote

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

  Quote
I don't want your charity, I want your information
Posted

Ah sh.. Thanks bro! I've been trying to fix this for days! Applaud to you good sir. (I didn't need the onBlockAdded)

If I helped, please click the 'Thank you'!

 

 

 

 

.

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.