BetterSMP
Update: This fix (Amaranth's CraftBukkit implementation) is now part of CraftBukkit. So if you're on a Bukkit server with version 1.2.5-R0.1 (Build #02136) or later, you don't need BetterSMP at all - you can still use SMPSlimeFix (Client Mod) to further improve slime behaviour though.
Corrects mob positions sent to clients to (mostly) prevent mobs from glitching through blocks. Also prevents them from permanently glitching through blocks on the server side. Note that these issues are said to be gone by 1.3.
Video Demo: http:www.youtube.com/watch?v=oksq4S5ESTI
How it works
Every few ticks (depending on the entity movement and position) the positions of entities are sent to clients. However, three concerning things happen at the process:
- Positions are sent inaccurately (as multiples of 1/32, for performance reasons) and always rounded down towards negative infinity. Consequently, the client may think that the entity is in a different block than it really is. Example: A villager is enclosed in a 1 wide, 1 long cell, ranging from (x=0,z=0) to (1,1). Villagers have a bounding box of 0.6x0.6, so a villager could be at x = 0.3, barely touching the block at -1 < x < 0. When multiplying 0.3 with 32, rounding it down, and dividing it with 32 again, you end up with x = 0.28125. The new minimal x coordinate of the villager's bounding box is now -0,01875 (as opposed to 0.0). This is the cause for many visual (temporary, client-side) glitches.
- These accurate positions are being applied server-side (for synchronization reasons, I guess), which sometimes leads to entities glitching permanently (server-side) through blocks
- Sometimes (every few seconds, or if the entity teleported, i.e. moved a great distance), the server sends a different packet with absolute positions (as opposed to positions relative to the previously sent ones). The client (for some reason) adds 1/64 to the y coordinate, which may cause additional client-side glitches
To fix these issues, the plugin does the following: whenever the positions are about to be sent, it
- stores the original positions of the entities
- lowers the Y-position by 1/32 (fix for last-mentioned issue)
- finds proper inaccurate coordinates to be sent by iterating through possible positions (either rounding down or up) to find a position which would result in the same colliding bounding boxes as the real position
- applies those corrected positions to the entities
- has the positions sent as usual only now
- resets the positions using the previously stored ones
Compatibility
Tested with 1.2.5-R0.1 (older builds) and 1.2.4-R1.0. May also work with older versions. The plugin has become redundant as of 1.2.5-R0.1 (Build #02136) (see note at the top).
Installation
Put into plugins folder of Bukkit and restart your server. No configuration, and no commands are required. To further improve the behavior of slimes, a client side mod (SMPSlimeFix) can be used. You can download it here
Source Code
Link to github: https:github.com/taurose/BetterSMP
-
View User Profile
-
Send Message
Posted May 13, 2013Sheeps will still escape through walls (most likely closed corners).
When sheeps are pushed into walls they could glitch through the wall or suffocate.
Chicken glitch through walls and fences.
Any baby animal growing up in a wall or fence corner could suffocate in the fence / wall.
In other words - is it really implemented into the newest Bukkit Releases?
Since I saw these bugs in 1.5.1 R0.1 b2754
PS.: Also interesting is, that the animals only glitch through or in walls, if there are X animals in Y space. (later more information about it)
I have a barn actually holding 4 pigs, 4 cows and 7 sheeps.
2 pigs and 2 cows are suffocated in the wall, an eight sheep is escaped and a few (10 or more) are suffocated / escaped before.
The wall of the barn is 1 block thick and the entry is enclosed by fence gates which are sorrounded by walls.
-
View User Profile
-
Send Message
Posted Jun 19, 2012Can anyone confirm for me that in Bukkit if blazes are swimming up a lava stream or sitting on top of the lava in a 1x1 tube and the chunks become unloaded when the chunks become loaded again the monsters will escape?
It seems like this may have been not fixed with the bukkit patch.
-
View User Profile
-
Send Message
Posted Apr 5, 2012@xXReVurbXx
It's integrated into all 1.2.5 builds (recommended, beta) except the early dev builds if that's what you mean. So no need for the server plugin.
-
View User Profile
-
Send Message
Posted Apr 3, 2012@trunkz
My friend mentioned that to me; I'm assuming it's the 1.2.5 builds and above? :D
-
View User Profile
-
Send Message
Posted Apr 3, 2012Thanks.
The (non-plugin) fix has now been integrated into CraftBukkit ;)
-
View User Profile
-
Send Message
Posted Apr 2, 2012Good god, this works like a charm. Thank you so much. Time to stress test it :)
EDIT: Working amazingly, and is definitely the best temporary fix until Minecraft's developers decide to fix it, once and for all.