Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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,

When is

public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4)

being called ?

I know where it is. How do you think I found the name and arguments ?

Now, please answer my question.

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

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...

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

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.