Package logisticspipes.network.packets.block

Source Code of logisticspipes.network.packets.block.LogicControllerPacket

package logisticspipes.network.packets.block;

import logisticspipes.logic.interfaces.ILogicControllerTile;
import logisticspipes.network.NewGuiHandler;
import logisticspipes.network.abstractpackets.CoordinatesPacket;
import logisticspipes.network.abstractpackets.ModernPacket;
import logisticspipes.network.guis.logic.LogicControllerGuiProvider;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;

public class LogicControllerPacket extends CoordinatesPacket {
 
  public LogicControllerPacket(int id) {
    super(id);
  }

  @Override
  public void processPacket(EntityPlayer player) {
    ILogicControllerTile tile = this.getTile(player.getEntityWorld(), ILogicControllerTile.class);
    if(tile == null) return;
    NewGuiHandler.getGui(LogicControllerGuiProvider.class).setTilePos((TileEntity)tile).open(player);
  }
 
  @Override
  public ModernPacket template() {
    return new LogicControllerPacket(getId());
  }
}
TOP

Related Classes of logisticspipes.network.packets.block.LogicControllerPacket

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.