Jump to content

[Solved] Activate Custom Portal with Vanilla Flint and Steel


general3214

Recommended Posts

I'm trying to activate my custom portal by using Flint and Steel, but all I get is Fire.

 

This is the code I have:

mod_MOreTrees: http://paste.minecraftforge.net/view/9319d805

BlockPortalOreleans: http://paste.minecraftforge.net/view/d570fac5

ChunkProviderOreleans: http://paste.minecraftforge.net/view/8c1f1820

PortalPositionOreleans: http://paste.minecraftforge.net/view/94eddfb0

TeleporterOreleans: http://paste.minecraftforge.net/view/d5128c7b

WorldProviderOreleans: http://paste.minecraftforge.net/view/2f77499a

Before you even think about modding,

Link to comment
Share on other sites

To answer the question in the op, I'm afraid you can't do it. The portal is created using code in the BlockFire class

 

This bit to be specific

 

    public void onBlockAdded(World par1World, int par2, int par3, int par4)
    {
        if (par1World.provider.dimensionId > 0 || par1World.getBlockId(par2, par3 - 1, par4) != Block.obsidian.blockID || !Block.portal.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));
            }
        }
    }

 

 

and it only allows a portal to be created in Obsidian to the Nether

so you'd have to edit the base class to get it to go to your custom dimension and then, I believe, you wouldn't be able to go to the Nether anymore

 

what you need to do is create your own custom fire class that will create your custom portal block and your own custom flint and steel to create the fire

I can show you a good tutorial for it all if you'd like

Link to comment
Share on other sites

Yes,he needs to call tryToCreatePortal on his own.

There are countless solutions:

-have it in onBlockActivated

-have it in onNeighbourBlockChange

-use PlayerInteractEvent

-things i didn't think of...

 

I will agree with onNeighbourBlockChange.

 

That would be the most effective.

 

Try using onBlockAdded onNeighbourBlockChange. Do a check to see if the portal frame is built (will have to look in the two directions possible) then check if there is a fire block on top of any of the two base portal frame blocks etc.

 

I apologize for the strike throughs contradicting, I am horribly tired xD

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

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.