Posted August 5, 201312 yr 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, please learn basic Java.
August 5, 201312 yr When is public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4) being called ?
August 5, 201312 yr Author When is public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4) being called ? "tryToCreatePortal" is located in BlockPortalOreleans. Here's the code: http://paste.minecraftforge.net/view/d570fac5 Before you even think about modding, please learn basic Java.
August 5, 201312 yr I know where it is. How do you think I found the name and arguments ? Now, please answer my question.
August 6, 201312 yr 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
August 6, 201312 yr 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...
August 6, 201312 yr 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 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
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.