TheMrJezza / HorseTpWithMe

A Bukkit Plugin that allows the simple teleportation of Rideable LivingEntities in Minecraft.
MIT License
13 stars 6 forks source link

1.19.3 compatibility #14

Closed RealTriassic closed 1 month ago

RealTriassic commented 1 year ago

Hello, I am currently using HorseTpWithMe on Purpur 1.19.3 and I've been seeing this error show up every now and then:

[14:19:25 WARN]: [HorseTpWithMe] Task #860090 for HorseTpWithMe v10 generated an exception
java.lang.NoSuchMethodError: 'void net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata.<init>(int, net.minecraft.network.syncher.DataWatcher, boolean)'
        at com.jbouchier.horsetpwithme.ProtocolHackMagic.updateVehicle(ProtocolHackMagic.java:93) ~[HorseTpWithMe-#1e4c602.jar:?]
        at com.jbouchier.horsetpwithme.TeleportLogic.reseat(TeleportLogic.java:189) ~[HorseTpWithMe-#1e4c602.jar:?]
        at com.jbouchier.horsetpwithme.TeleportLogic.lambda$processTeleport$0(TeleportLogic.java:157) ~[HorseTpWithMe-#1e4c602.jar:?]
        at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.3.jar:git-Purpur-1873]
        at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.19.3.jar:git-Purpur-1873]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1500) ~[purpur-1.19.3.jar:git-Purpur-1873]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:482) ~[purpur-1.19.3.jar:git-Purpur-1873]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[purpur-1.19.3.jar:git-Purpur-1873]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.3.jar:git-Purpur-1873]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[purpur-1.19.3.jar:git-Purpur-1873]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

I am using the latest build from the dev branch of this repository.

TheMrJezza commented 1 year ago

Yep, will fix asap

TheMrJezza commented 1 year ago

Sorry, 1.19.3 broke a lot more than I realised. I'm working on re-thinking certain parts of the plugin.

TheMrJezza commented 1 year ago

Here's a 1.19.3 release, give it a try. https://github.com/TheMrJezza/HorseTpWithMe/releases/tag/v11.0-Preview

HypixionGaming commented 1 year ago

Doesn't work with java 17 as far as i can tell

TheMrJezza commented 1 year ago

Whoops, I compiled it on my new Workstation, its running java 18.. I will fix it soon

HypixionGaming commented 1 year ago

Appreciate it

TheMrJezza commented 1 year ago

In case anyone is wondering, my timezone is GMT+11, or AEDT. At time of writing, its 5pm for me now, I cant work on this until 7pm ish, so another couple of hours

TheMrJezza commented 1 year ago

Same link as before, the Jar should be working now. https://github.com/TheMrJezza/HorseTpWithMe/releases/tag/v11.0-Preview

HypixionGaming commented 1 year ago

happy to say it works!

RealTriassic commented 1 year ago

Same here!

AlohaLegend commented 1 year ago

Hey there! So for me the base plugin is working as expected. Players can teleport with any entity like they have the permission: horsetpwithme.teleport.* I have tried to revoke this permission but players can still teleport with any entity. In addition to this all commands for Horsetpwithme are not registered as commands and do not function. I am using paper latest 1.19.3.

TheMrJezza commented 1 year ago

Fixing now

TheMrJezza commented 1 year ago

I'm working on a lot of Overhauls, mainly Backwards compatibility.. (hence the slowness of this fix) https://github.com/TheMrJezza/HorseTpWithMe/releases/tag/v11.0-alpha

horsetpwithme.require_saddle doesn't work yet because I haven't found a 'backwards compatible' way to implement it.

RealTriassic commented 1 year ago

Ran into this error, possibly related to teleporting between dimensions.

[21:03:01 WARN]: [HorseTpWithMe] Task #1846480 for HorseTpWithMe v11.0.0 generated an exception
java.lang.NullPointerException: Cannot invoke "org.bukkit.entity.Entity.getUniqueId()" because "this.vehicle" is null
        at com.jbouchier.VehicleTeleporter.lambda$execute$3(VehicleTeleporter.java:160) ~[HorseTpWithMe-11.0.0.jar:?]
        at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.3.jar:git-Purpur-1890]
        at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.19.3.jar:git-Purpur-1890]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1500) ~[purpur-1.19.3.jar:git-Purpur-1890]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:482) ~[purpur-1.19.3.jar:git-Purpur-1890]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[purpur-1.19.3.jar:git-Purpur-1890]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.3.jar:git-Purpur-1890]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[purpur-1.19.3.jar:git-Purpur-1890]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
