Lethal's Endermen TP icon

Lethal's Endermen TP -----

Players can no longer hide under 2 high roofs as endermen will TP them out!




So I re-examined the code and discovered the location util was written very poorly. Part of the problem was that I was manually setting what blocks were "hollow" and which were not. This would have required tedious updates for all the new blocks Mojang is adding so instead i've simplified the process quite a bit. Another problem was that I was an amateur programmer at the time and I realized there was much potential for infinite loops that would crash the server, scrapped that code as well.

The new cleaned up code includes the following changes:
- Updated the Spigot API version to 1.17. So this MAY not work in lower versions.
- Fixed infinite loop server crashes caused by Y locations that exceeded world limits without any safety checks or loop breaks
- Dramatically simplified the process for checking whether an Enderman should teleport to the player or teleport the player out. The process now only checks if there are 3 AIR blocks for the enderman to enter or 3 AIR blocks and a solid surface to teleport the player to. No more of the manually controlled "Hollow" materials list. This DOES mean that things like standing on a torch and hitting an enderman will teleport the player but hay all the more fun.
- Made the actual teleport algorithm much more efficient, does not bounce the player up & down before trying to find a suitable location. Now it gradually expands from the desired spawn until it can find the nearest safe location. Also added a limiter to it so if it expands greater than a 200 blocks it'll just return the original location. If you are finding that too many players just aren't getting teleported (which should be extremely rare unless they are somehow in a 2x1 space with no valid spaces within 200 blocks of them) then please report it with as much detail about player location and surroundings as possible.

Tested this on 1.18.1 and it works great!
----------, Jan 9, 2022

This update is only for 1.13+ clients as it has the "api: 1.13" flag in yaml. Meaning no backwards compatibility.

This update also resolves the issue of players using water to protect themselves from endermen. An Enderman being attacked will now check if the player is in water and teleport them as usual.
----------, Mar 14, 2019

The location utility was using a deprecated method to check if block above is considered hallow so I have removed that to make it more future compatible.

Also in version 1.0 (according to the code) player could use carpet on a torch as a safe roof, so removed carpet from hallow blocks. ;)
----------, Jan 20, 2018

Resource Information
Author:
----------
Total Downloads: 427
First Release: Jan 8, 2018
Last Update: Jan 9, 2022
Category: ---------------
All-Time Rating:
5 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings