Skip to content

Commit

Permalink
Update InternalRegistryListener.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofaa2 committed Feb 24, 2024
1 parent 263bd05 commit 1a8da28
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import com.github.retrooper.packetevents.protocol.packettype.PacketTypeCommon;
import com.github.retrooper.packetevents.protocol.player.User;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerDestroyEntities;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerSpawnEntity;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerSpawnExperienceOrb;
import com.github.retrooper.packetevents.wrapper.play.server.*;
import me.tofaa.entitylib.TrackedEntity;
import me.tofaa.entitylib.event.types.UserStopTrackingEntityEvent;
import me.tofaa.entitylib.event.types.UserTrackingEntityEvent;
Expand Down Expand Up @@ -54,22 +52,22 @@ else if (type == PacketType.Play.Server.SPAWN_EXPERIENCE_ORB) {
trackEntity(user, id);
}
else if (type == PacketType.Play.Server.SPAWN_LIVING_ENTITY) {
WrapperPlayServerSpawnEntity packet = new WrapperPlayServerSpawnEntity(event);
WrapperPlayServerSpawnLivingEntity packet = new WrapperPlayServerSpawnLivingEntity(event);
int id = packet.getEntityId();
trackEntity(user, id);
}
else if (type == PacketType.Play.Server.SPAWN_PLAYER) {
WrapperPlayServerSpawnEntity packet = new WrapperPlayServerSpawnEntity(event);
WrapperPlayServerSpawnPlayer packet = new WrapperPlayServerSpawnPlayer(event);
int id = packet.getEntityId();
trackEntity(user, id);
}
else if (type == PacketType.Play.Server.SPAWN_WEATHER_ENTITY) {
WrapperPlayServerSpawnEntity packet = new WrapperPlayServerSpawnEntity(event);
WrapperPlayServerSpawnWeatherEntity packet = new WrapperPlayServerSpawnWeatherEntity(event);
int id = packet.getEntityId();
trackEntity(user, id);
}
else if (type == PacketType.Play.Server.SPAWN_PAINTING) {
WrapperPlayServerSpawnEntity packet = new WrapperPlayServerSpawnEntity(event);
WrapperPlayServerSpawnPainting packet = new WrapperPlayServerSpawnPainting(event);
int id = packet.getEntityId();
trackEntity(user, id);
}
Expand Down

0 comments on commit 1a8da28

Please sign in to comment.