Posted March 28, 20169 yr Where is the code (which class) that causes a portal to be created if a fire block gets on a certain frame of obsidian? How can I modify it to use my own custom lighting item (not fire) to activate, if I decide to do so? I've already made the portal block but I just want to be able to light a portal and get it rather than spawning it in all the time.
March 29, 20169 yr If you have your own custom portal block, just override #onBlockActivated and check if the player is using the item to light the portal and the portal frame is correct, then activate your portal. http://i.imgur.com/NdrFdld.png[/img]
March 29, 20169 yr Author By "custom portal block" I meant the actual portal block (i.e. the one that you touch that sends you to the other dimension). Do I put onBlockActivated() there? It sounds like you're talking about the portal frame.
March 29, 20169 yr Do you not have a custom frame? If not, then you can subscribe to PlayerInteractEvent and check for RIGHT_CLICK_BLOCK + obsidian, then do the same thing I mentioned above. http://i.imgur.com/NdrFdld.png[/img]
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.