use of com.bluepowermod.part.gate.wireless.IWirelessGate in project BluePower by Qmunity.
the class MessageWirelessNewFreq method handleServerSide.
@Override
public void handleServerSide(EntityPlayer player) {
Frequency freq = (Frequency) WirelessManager.COMMON_INSTANCE.registerFrequency(player, name, acc, bundled);
ITilePartHolder h = MultipartCompatibility.getPartHolder(player.worldObj, x, y, z);
if (h == null)
return;
IWirelessGate p = null;
for (IPart pa : h.getParts()) if (pa instanceof IWirelessGate && ((IWirelessGate) pa).getFace() == face)
p = (IWirelessGate) pa;
if (p == null)
return;
p.setFrequency(freq);
BPNetworkHandler.INSTANCE.sendTo(new MessageWirelessFrequencySync(player), (EntityPlayerMP) player);
}
Aggregations