remove more obfhelpers

This commit is contained in:
Jake Potrebic
2021-06-17 14:39:36 -07:00
parent 6c9cd70194
commit 570006ab1e
43 changed files with 130 additions and 550 deletions

View File

@@ -43,15 +43,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.Mob;
@@ -0,0 +0,0 @@ import net.minecraft.world.phys.Vec3;
public abstract class PathNavigation {
private static final int MAX_TIME_RECOMPUTE = 20;
- protected final Mob mob;
+ protected final Mob mob; @Deprecated public Entity getEntity() { return mob; } // Paper - OBFHELPER
protected final Level level;
@Nullable
protected Path path;
@@ -0,0 +0,0 @@ public abstract class PathNavigation {
@Nullable
@@ -99,8 +90,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start - Pathfind event
+ boolean copiedSet = false;
+ for (BlockPos possibleTarget : positions) {
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(),
+ MCUtil.toLocation(getEntity().level, possibleTarget), target == null ? null : target.getBukkitEntity()).callEvent()) {
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(this.mob.getBukkitEntity(),
+ MCUtil.toLocation(this.mob.level, possibleTarget), target == null ? null : target.getBukkitEntity()).callEvent()) {
+ if (!copiedSet) {
+ copiedSet = true;
+ positions = new java.util.HashSet<>(positions);