TheMrJezza commented 1 year ago

Working on it

YoungSoulluoS commented 1 year ago

I seem to have some kind of special case and I just don't get it. Tested on the latest clean versions of Spigot/Paper 1.19.3. The plugin loads, commands are entered, did not touch the permissons but through the portal teleportation no. Tell me what I'm doing wrong?

TheMrJezza commented 1 year ago

Which portal? End/Nether/Custom etc..

Also, what are you trying to teleport?

YoungSoulluoS commented 1 year ago

Which portal? End/Nether/Custom etc..

Also, what are you trying to teleport?

Vanilla End and Nether portal. I tried teleporting a horse, a llama, and a boat.

Also, the console does not show anything unusual. I tried it on the server on my computer and on the hosting.

YoungSoulluoS commented 1 year ago

If everything works for you, please share the server configuration. May be download from google disk etc.

TheMrJezza commented 1 year ago

Mojang have enforced a no-vehicle approach in the server code. If you ride an entity into a portal, the server will ignore it until you dismount.

Plugins cannot easily override this behaviour. At best without modifying the server code the plugin would have to constantly loop over every player/entity in the server to try and detect if they're "likely" in a portal. This isn't viable, but who knows either myself or someone else more willing might attempt it.

Now, if you are okay with modifying your server code, I've made a patch that will allow you to ride vehicles into portals. I've attached it here: 0092-Portal-In-Vehicle.patch

Furthermore, you may view it here without downloading: https://gist.github.com/TheMrJezza/39f737dd7a50cd76d253d8f782ab5e1c

YoungSoulluoS commented 1 year ago

Thank you for the information and good plugin. This is not an option. I will wait for a possible update.

RealTriassic commented 1 year ago

I am experiencing another issue:

[14:36:33 WARN]: Illegal Entity Teleport EntityStrider['Strider'/572235, uuid='e41c4492-dd9a-41c7-925f-14dd7f6b5657', l='ServerLevel[world_nether]', x=55180.45, y=31.50, z=-48369.45, cpos=[3448, -3024], tl=1040444, v=false] to ServerLevel[world]:net.minecraft.core.Position@599acca6
java.lang.Throwable: null
        at net.minecraft.world.entity.Entity.teleportTo(Entity.java:3438) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at org.bukkit.craftbukkit.v1_19_R2.entity.CraftEntity.teleport(CraftEntity.java:594) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at org.bukkit.entity.Entity.teleport(Entity.java:157) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R2.entity.CraftEntity.teleport(CraftEntity.java:559) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at org.bukkit.craftbukkit.v1_19_R2.entity.CraftLivingEntity.teleport(CraftLivingEntity.java:668) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at org.bukkit.craftbukkit.v1_19_R2.entity.CraftEntity.teleport(CraftEntity.java:553) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at com.jbouchier.horsetpwithme.util.BlinkTeleportUtil.lambda$teleport$1(BlinkTeleportUtil.java:71) ~[HorseTpWithMe-11.0.1.jar:?]
        at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1500) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:482) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[purpur-1.19.3.jar:git-Purpur-1912]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Also not sure what exactly is causing this.

TheMrJezza commented 1 year ago

Yeah, there's not really enough information to go on, other than this specific error occurred when a strider tried to teleport from the nether to the overworld..

The reference to HorseTpWithMe in the error suggests that the plugin requested the teleport, but no idea as to why it's 'illegal'.

TheMrJezza commented 1 year ago

The throwable is null, so this exception is probably a 'fail-fast' mechanism rather than an outright error. It's supposed to fail if something is wrong, and the server will assume everything worked if no error was thrown. But under vanilla circumstances, the server would also be waiting for this error and handling it.

RealTriassic commented 1 year ago

I'm not sure what's causing this either, you have as much information as I do.