Skip to content

Commit

Permalink
cleanup ray trace and some meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 12, 2020
1 parent 4327ad7 commit 08f563a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -1582,10 +1582,10 @@ public static void registerTags() {
for (String str : attribute.contextAsType(1, ListTag.class)) {
types.add(EntityTag.valueOf(str, attribute.context).getBukkitEntityType());
}
result = object.getWorld().rayTraceEntities(object, object.getDirection(), range, (e) -> types.contains(e.getType()));
result = object.getWorld().rayTrace(object, object.getDirection(), range, FluidCollisionMode.NEVER, true, 0, (e) -> types.contains(e.getType()));
}
else {
result = object.getWorld().rayTraceEntities(object, object.getDirection(), range);
result = object.getWorld().rayTrace(object, object.getDirection(), range, FluidCollisionMode.NEVER, true, 0, null);
}
if (result != null && result.getHitEntity() != null) {
return new EntityTag(result.getHitEntity());
Expand Down Expand Up @@ -1620,10 +1620,10 @@ public static void registerTags() {
for (String str : attribute.contextAsType(1, ListTag.class)) {
types.add(EntityTag.valueOf(str, attribute.context).getBukkitEntityType());
}
result = object.getWorld().rayTraceEntities(object, object.getDirection(), range, (e) -> types.contains(e.getType()));
result = object.getWorld().rayTrace(object, object.getDirection(), range, FluidCollisionMode.NEVER, true, 0, (e) -> types.contains(e.getType()));
}
else {
result = object.getWorld().rayTraceEntities(object, object.getDirection(), range);
result = object.getWorld().rayTrace(object, object.getDirection(), range, FluidCollisionMode.NEVER, true, 0, null);
}
if (result != null) {
return new LocationTag(object.getWorld(), result.getHitPosition());
Expand Down
Expand Up @@ -55,7 +55,7 @@ public AttackCommand() {
//
// @Usage
// Use to stop an entity from attacking.
// - attack <[entity]> stop
// - attack <[entity]> cancel
// -->

@Override
Expand Down

0 comments on commit 08f563a

Please sign in to comment.