Ali M
- SupaHam
- supaham
- Europe/London
- Yes
- No
If you are in spectator mode, click an entity to spectate it, and then move your mouse around, you see that Flames of Torches where computed from where you have been first (where your field of view is). Also it seems that sounds are computed the same way. If i am spectating an entity and moving my mouse around, the sound is sometimes on the right of my headset and sometimes on the left.
Easy way to reproduce the bug: Spectate an enderman and move the mouse, you will see the particles rotating.
EDIT: As stated in the title it not only depends on the rotation, but also on the location where the player started spectating the entity.
An example: I set up a sound source (note block with a clock) and placed an entity next to it (armor stand). I started spectating the entity and while moving the mouse, the sound rotated around me (as stated above). Then I added the levitation effect to the armor stand. The volume of the sound didn't decrease as I moved away from the source of the sound. When leaving the spectated entity the sound stopped immediately as I was to far away from the note block.
Assumption by Marcono1234 can be found in this comment.
Explanation by Ali M can be found in this comment
As Ali M has already said, I think this behavior is inteded. (also see Spectator#Flight)
The new flight speed is calculated based in the current flight speed plus Mouse.getEventDWheel() (which is 120 or –120 depending on if the wheel was spinned forwards or backwards.) multiplied by 0.005. -> current flight speed + (–/+120) * 0.005.
The code for calculating and setting the new flight speed in the method net.minecraft.client.Minecraft.runTickMouse() looks like this:
float f = MathHelper.clamp(this.player.capabilities.getFlySpeed() + (float)Math.getEventDWheel() * 0.005F, 0.0F, 0.2F); this.player.capabilities.setFlySpeed(f);
If it is not intended that the player stops moving completely when scrolling down too far, a simple solution would be to set the minimum value of the Math.clamp() function to something higher than 0.0F. (for example 0.01F)
MathHelper.clamp(this.player.capabilities.getFlySpeed() + (float)Math.getEventDWheel() * 0.005F, 0.01F, 0.2F);
Confirmed for 1.13.1.
I also agree with Ali M and [Mod] bemoty, this is most likely intended, if not setting the value of Math.clamp() to something higher than 0.0F like [Mod] bemoty said above, would be a good solution for this.
See
MC-83631.For what it's worth. Getting kicked in general displays that client error. so I'm assuming the actual bug causing the crashing is not something I can track or help you track down on my end.
@ScottishGrowly Sorry about that, I did infact mean
MC-83633.@Kate Dobbe in server.properties, set allow-flight = true.
@Kate Dobbe Not to be condescending but have you tried restarting your server after making sure allow-flight is true. Prior to that change, I used to get kicked because it was false.
This bug is very easy to fix. The code is there, it just isn't fully written..
In the EntityProjectile, the line that checks if the shooter is not null (and projectile life <2 ticks) does not actually check if the nearby collided entity is the shooter; and to ignore them. I have provided this fix to a third party server mod, but a gist comparison can be found here: https://gist.github.com/SupaHam/e15fc4e8cf9caecfa07f103b0d28ef6b
Confirmed for Minecraft 1.12.
In Minecraft 1.12, if you scroll wheel down, it decreases your fly speed as intended. If you scroll up, it increases your fly speed as intended. If you switch gamemodes it resets your fly speed. If you go back to spectator mode, you will have the reset fly speed, not the previous.
Still active in 1.12.
The problem is with the handling of the Camera Packet. When handling the packet, the client doesn't set the player's spectating entity, instead it sets the client's render view entity. This then causes the player's game tick to skip a few logic updates tasks, e.g. updating position and rotation. Thus, causing the player to be out of sync (only on the client), producing both visual and audible issues.
@Vincent Lee,
I can confirm that my solution works. Server implementations such as CraftBukkit (and Spigot) have been using it for months now with no issues.
Can confirm. I've been digging around, but flat_world_options is completely ignored. This ignores server.properties's generator-settings property when level-type is FLAT. This is quite annoying..
Edit: http://supa.me/E0E2kR.png On the left is "The Void" preset generated using single player. On the right is the string from The Void preset in generator-settings.