public static void sendWirelessTriangulatorPacket(String command, int id, Object freq) { PacketWirelessTriangulatorSettings packet = new PacketWirelessTriangulatorSettings(command); packet.setDeviceID(id); packet.setFreq(freq); ModLoader.getMinecraftInstance().getSendQueue().addToSendQueue(packet.getPacket()); LoggerRedstoneWireless.getInstance("PacketHandlerOutput") .write( "sendRedstoneEtherPacket:" + packet.toString(), LoggerRedstoneWireless.LogLevel.DEBUG); }
public static void sendWirelessTriangulatorPacket( EntityPlayer player, String command, String freq) { PacketWirelessTriangulatorSettings packet = new PacketWirelessTriangulatorSettings(command); packet.setPosition((int) player.posX, (int) player.posY, (int) player.posZ); packet.setFreq(freq); ModLoader.getMinecraftInstance().getSendQueue().addToSendQueue(packet.getPacket()); LoggerRedstoneWireless.getInstance("PacketHandlerOutput") .write( "sendRedstoneEtherPacket:" + packet.toString(), LoggerRedstoneWireless.LogLevel.DEBUG); }
private static void handleWirelessTriangulator( PacketWirelessTriangulatorSettings packet, World world, EntityPlayer entityplayer) { LoggerRedstoneWireless.getInstance("PacketHandlerInput") .write( "handleWirelessTriangulatorPacket:" + packet.toString(), LoggerRedstoneWireless.LogLevel.DEBUG); if (packet.getCommand().equals("triangulate")) { RedstoneEtherCoordsPlayerMem.getInstance(world) .setCoords(entityplayer, new WirelessCoordinates(packet.getCoords())); } if (packet.getCommand().equals("reset")) { RedstoneEtherCoordsPlayerMem.getInstance(world).remMem(entityplayer.username); } }