Glowstone
Glowstone copied to clipboard
Cannot create nether portals
Right now fireNetherPortal() is called when you use flint and steel on obsidian, but that function is empty. I'm gonna start filling that function to fire the nether portal. It would be a bit more complex, at least I think, than most things in java I've done before, but I think I can do it.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
On the road is the vanilla way to reach the hell, yay! The more complex thing I guess would be to create a corresponding portal in the nether, but I don't know if you're targeting this yet.
Well, I've been messing around with some stuff in the file that contains the function to fire a nether portal, so I thought might as well work on it while I'm focused on this file.
I'm just not sure how to fire an event if the player walks into the nether portal, the creation of it should be easy, just the player walking into the portal and the spawn location in the nether will be the hard part, I could rig how it spawns in the nether for now.
How do I add labels, the way github says I should doesn't work for me for some reason
I think you must be a collaborator to be able to set a label.
For the event, do you meant to fire a bukkit event ?
@jimmikaelkael Yeah
You can use the EventFactory, for example a grass growth event:
BlockGrowEvent growEvent = new BlockGrowEvent(b, blockState);
EventFactory.callEvent(growEvent);
if (!growEvent.isCancelled()) {
blockState.update(true);
}
Just checked on Bukkit API, there's a bunch of different portal events.
@jimmikaelkael Awesome!
I think that as a start, lighting an obsidian block should create a portal above it, and the portal should teleport you to the nether spawn.
@mastercoms you're right, I think searching for some available room space at the corresponding coordinates in the nether to place a portal can be a bit tricky.
How do I update my local repository to Glowstone's most recent commits?
git pull
It's been a while, Christmas break came and over break I built a new computer and I still haven't got things set up. I'll try and start on this during this week while I have time, but I have a college class and got to get stuff done, so who knows when this will be finished
No worries!
This ticket needs categorization on the waffle board.
Has this ticket seen any movement or has there been any action expected since the previous comment?
Hi, everyone! After several months I re-discovered the Glowstone project again, and now that I've some spare time I'll try to do my bit working on this feature. So far I've managed to implement a very basic logic to find an arbitrary big obsidian "frame", but I can't fill it with nether portal blocks. I tried other blocks with no problems (even the ender portal block, which surprisingly creates a vertical and functional ender portal), but when using the nether portal block it simply doesn't work. I did the following with no success:
- Changing every block with setType(Material.PORTAL): they turn into air (I think this is the expected behavior).
- Changing every block with setType(Material.PORTAL, false) (disables applyPhysics): they stay as portal blocks, but they're invisible and behave strangely (eg if I replace one of them with any other block, it disappears if disconnecting from server and re-connecting again).
- Using the /setblock command to manually place portal blocks in the server: same as before, they're invisible, have a strange behavior and never make any sounds nor particle effects.
I can't figure what needs to be done server side to display the nether portal texture (in single player, using /setblock portal works perfectly). Do you have any ideas?
Looking through spigot it seems that portals store special data
Most servers provides warps and prohibit own portals anyways, so this is a minor problem imo. But at some day, it would be quite useful if that starts working, too.
The ender portal works? :o it also teleports you?
@DeprecatedLuke Thanks for the info! I'll dig around a little bit more to see if I can find something useful.
@FastFelix771 I know it's a minor thing, that's why I've chosen it to get more familiar with the code. And yep, an obsidian frame filled with ender portal blocks actually warps you to The End! Didn't try to build a normal ender portal though, but I guess it should work the same.
setblock triggers psychics event btw edit: my guess psychics still run even if you set it to false
Portal blocks can only exist within a nether portal structure. When the block is updated and detects it is not part of such a structure, it will remove itself.
http://minecraft.gamepedia.com/Nether_Portal_(block)
Perhaps the client refuses to display the portal block because it is not part of a nether portal structure.
Also do we have a block state for Nether portals? http://minecraft.gamepedia.com/Nether_Portal_(block)#Data_values
@mastercoms I finally got it working, the problem was in the direction of what @DeprecatedLuke said: I was missing the portal orientation info. As there is no block state for Nether portals, I guess it's a good idea to create a GlowPortal class to manage this and possibly other related features (teleport, find/generate active portals in Nether).
So I'm assuming this is no longer a problem?
This has still not been implemented.
Is this still needed? I can take a stab at this during my free time.
As far as I know, only the teleportation to the nether world when colliding with the purple nether portal block is implemented. The formation of the portal isn't.
This is being worked on by @heisluft: #1024
~@VaiTon has a branch with some progress on this issue: https://github.com/VaiTon/Glowstone/tree/nether-portal~
Reference: #1020
I would like to fire a PortalCreateEvent
when a portal is lit (for #922), but I can't find any updated code that creates a portal in the dev branch or @VaiTon's. Has this been implemented or can I do it?
@clabe45 PR #1024 is in progress (under review) and implements the PortalCreateEvent along with the rest of the portal mechanincs.