Remove zombie hitboxes due to buggy behavior

This commit is contained in:
ShinyDialga 2018-10-12 18:19:58 -05:00
parent f4d182db67
commit 220f11ccb2
1 changed files with 16 additions and 16 deletions

View File

@ -28,8 +28,8 @@ public class HitboxPlayerFacet implements MatchPlayerFacet {
private static final double PLAYER_HEIGHT = 1.8; private static final double PLAYER_HEIGHT = 1.8;
private static final double VIEW_RADIUS = 12; private static final double VIEW_RADIUS = 12;
private final NMSHacks.FakeEntity[] fakes = new NMSHacks.FakeEntity[4]; // private final NMSHacks.FakeEntity[] fakes = new NMSHacks.FakeEntity[4];
private final Location[] locations = new Location[4]; // private final Location[] locations = new Location[4];
private final Match match; private final Match match;
private final HitboxMatchModule mm; private final HitboxMatchModule mm;
@ -51,18 +51,18 @@ public class HitboxPlayerFacet implements MatchPlayerFacet {
@Override @Override
public void enable() { public void enable() {
for(int i = 0; i < fakes.length; i++) { /*for(int i = 0; i < fakes.length; i++) {
fakes[i] = new NMSHacks.FakeZombie(world, true); fakes[i] = new NMSHacks.FakeZombie(world, true);
locations[i] = new Location(world, 0, 0, 0); locations[i] = new Location(world, 0, 0, 0);
mm.facets.put(fakes[i].entityId(), this); mm.facets.put(fakes[i].entityId(), this);
} }*/
} }
@Override @Override
public void disable() { public void disable() {
for(NMSHacks.FakeEntity fake : fakes) { /*for(NMSHacks.FakeEntity fake : fakes) {
mm.facets.remove(fake.entityId()); mm.facets.remove(fake.entityId());
} }*/
} }
public double getWidth() { public double getWidth() {
@ -122,7 +122,7 @@ public class HitboxPlayerFacet implements MatchPlayerFacet {
@Repeatable(scope = MatchScope.RUNNING) @Repeatable(scope = MatchScope.RUNNING)
public void updateViewers() { public void updateViewers() {
final Location location = player.getLocation(); /*final Location location = player.getLocation();
updateFakeLocations(location); updateFakeLocations(location);
final Set<Player> remove = new HashSet<>(viewers); final Set<Player> remove = new HashSet<>(viewers);
@ -145,7 +145,7 @@ public class HitboxPlayerFacet implements MatchPlayerFacet {
for(Player viewer : remove) { for(Player viewer : remove) {
destroyFakes(viewer); destroyFakes(viewer);
} }
viewers.removeAll(remove); viewers.removeAll(remove);*/
} }
private boolean isAttacker(Player attacker) { private boolean isAttacker(Player attacker) {
@ -165,27 +165,27 @@ public class HitboxPlayerFacet implements MatchPlayerFacet {
final double pz = c.getZ() + h; final double pz = c.getZ() + h;
final double mz = c.getZ() - h; final double mz = c.getZ() - h;
locations[0].setPosition(mx, y, mz); /* locations[0].setPosition(mx, y, mz);
locations[1].setPosition(px, y, mz); locations[1].setPosition(px, y, mz);
locations[2].setPosition(mx, y, pz); locations[2].setPosition(mx, y, pz);
locations[3].setPosition(px, y, pz); locations[3].setPosition(px, y, pz);*/
} }
private void destroyFakes(Player viewer) { private void destroyFakes(Player viewer) {
for(NMSHacks.FakeEntity fake : fakes) { /*for(NMSHacks.FakeEntity fake : fakes) {
fake.destroy(viewer); fake.destroy(viewer);
} }*/
} }
private void spawnFakes(Player viewer) { private void spawnFakes(Player viewer) {
for(int i = 0; i < fakes.length; i++) { /*for(int i = 0; i < fakes.length; i++) {
fakes[i].spawn(viewer, locations[i]); fakes[i].spawn(viewer, locations[i]);
} }*/
} }
private void moveFakes(Player viewer) { private void moveFakes(Player viewer) {
for(int i = 0; i < fakes.length; i++) { /*for(int i = 0; i < fakes.length; i++) {
fakes[i].teleport(viewer, locations[i]); fakes[i].teleport(viewer, locations[i]);
} }*/
} }
} }