Package logisticspipes.network.packets.hud

Source Code of logisticspipes.network.packets.hud.HUDStartBlockWatchingPacket

package logisticspipes.network.packets.hud;

import logisticspipes.interfaces.IBlockWatchingHandler;
import logisticspipes.network.abstractpackets.CoordinatesPacket;
import logisticspipes.network.abstractpackets.ModernPacket;
import net.minecraft.entity.player.EntityPlayer;

public class HUDStartBlockWatchingPacket extends CoordinatesPacket {

  public HUDStartBlockWatchingPacket(int id) {
    super(id);
  }

  @Override
  public ModernPacket template() {
    return new HUDStartBlockWatchingPacket(getId());
  }

  @Override
  public void processPacket(EntityPlayer player) {
    IBlockWatchingHandler tile = this.getTile(player.worldObj, IBlockWatchingHandler.class);
    if(tile != null) {
      tile.playerStartWatching(player);
    }
  }
}
TOP

Related Classes of logisticspipes.network.packets.hud.HUDStartBlockWatchingPacket

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.