🔥 Get yeeted unused code

Removed an unused function that can't be used anyways, because RayTraceUtils cant detect entity hit...
This commit is contained in:
RealIndrit 2020-08-18 12:36:10 +02:00 committed by GitHub
parent 1c8079c051
commit 523f13c430
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,17 +97,4 @@ public interface IPlayerContext {
default boolean isLookingAt(BlockPos pos) { default boolean isLookingAt(BlockPos pos) {
return getSelectedBlock().equals(Optional.of(pos)); return getSelectedBlock().equals(Optional.of(pos));
} }
/**
* Returns the entity that the crosshair is currently placed over. Updated once per tick.
*
* @return The entity
*/
default Optional<Entity> getSelectedEntity() {
RayTraceResult result = objectMouseOver();
if (result != null && result.typeOfHit == RayTraceResult.Type.ENTITY) {
return Optional.of(result.entityHit);
}
return Optional.empty();
}
} }