potatolain / TravelPortals

A portal system for Bukkit for Minecraft
BSD 2-Clause "Simplified" License
3 stars 2 forks source link

No Portal Found #20

Closed Craigdb closed 5 years ago

Craigdb commented 6 years ago

I was trying your portal plugin as a replacement for runecraft teleporters. Using Spigot for MC 1.13.1 I can create a portal and it reports back OK - the yml file shows a portal and co-ords etc correctly (mind you, when I make another one the old one breaks and the yml only shows 1 portal but with the new coords.) Once created I use the '/portal name test' command but it reports back:

No portal found! (You must be within one block of the portal.)

Obviously, I made sure I was within one block, even tested inside the water area. Similar message when using /portal info. Any suggestions for this appreciated,

potatolain commented 6 years ago

Sorry for the lack of reply; I'm having a hard time finding time for this plugin right now. I can reproduce the problem - something seems quite off. I'm not quite sure what is causing this yet though.

Spigot version: git-Spigot-f6a273b-7
a2f486 (MC: 1.13.1) (Implementing API version 1.13.1-R0.1-SNAPSHOT)
Minecraft client version: 1.13.1
Travelportals version: TravelPortals 2.4 (1.13 dev build 9)

I was also able to reproduce it with the Craftbukkit jar: git-Bukkit-7a2f486 ( MC: 1.13.1) (Implementing API version 1.13.1-R0.1-SNAPSHOT)

The game seems to only ever recognize the most recently created portal (As Craigdb noted) - if I create a portal then break a block on it, I get the portal destroyed message. If I create two portals, I can break the first one without a message, but the second one breaks as expected. (However, I can't use any of the portal commands no matter where I am in relation to the portal.)

It is also reproducible going back to 1.13 with spigot git-Spigot-fe3ab0d-1 62bda9 (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)

Afraid I don't have any suggested workaround beyond sticking with an older build for now.

potatolain commented 6 years ago

It looks like there are a few separate problems here:

  1. Due to storing portals using their name as a key, you can only have one nameless portal on a server at a time. (I was able to "fix" this by temporarily hacking the getName() function on WarpLocation to set a unique name if there isn't one. Not a real fix, though...) This by itself would be annoying, but not huge, but the second problem is
  2. We're no longer recognizing when the player steps into a portal.
  3. There is a typo in the default config file - one of the items is BIRCH_DOOR, and that comma causes a failure to load configuration. I'm not sure exactly how, but this prevented the PortalUseTask main method from firing (and probably also did something with playerMove)

I'm still digging into the cause behind that second issue.

potatolain commented 6 years ago

I think I've found it! The problem seems to be here:

https://github.com/cppchriscpp/TravelPortals/blob/master/src/main/java/net/cpprograms/minecraft/TravelPortals/storage/PortalStorage.java#L79

This currently reads

        String portalName = portalLocations.get(location.getWorld() + "," + location.getBlockX() + "," + location.getBlockY() + "," + location.getBlockZ());

I think this should read:

        String portalName = portalLocations.get(location.getWorld().getName() + "," + location.getBlockX() + "," + location.getBlockY() + "," + location.getBlockZ());

The problem seems to be that we're looking up portals based on something other than the world name. (Perhaps the World class used to have a getString() that returned its name, and now doesn't? I didn't look...)

I'm not going to be able to put anything together tonight, and tomorrow's unfortunately completely booked. I'll try to get something out for this soon though.

potatolain commented 5 years ago

I got a fix to this together. It's going to take a little longer to get an official release out, but for now I've attached a new jar that should solve the problems you described. (Please reply back if it doesn't!)

The official fix is in pr #21

TravelPortals_2.4_fixes.zip

Craigdb commented 5 years ago

I tested it and seem to be getting the same reults.

On Fri, 5 Oct 2018 at 09:46, cppchriscpp notifications@github.com wrote:

I got a fix to this together. It's going to take a little longer to get an official release out, but for now I've attached a new jar that should solve the problems you described. (Please reply back if it doesn't!)

The official fix is in pr #21 https://github.com/cppchriscpp/TravelPortals/pull/21

TravelPortals_2.4_fixes.zip https://github.com/cppchriscpp/TravelPortals/files/2448481/TravelPortals_2.4_fixes.zip

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cppchriscpp/TravelPortals/issues/20#issuecomment-427204146, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHLyJst2dYVZWcoiP79unsw_wCykRRzks5uhp3VgaJpZM4XAVoX .

potatolain commented 5 years ago

I realized I forgot to mention a couple important details:

First, any portals created with first 1.13 version are still broken; they need to be broken and re-created. (You can just drain the water then place a redstone torch again to do this.) Sorry about that!

Second, the jar on bukkitdev isn't updated yet. I want to do a little more cleanup before I release it more publicly. (See discussion in #21 if you're curious) The link in the comment above is the only one that works for 1.13 right now.

Hopefully that's all there is to it. I just re-downloaded it and tested it with the default configuration, and at least that case seems to be working ok. If you continue to have problems, could I ask you to share your config.yml file?

Craigdb commented 5 years ago

Here is the config. FYI I have downloaded the latest spigot 1.13 and deleted the old portal.jar and deleted the plugin folder so it would re-create from scratch. Same end result.

On Sun, 7 Oct 2018 at 16:19, cppchriscpp notifications@github.com wrote:

I realized I forgot to mention a couple important details:

First, any portals created with first 1.13 version are still broken; they need to be broken and re-created. (You can just drain the water then place a redstone torch again to do this.) Sorry about that!

Second, the jar on bukkitdev isn't updated yet. I want to do a little more cleanup before I release it more publicly. (See discussion in #21 https://github.com/cppchriscpp/TravelPortals/pull/21 if you're curious) The link in the comment above is the only one that works for 1.13 right now.

Hopefully that's all there is to it. I just re-downloaded it and tested it with the default configuration, and at least that case seems to be working ok. If you continue to have problems, could I ask you to share your config.yml file?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cppchriscpp/TravelPortals/issues/20#issuecomment-427629081, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHLyLk3qAXSl4H8uMq9aoFpO0dQvbzcks5uiZzXgaJpZM4XAVoX .

Phoenix616 commented 5 years ago

@Craigdb, please try whether or not it is fixed in the latest development build.

Craigdb commented 5 years ago

Sorry about the delays - I have not been well. Anyway - I just re-ran build tools for the latest spigot and ran TP build #11 and I am still getting the same result.

On Mon, 8 Oct 2018 at 03:20, Max Lee notifications@github.com wrote:

@Craigdb https://github.com/Craigdb, please try whether or not it is fixed in the latest development build https://ci.minebench.de/job/TravelPortals/.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cppchriscpp/TravelPortals/issues/20#issuecomment-427670330, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHLyDx1FnbsRPTjv7T2N6h1NapxJVpoks5uijfwgaJpZM4XAVoX .

Phoenix616 commented 5 years ago

The possible reasons why this occurred should now be fixed as far as I can tell:

If this is still happening for someone then please comment here or open a new issue with some more information (ideally your config and storage file(s))

Phoenix616 commented 5 years ago

Found another bug that could lead to this issue which is fixed with 826212c6e0712cef8a1998b07548b2d4294c769e: The radius search basically used the wrong coordinates after the loop was completed once.