Package nallar.patched.entity

Source Code of nallar.patched.entity.PatchEntityTracker

package nallar.patched.entity;

import nallar.tickthreading.patcher.Declare;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityTracker;
import net.minecraft.entity.EntityTrackerEntry;
import net.minecraft.world.WorldServer;

public abstract class PatchEntityTracker extends EntityTracker {
  public PatchEntityTracker(WorldServer par1WorldServer) {
    super(par1WorldServer);
  }

  @Override
  @Declare
  public boolean isTracking(int id) {
    return this.trackedEntityIDs.containsItem(id);
  }

  @Override
  @Declare
  public Entity getEntity(int id) {
    EntityTrackerEntry entityTrackerEntry = (EntityTrackerEntry) this.trackedEntityIDs.lookup(id);
    if (entityTrackerEntry == null) {
      return null;
    }
    return entityTrackerEntry.myEntity;
  }
}
TOP

Related Classes of nallar.patched.entity.PatchEntityTracker

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.