Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Applying certain velocities while sneaking freezes Nacho #409

Open
2 tasks done
Packsolite opened this issue Apr 24, 2022 · 0 comments
Open
2 tasks done

Applying certain velocities while sneaking freezes Nacho #409

Packsolite opened this issue Apr 24, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Packsolite
Copy link

Packsolite commented Apr 24, 2022

Observed Behavior

Some plugins might occasionally set a players velocity to something like (x, y, NaN) due to invalid mathematic operations or to held a player mid air.
If applying such a velocity vector while the player is sneaking, the server crashes.

	 Current Thread: Server thread
	        PID: 37 | Suspended: false | Native: false | State: RUNNABLE
	        Stack:
	                app//net.minecraft.server.v1_8_R3.Chunk.a(Chunk.java:1108)
	                app//net.minecraft.server.v1_8_R3.Chunk.getEntitiesInAABB(Chunk.java:1097)
	                app//net.minecraft.server.v1_8_R3.World.a(World.java:2912)
	                app//net.minecraft.server.v1_8_R3.World.getEntities(World.java:2893)
	                app//net.minecraft.server.v1_8_R3.World.getCubes(World.java:1463)
	                app//net.minecraft.server.v1_8_R3.Entity.move(Entity.java:541)
	                app//net.minecraft.server.v1_8_R3.EntityLiving.g(EntityLiving.java:1431)
	                app//net.minecraft.server.v1_8_R3.EntityHuman.g(EntityHuman.java:1373)
	                app//net.minecraft.server.v1_8_R3.EntityLiving.m(EntityLiving.java:1685)
	                app//net.minecraft.server.v1_8_R3.EntityHuman.m(EntityHuman.java:396)
	                app//net.minecraft.server.v1_8_R3.EntityLiving.t_(EntityLiving.java:1525)
	                app//net.minecraft.server.v1_8_R3.EntityHuman.t_(EntityHuman.java:176)
	                app//net.minecraft.server.v1_8_R3.EntityPlayer.l(EntityPlayer.java:322)
	                app//net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:434)
	                app//net.minecraft.server.v1_8_R3.PacketPlayInFlying.a(SourceFile:126)
	                app//net.minecraft.server.v1_8_R3.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57)
	                app//net.minecraft.server.v1_8_R3.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:6)
	                app//net.minecraft.server.v1_8_R3.PlayerConnectionUtils$$Lambda$1351/0x0000000801747cc8.run(Unknown Source)
	                [email protected]/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	                [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	                app//net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
	                app//net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:784)
	                app//net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:398)
	                app//net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:723)
	                app//net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616)
	                [email protected]/java.lang.Thread.run(Thread.java:833)

Expected Behavior

Not to crash.

Steps To Reproduce

	@EventHandler
	public void onInteract(PlayerInteractEvent event) {
		final Player player = event.getPlayer();
		player.setSneaking(true);
		player.setVelocity(new Vector(Double.NaN, 0, 0));
	}

Plugin List

ViaVersion (might be important here)

Server Version

74ed0ea

Other

No response

Agreements

  • You were able to find this issue on the latest version of NachoSpigot.
  • You have confirmed that there aren’t any issues open regarding this bug.
@Packsolite Packsolite added the bug Something isn't working label Apr 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant